<%inherit file="channel.tmpl" />
<%def name="month_table(cal, month, dates)">
<table class="calendar">
## table header - month name
<tr>
<th colspan="7">${h.fmt_month(month)}</th>
</tr>
## month header - weekday names
<tr>
% for weekday in cal.iterweekdays() :
<th>${h.fmt_weekday(weekday)}</th>
% endfor
</tr>
## iterate over the weeks
% for week in cal.monthdays2calendar(month.year, month.month) :
<tr>
## iterate over the week's days
% for day, weekday in week :
## is it an empty cell?
% if not day :
<td> </td>
% else :
## build date
<% date = h.build_date(month, day) %>
## is it today?
% if day and h.is_today(date) :
<td id="today">\
% else :
<td>\
% endif
## link to logs for this day?
% if date in dates :
<a href="${urls.channel_date.build(req, channel=channel, date=date)}">${day}</a>\
% else :
${day}\
% endif
</td>
% endif
% endfor
</tr>
% endfor
</table>
</%def>
${month_table(calendar, month, days)}