1 <%inherit file="channel.tmpl" /> |
1 <%inherit file="channel.tmpl" /> |
2 |
2 |
3 <%def name="month_table(cal, month, dates)"> |
3 <%def name="month_table(cal, month, dates)"> |
4 <table class="calendar"> |
4 <table class="calendar"> |
5 ## table header - month name |
5 ## table header - month name |
6 <tr> |
6 <tr class="month-header"> |
7 <th colspan="7">${h.fmt_month(month)}</th> |
7 <th colspan="7"> |
|
8 <a href="${urls.channel_calendar.build(req, channel=channel, year=h.next_month_year(month), month=h.next_month(month))}" class="next-month">»</a> |
|
9 <a href="${urls.channel_calendar.build(req, channel=channel, year=h.prev_month_year(month), month=h.prev_month(month))}" class="prev-month">«</a> |
|
10 <span id="month-name">${h.fmt_month(month)}</span> |
|
11 </th> |
8 </tr> |
12 </tr> |
9 ## month header - weekday names |
13 ## month header - weekday names |
10 <tr> |
14 <tr class="week-header"> |
11 % for weekday in cal.iterweekdays() : |
15 % for weekday in cal.iterweekdays() : |
12 <th>${h.fmt_weekday(weekday)}</th> |
16 <th>${h.fmt_weekday(weekday)}</th> |
13 % endfor |
17 % endfor |
14 </tr> |
18 </tr> |
15 ## iterate over the weeks |
19 ## iterate over the weeks |
21 % if not day : |
25 % if not day : |
22 <td> </td> |
26 <td> </td> |
23 % else : |
27 % else : |
24 ## build date |
28 ## build date |
25 <% date = h.build_date(month, day) %> |
29 <% date = h.build_date(month, day) %> |
26 ## is it today? |
30 ## render cell |
27 % if day and h.is_today(date) : |
31 <td${' id="today"' if h.is_today(date) else ''}${' class="empty"' if date not in dates else ''}>\ |
28 <td id="today">\ |
|
29 % else : |
|
30 <td>\ |
|
31 % endif |
|
32 ## link to logs for this day? |
32 ## link to logs for this day? |
33 % if date in dates : |
33 % if date in dates : |
34 <a href="${urls.channel_date.build(req, channel=channel, date=date)}">${day}</a>\ |
34 <a href="${urls.channel_date.build(req, channel=channel, date=date)}">${day}</a>\ |
35 % else : |
35 % else : |
36 ${day}\ |
36 ${day}\ |