terom@54: <%inherit file="channel.tmpl" /> terom@54: terom@113: <%def name="month_table(month, is_center=True)"> terom@112: ## the set of available days terom@112: <% log_dates = h.set(channel.source.get_month_days(month)) %> terom@112: ## the calendar table terom@54: terom@54: ## table header - month name terom@55: terom@58: terom@54: terom@54: ## month header - weekday names terom@55: terom@112: % for weekday in h.calendar.iterweekdays() : terom@54: terom@54: % endfor terom@54: terom@54: ## iterate over the weeks terom@112: % for week in h.calendar.monthdays2calendar(month.year, month.month) : terom@54: terom@54: ## iterate over the week's days terom@54: % for day, weekday in week : terom@54: ## is it an empty cell? terom@54: % if not day : terom@54: terom@54: % else : terom@54: ## build date terom@85: <% date = h.build_date(month, day) %>\ terom@55: ## render cell terom@115: \ terom@54: ## link to logs for this day? terom@115: % if date.date() in log_dates : terom@85: ${day}\ terom@54: % else : terom@85: ${day}\ terom@54: % endif terom@54: terom@54: % endif terom@54: % endfor terom@54: terom@54: % endfor terom@54:
terom@113: % if is_center : terom@113: » terom@113: « terom@113: terom@113:
terom@113: terom@113: terom@113: terom@113:
terom@113: % else : terom@55: ${h.fmt_month(month)} terom@113: % endif terom@55:
${h.fmt_weekday(weekday)}
 
terom@54: terom@54: terom@114:
${channel.title} :: Calendar for ${h.fmt_month(month)}
terom@114: terom@114:
terom@112: ## three months terom@113: ${month_table(h.prev_month(month), is_center=False )} terom@113: ${month_table(month, is_center=True )} terom@113: ${month_table(h.next_month(month), is_center=False )} terom@114: