%
var containerId = m.lib.containerId, tuix = m.tuix;
zenario.sendSignal('eventListPreDisplay', {containerId: containerId, microTemplate: 'fea_list_blocks', tuix: tuix});
%>
{{m.lib.pMicroTemplate('dev_tools', m)}}
{{m.tuix.header_html}}
<% if (m.tuix.title !== undefined) { %>
<% if (m.tuix.title_tags) { %>
<{{m.tuix.title_tags|e}}>{{m.tuix.title|e}}{{m.tuix.title_tags|e}}>
<% } else { %>
{{m.tuix.title|e}}
<% } %>
<% } %>
<% if (zenarioT.find(m.tuix.sortedCollectionButtons, 'back')) { %>
{{m.lib.pMicroTemplate('button', m.tuix.sortedCollectionButtons, 'back')}}
<% } %>
<% if (zenarioT.find(m.tuix.sortedCollectionButtons, 'top')) { %>
{{m.lib.pMicroTemplate('button', m.tuix.sortedCollectionButtons, 'top')}}
<% } %>
<% var ci, col, chi, child, bi, button, ii, item, tag, headerId = false, firstItem = true; %>
{{m.lib.pMicroTemplate('list_search', m)}}
<% if (m.tuix.item_count_message && m.tuix.__item_count__ > 1) { %>
{{m.tuix.item_count_message.replace("[[count]]", m.tuix.__item_count__)|e}}
<% } %>
<% if (m.tuix.subtitle !== undefined) { %>
{{m.tuix.subtitle|e}}
<% } %>
<% if (m.tuix.sortedCollectionButtons.length) { %>
<% if (zenarioT.find(m.tuix.sortedCollectionButtons, false)) { %>
{{m.lib.pMicroTemplate('button', m.tuix.sortedCollectionButtons, false)}}
<% } %>
<% } %>
<% if (!_.isEmpty(m.tuix.columns)) { %>
<% foreach (m.tuix.sortedItems as ii => item) { %>
<% if (m.tuix.has_headers) { %>
<% if (item.header_id != headerId) { %>
<% if (headerId !== false) { %>
<% } %>
<% headerId = item.header_id; %>
{{item.header_name|e}}
<% } %>
<% } %>
<% var sameRow = false; %>
<% foreach (m.tuix.sortedColumns as ci => col) { %>
<% if (item[col.id] === undefined) {
continue;
} %>
<% if (m.tuix.sortedColumns[+ci + 1] && m.tuix.sortedColumns[+ci + 1].same_row && !sameRow) { %>
<% sameRow = true; %>
<% } %>
<% tag = col.tag ? col.tag : 'p'; %>
<{{tag|e}}
id="{{('zfea_' + m.lib.containerId + '_row_' + ii + '_col_' + ci)|e}}"
data-label="{{col.title|e}}"
class="
column_{{col.id|e}}
{{col.css_class|e}}
<% if (ci == 0) { %>
zfea_first_col
<% } %>
<% if (item.cell_css_classes && item.cell_css_classes[col.id]) { %>
{{item.cell_css_classes[col.id]|e}}
<% } %>"
>
{{col.blocks_title|e}}
{{m.lib.pMicroTemplate('list_cell', {col: col, item: item})}}
{{tag|e}}>
<% if (col.same_row && sameRow && (!m.tuix.sortedColumns[+ci + 1] || !m.tuix.sortedColumns[+ci + 1].same_row)) { %>
<% sameRow = false; %>
<% } %>
<% } %>
<% if (item.sortedItemButtons.length) { %>
{{m.lib.pMicroTemplate('button', item.sortedItemButtons)}}
<% } %>
<% } %>
<%
if (!zenarioL.mobile && m.lib.mode != 'view_data_pool_block') {
m.lib.after(function() {
var maxHeight = 0;
$('#' + m.lib.containerId + ' .zfea_block_list_wrap .zfea_block')
.each(function() { maxHeight = Math.max(maxHeight, $(this).height()); })
.height(maxHeight);
});
}
%>
<% if (m.tuix.sortedItems.length == 0) { %>
<% if (m.tuix.no_items_message) { %>
{{m.tuix.no_items_message}}
<% } %>
<% } %>
<% } %>
{{m.lib.pMicroTemplate('list_pagination', m)}}
{{m.tuix.footer_html}}
<%
m.lib.after(function() {
zenario.sendSignal('eventListPostDisplay', {containerId: containerId, microTemplate: 'fea_list_blocks', tuix: tuix});
});
%>