rev 1861 - in trunk/buscador/templates: date mail

[prev] [thread] [next] [lurker] [Date index for 2005/02/10]

From: simon
Subject: rev 1861 - in trunk/buscador/templates: date mail
Date: 14:13 on 10 Feb 2005
Author: simon
Date: 2005-02-10 14:13:46 +0000 (Thu, 10 Feb 2005)
New Revision: 1861

Modified:
   trunk/buscador/templates/date/month
   trunk/buscador/templates/date/year
   trunk/buscador/templates/mail/view_macros
Log:
Add date viewing stuff


Modified: trunk/buscador/templates/date/month
===================================================================
--- trunk/buscador/templates/date/month	2005-02-10 14:13:14 UTC (rev 1860)
+++ trunk/buscador/templates/date/month	2005-02-10 14:13:46 UTC (rev 1861)
@@ -1,20 +1,55 @@
-[% SET title = date.strftime("%B,%Y") %]
+[% SET title = date.strftime("%B, %Y") %]
 [% INCLUDE header title="Mails for the month of $title" %]
 [% PROCESS macros %]
 <h1> Mails for the month of [% title %] </h1>
 
 [% INCLUDE searchbox %]
 
-[% SET count = 1  %]
 [% SET ym    = date.strftime("%Y/%m") %] 
 [% SET url   = "${base}date/list/$ym" %]
-[% FOR day = days %]
-    [% IF day>0 -%]
-        <a href="[% url %]/[% count | format("%.2d") %]">[% count %]</a> 
-    [%- ELSE -%]
-        [% count %]
-    [%- END -%] 
-    - [% day %]<br />
-    [% count = count + 1%]
+
+
+[% MACRO print_day(day) BLOCK %]
+<td class="header" width="83" height="83" align="center">[% day %]</td>
 [% END %]
+
+[% MACRO cell(date, event) BLOCK %]
+<td class="[% IF event; 'event'; ELSE; 'noevent'; END %]" width="83" height="83" align="center">
+[% IF date; "<a href='$url/$date'>"; ordinate(date); "</a>"; IF event; "<br>($event)"; END; ELSE; '&nbsp;'; END %]
+</td> 
+[% END %]
+
+
+<div align="center">
+
+<p><a href="[% base %]date/view/[% date.strftime("%Y") %]"><b>[% date.strftime("%Y") %]</b></a></p>
+
+<table border="0" class="calendar" cellpadding="1" cellspacing="2">
+<tr>
+[% FOR day = [ 'Sunday', 'Monday' , 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday' ] ; print_day(day); END -%]
+</tr>
+<tr>
+[%- SET pad = 0 -%]
+[%- SET counter = 0 -%]
+[%- WHILE date.day_of_week > pad; pad = pad + 1; cell(0,0);  END -%]
+[%- WHILE days.size>0 %]
+    [% counter = counter + 1 %]
+    [%- IF pad==7 %]
+    </tr>
+    <tr>
+    [% pad = 0 -%]
+    [%- END -%]
+    [% cell(counter, days.shift) %]
+    [%- pad = pad + 1 -%]
+[%- END -%]
+[%- WHILE pad<7;  pad = pad + 1; cell(0,0); END -%]
+</tr>
+<tr>
+    <td class="cal_nav" colspan="3"><div align="left"><a href="[% base %]date/view/[% last_month.strftime("%Y/%m") %]">&lt; [% last_month.fullmonth %]</a></div></td>
+    <td class="cal_nav">&nbsp;</td>
+    <td class="cal_nav" colspan="3"><div align="right"><a href="[% base %]date/view/[% next_month.strftime("%Y/%m") %]">[% next_month.fullmonth %] &gt;</a></div></td>
+</tr>
+</table>
+</div>
+
 [% INCLUDE footer %]

Modified: trunk/buscador/templates/date/year
===================================================================
--- trunk/buscador/templates/date/year	2005-02-10 14:13:14 UTC (rev 1860)
+++ trunk/buscador/templates/date/year	2005-02-10 14:13:46 UTC (rev 1861)
@@ -8,16 +8,24 @@
                    'July', 'August', 'September', 'October', 'November', 'December' ];
 %]
 
+<div align="center">
 
+<p>
+<b>
+<a href="[% base %]date/view/[% prev.strftime("%Y") %]">&lt;[% prev.strftime("%Y") %]</a>
+&nbsp;
+<a href="[% base %]date/view/[% next.strftime("%Y") %]">[% next.strftime("%Y") %]&gt;</a>
+</b>
+</p>
+
 [% count = 0 %]
+<table  border="0" class="calendar" cellpadding="1" cellspacing="2">
 [% FOR month = months %]
-    [%- IF month > 0 -%]
+    <tr height="40"><td width="166" class="[% month ? 'event' : 'noevent' %]" align="center">
         <a href="[% base | remove('/$') %]/date/list/[% year %]/[% count + 1 | format("%.2d") %]">[% mapping.$count %]</a>
-    [%- ELSE -%]
-        [%- mapping.$count -%]
-    [%- END -%]
-    - [% month %]
+        [% IF month %]<br/>([% month %])[% END %]
+    </td></tr>
     [% count = count + 1 %]
-<br />
 [% END %]
+</table>
 [% INCLUDE footer %]

Modified: trunk/buscador/templates/mail/view_macros
===================================================================
--- trunk/buscador/templates/mail/view_macros	2005-02-10 14:13:14 UTC (rev 1860)
+++ trunk/buscador/templates/mail/view_macros	2005-02-10 14:13:46 UTC (rev 1861)
@@ -8,7 +8,7 @@
         <TD>
             [% FOR addressing = addressings("Role", role) %]
             <A HREF="[%base | remove('/$')%]/entity/view/[% addressing.entity %]">
-                [% addressing.name.name %] ([% addressing.address.address %])
+                [% addressing.name.name | html %] ([% addressing.address.address %])
             </A>
                 [% ", " UNLESS addressings.last == addressing %]
             [% END %]

Generated at 15:00 on 10 Feb 2005 by mariachi 0.52