]> git.decadent.org.uk Git - memories.git/blobdiff - templates/calendar
Merge commit 'trunk'
[memories.git] / templates / calendar
index c71bf824e02e6b12f67eae30cd8a46d37ca55b34..68403a87329446d8fac9dcaf4d7257066d9484d0 100644 (file)
@@ -1,4 +1,10 @@
+<div id="calendar">
 <div align="center" style="border: 1px solid black; background: #eee">
+<script>
+  function redo_self(arg) {
+    new Ajax.Updater("calendar","[%base%]/calendar?view_cal="+arg, { method: "get" })
+  }
+</script>
 [% IF request.action == "view" %]
     [% SET shot = photo.shot %]
 [% END %]
 [% SET calendar = request.calendar(date.ymd) %]
 <table class="calendar">
     <tr>
-        <th> <a href="[%base%]/[%request.path%]?view_cal=[%prev.ymd%]">&laquo; </a></th>
+        <th> <a href="javascript:redo_self('[%prev.ymd%]')">&laquo; </a></th>
         <th colspan="5"> 
             [% date.strftime("%Y-%m") %] 
         </th>
         <th> [% IF next %]
-            <a href="[%base%]/[%request.path%]?view_cal=[%next.ymd%]">&raquo; </a>
+            <a href="javascript:redo_self('[%next.ymd%]')">&raquo; </a>
             [% END %]
         </th>
     </tr>
@@ -41,3 +47,4 @@
 [% END %]
 </table>
 </div>
+</div>