<% _.each(layout, function (panel, columnNumber) { %>
> <% var panelLabelString = null; if ('customLabel' in panel) { if (panel.customLabel) { panelLabelString = panel.customLabel; } } else { if (panel.label) { panelLabelString = "{{translate \"" + panel.label + "\" scope=\""+model.name+"\"}}"; } } %> <% if (panelLabelString) { %> <% } %>
<% _.each(panel.rows, function (row, rowNumber) { %>
<% _.each(row, function (cell, cellNumber) { %> <% var spanClassBase; if (columnCount === 1) { spanClassBase = 'col-sm-12'; } else if (columnCount === 2) { spanClassBase = 'col-sm-6'; } else if (columnCount === 3) { spanClassBase = 'col-sm-4'; } else if (columnCount === 4) { spanClassBase = 'col-md-3 col-sm-6'; } else { spanClass = 'col-sm-12'; } %> <% if (cell != false) { %> <% var spanClass; if (columnCount === 1 || cell.fullWidth) { spanClass = 'col-sm-12'; } else if (columnCount === 2) { if (cell.span === 2) { spanClass = 'col-sm-12'; } else { spanClass = 'col-sm-6'; } } else if (columnCount === 3) { if (cell.span === 2) { spanClass = 'col-sm-8'; } else if (cell.span === 3) { spanClass = 'col-sm-12'; } else { spanClass = 'col-sm-4'; } } else if (columnCount === 4) { if (cell.span === 2) { spanClass = 'col-sm-6'; } else if (cell.span === 3) { spanClass = 'col-sm-9'; } else if (cell.span === 4) { spanClass = 'col-sm-12'; } else { spanClass = 'col-md-3 col-sm-6'; } } else { spanClass = 'col-sm-12'; } %>
<% if (!cell.noLabel) { %><% } %>
<% if ('customCode' in cell) { print (cell.customCode); } else { print ("{{{this."+cell.name+"}}}"); } %>
<% } else { %>
<% } %> <% }); %>
<% }); %>
<% }); %>