--- trunk/templates/master.html 2004/05/06 10:13:04 11 +++ trunk/templates/master.html 2004/05/08 00:54:16 21 @@ -4,15 +4,165 @@ [% MACRO search(fld,text,link_text) BLOCK; %] -[% IF link_text ; link_text ; ELSE ; text ; END %] +[% IF link_text ; link_text ; ELSE ; text ; END %] +[% END %] + +[% MACRO option(var, value, text) BLOCK %] + +[% END %] + +[% MACRO from(message) BLOCK %] + + [% FOREACH f IN message.from %] + [% search('from_phrase',f) %][% IF !loop.last %],[% END %] + [% END %] + +[% END %] + +[% MACRO to(message) BLOCK %] +[% IF message.to.size %] +To: + [% FOREACH f IN message.to %] + [% search('to_phrase',f) %][% IF !loop.last %], [% END %] + [% END %] + +[% END %] +[% IF message.cc.size %] +Cc: + [% FOREACH f IN message.cc %] + [% search('cc_phrase',f) %][% IF !loop.last %], [% END %] + [% END %] + +[% END %] +[% IF message.bcc.size %] +Bcc: + [% FOREACH f IN message.bcc %] + [% IF loop.fist %]Bcc [% END %] + [% search('bcc_phrase',f) %][% IF !loop.last %], [% END %] + [% END %] + +[% END %] +[% END %] + +[% MACRO date(msg) BLOCK %] +[% msg.date %] +[% END %] + +[% MACRO usage_list(list,key,description) BLOCK %] +[% IF list %] +
+[% END %] +[% END %] + +[% MACRO url_search BLOCK %] +[% IF param.search ; "?search=" ; param.search ; END %] [% END %] ++ + + + | +|||||||||
+ [% IF results %] [% INCLUDE results.html %] [% ELSIF message %] [% INCLUDE message.html %] [% END %] + | +
+
+[% USE cal = Calendar.Simple(mm,yyyy) %]
+
+[% PERL %]
+$stash->set( get_cal => sub {
+ my $cal = shift;
+ my $yyyy = shift || return "BUG2";
+ my $mm = shift || return "BUG3";
+ my $day = shift || return " ";
+
+ my $url = shift || "";
+
+ return $day if (! $cal); # no calendar entries
+
+ my $yyyymm = sprintf("%04d-%02d",$yyyy,$mm);
+ my $dd = sprintf("%02d",$day);
+
+ if ($cal->{$yyyymm}->{$dd}) {
+ return "{$yyyymm}->{$dd}."\">$day";
+ } else {
+ return $day;
+ }
+} );
+[% END %]
+
+
+Thread + +[% usage_list(counters.from,'from','From') %] + +[% usage_list(counters.to,'to','To') %] + +[% usage_list(counters.cc,'cc','Cc') %] + + +Lists + + +Links + + + + |
+
+