<% _.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';
}
%>
<% } else { %>
<% } %>
<% }); %>