<%
var curYear = 0;
var curMonth = 0;
var counter = 0;
_.each(periods.start, function(period){
//# Check if we want to print periods
if(display_periods){
// print years
if(curYear != period.year){
// close previous year tags
if(curYear != 0){
if(display_subperiods && curMonth != 0){ %>
<% } //# close ul from month
%>
<% // dropdown-menu %>
<% // dropdown-submenu %>
<%
}
// begin new year tags
curYear = period.year;
curMonth = 0;
%>
<%
var curYear = 0;
var curMonth = 0;
var counter = 0;
_.each(periods.end, function(period){
//# Check if we want to print periods
if(display_periods){
// print years
if(curYear != period.year){
// close previous year tags
if(curYear != 0){
if(display_subperiods && curMonth != 0){ %>
<% } //# close ul from month
%>
<% // dropdown-menu %>
<% // dropdown-submenu %>
<%
}
// begin new year tags
curYear = period.year;
curMonth = 0;
%>