1 <%inherit file="channel.tmpl" /> |
1 <%inherit file="channel.tmpl" /> |
2 |
2 |
3 <%def name="month_table(month)"> |
3 <%def name="month_table(month, is_center=True)"> |
4 ## the set of available days |
4 ## the set of available days |
5 <% log_dates = h.set(channel.source.get_month_days(month)) %> |
5 <% log_dates = h.set(channel.source.get_month_days(month)) %> |
6 ## the calendar table |
6 ## the calendar table |
7 <table class="calendar"> |
7 <table class="calendar"> |
8 ## table header - month name |
8 ## table header - month name |
9 <tr class="month-header"> |
9 <tr class="month-header"> |
10 <th colspan="7"${' class="this-month"' if h.is_this_month(month) else ''}> |
10 <th colspan="7"${' class="this-month"' if h.is_this_month(month) else ''}> |
11 <a href="${urls.channel_calendar.build(req, channel=channel, year=h.next_month(month).year, month=h.next_month(month).month)}" class="next-month">»</a> |
11 % if is_center : |
12 <a href="${urls.channel_calendar.build(req, channel=channel, year=h.prev_month(month).year, month=h.prev_month(month).month)}" class="prev-month">«</a> |
12 <a href="${urls.channel_calendar.build(req, channel=channel, year=h.next_month(month).year, month=h.next_month(month).month)}" class="next-month" title="Next month">»</a> |
|
13 <a href="${urls.channel_calendar.build(req, channel=channel, year=h.prev_month(month).year, month=h.prev_month(month).month)}" class="prev-month" title="Previous month">«</a> |
|
14 |
|
15 <form action="${urls.channel_calendar.build(req, channel=channel)}" method="GET"> |
|
16 <select name="month"> |
|
17 ${h.select_options(((month_num, name) for month_num, name in h.months), month.month)} |
|
18 </select> |
|
19 <select name="year"> |
|
20 ${h.select_options(((None, 2006), (None, 2007), (None, 2008), (None, 2009)), month.year)} |
|
21 </select> |
|
22 <input type="submit" value="Go »" /> |
|
23 </form> |
|
24 % else : |
13 <span id="month-name">${h.fmt_month(month)}</span> |
25 <span id="month-name">${h.fmt_month(month)}</span> |
|
26 % endif |
14 </th> |
27 </th> |
15 </tr> |
28 </tr> |
16 ## month header - weekday names |
29 ## month header - weekday names |
17 <tr class="week-header"> |
30 <tr class="week-header"> |
18 % for weekday in h.calendar.iterweekdays() : |
31 % for weekday in h.calendar.iterweekdays() : |