<% var invertDifPattern = ['RBPLES ']; var priceOnlyPattern = ['NIESDE0','NIESPC0']; var noDiffPattern = ['NIESDE0']; var topFlopClsNames = [ view.options.topFlopCls['top'], view.options.topFlopCls['flop'], view.options.topFlopCls['equal'] ]; var invertTopFlopClsNames = [ view.options.topFlopCls['flop'], view.options.topFlopCls['top'], view.options.topFlopCls['equal'] ]; var mv,decimals,priceOnly,invertDif,noDiff,difCls,topFlopCls, link; _.each(model.models, function(instrument, index) { link = ''; mv = instrument.getDescriptorValue("MV"); decimals = instrument.getDecimals() || 0; priceOnly = _.indexOf(priceOnlyPattern, mv) != -1; invertDif = _.indexOf(invertDifPattern, mv) != -1; noDiff = _.indexOf(noDiffPattern, mv) != -1; difCls = invertDif ? 'difinv' : 'dif'; topFlopCls = noDiff ? view.options.topFlopCls['equal'] : instrument.getTopFlopCls(INFOBOLSA.Descriptors.Trend, invertDif ? invertTopFlopClsNames : topFlopClsNames); switch (mv) { case 'RBPLES ': link = '/primas-riesgo'; break; case 'MTBE001': case 'MTXAU ': link = '/materias-primas'; break; case 'DWEUDU ': link = '/divisas'; break; case 'T1EUR8Y': link = '/euribor'; break; } %> <% if (index === 3 || index === 6){ %>
<% } %>
<% if (link) { %>
">
<%= instrument.getAlias("MV", 'D80') %>
<% } else { %>
">
<%= instrument.getAlias("MV", 'D80') %>
<% } %> <%= instrument.getLast() %> <% if (!priceOnly) { %> <%= instrument.formatAsNumber(INFOBOLSA.Descriptors.ChangePercent, 2) %>% <% } %>
<% }); %>