<% for(i = 0; i < hours; i++){ %>
<% for(l = 0; l < cal._hour_min(i); l++){ %>
<% }; %>
<% }; %>
<%
function arrayColumn(array, columnName) {
return array.map(function(value,index) {
return value[columnName];
})
}
var uniqueArray = function(arrArg) {
return arrArg.filter(function(elem, pos,arr) {
return arr.indexOf(elem) == pos;
});
};
var horas = arrayColumn(by_hour, 'start_hour');
horas = uniqueArray(horas);
horasArray = {};
horas.forEach(function(element) {
horasArray[element] = [];
});
by_hour.forEach(function(element) {
horasArray[element.start_hour].push(element);
});
%>
<% _.each(horasArray, function(e,i){ %>
<% _.each(e, function(event,indice){ %>
<% }); %>
<% }); %>
<% if(after_time.length) {%>