2 <div align="center" style="border: 1px solid black; background: #eee">
4 function redo_self(arg) {
5 new Ajax.Updater("calendar","[%base%]/calendar?view_cal="+arg, { method: "get" })
8 [% IF request.action == "view" %]
9 [% SET shot = photo.shot %]
11 [% SET date = view_cal || shot || now %]
12 [% SET imp_date = shot || now %]
13 [% SET next = date.next_month %]
14 [% SET prev = date.prev_month %]
15 [% SET calendar = request.calendar(date.ymd) %]
16 <table class="calendar">
18 <th> <a href="javascript:redo_self('[%prev.ymd%]')">« </a></th>
20 [% date.strftime("%Y-%m") %]
23 <a href="javascript:redo_self('[%next.ymd%]')">» </a>
28 <td>S </td><td> M </td><td>
29 T</td><td>W</td><td>T</td><td>F</td><td>S</td>
31 [% FOR week = calendar %]
36 [% IF shot AND day.day == imp_date.mday %]
39 <td class="caltagged">
41 <a href="[%base%][%day.tag%]?view_cal=[%date.ymd%]">[% day.day %]</a> </td>
43 <td class="calempty"> [% day.day %] </td>