/[mws]/trunk/templates/master.html
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/templates/master.html

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 23 by dpavlin, Sat May 8 02:21:50 2004 UTC revision 24 by dpavlin, Sat May 8 14:27:54 2004 UTC
# Line 3  Line 3 
3  <title>[% IF title %][% title %] -- [% END %]Mail::Box Web Search</title>  <title>[% IF title %][% title %] -- [% END %]Mail::Box Web Search</title>
4  </head>  </head>
5    
6  [% MACRO search(fld,text,link_text) BLOCK; %]  [% PROCESS macros.tt2 %]
 <a href="?search=[% fld %]:[% IF fld == "subject" %][% FILTER subject_search ; text ; END %][% ELSE ; text ; END %]">[% IF link_text ; link_text ; ELSE ; text ; END %]</a>  
 [% END %]  
   
 [% MACRO option(var, value, text) BLOCK %]  
 <option value="[% value %]"[% IF value == param.search_fld %] selected[% END %]>[% text %]</option>  
 [% END %]  
   
 [% MACRO from(message) BLOCK %]  
 <span class="from">  
  [% FOREACH f IN message.from %]  
   [% search('from_phrase',f) %][% IF !loop.last %],[% END %]  
  [% END %]  
 </span>  
 [% END %]  
   
 [% MACRO to(message) BLOCK %]  
 [% IF message.to.size %]  
 <span class="to">To:  
  [% FOREACH f IN message.to %]  
   [% search('to_phrase',f) %][% IF !loop.last %], [% END %]  
  [% END %]  
 </span>  
 [% END %]  
 [% IF message.cc.size %]  
 <span class="cc">Cc:  
  [% FOREACH f IN message.cc %]  
   [% search('cc_phrase',f) %][% IF !loop.last %], [% END %]  
  [% END %]  
 </span>  
 [% END %]  
 [% IF message.bcc.size %]  
 <span class="bcc">Bcc:  
  [% FOREACH f IN message.bcc %]  
   [% IF loop.fist %]Bcc [% END %]  
   [% search('bcc_phrase',f) %][% IF !loop.last %], [% END %]  
  [% END %]  
 </span>  
 [% END %]  
 [% END %]  
   
 [% MACRO date(msg) BLOCK %]  
 <span class="date">[% msg.date %]</span>  
 [% END %]  
   
 [% MACRO usage_list(list,key,description) BLOCK %]  
 [% IF list %]  
 <div class="[% key %]">  
 [% description %]  
 [% FOREACH l IN list %]  
 <br><a href="?search=[% key %]_phrase:[% l.name %]">[% l.name %]</a>&nbsp;<span class="counter">[% l.usage %]</span>  
 [% END %]  
 </div>  
 [% END %]  
 [% END %]  
   
 [% MACRO url_search BLOCK %]  
 [% IF param.search ; "?search=" ; param.search ; END %]  
 [% END %]  
7    
8  <body>  <body>
9    
# Line 104  Search Line 46  Search
46    
47  [% USE cal = Calendar.Simple(mm,yyyy) %]  [% USE cal = Calendar.Simple(mm,yyyy) %]
48    
 [% PERL %]  
 $stash->set( get_cal => sub {  
         my $cal = shift;  
         my $yyyy = shift || return "BUG2";  
         my $mm = shift || return "BUG3";  
         my $day = shift || return "&nbsp;";  
   
         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 "<a href=\"/$yyyy/$mm/$dd/$url\" title=\"".$cal->{$yyyymm}->{$dd}."\">$day</a>";  
         } else {  
                 return $day;  
         }  
 } );  
 [% END %]  
   
49    <table border="0">    <table border="0">
50    <tr><th colspan="7">    <tr><th colspan="7">
51          <a href="/[% yyyy ; "/" %]/[% url_search %]">[% yyyy %]</a>-<a href="/[% yyyy ; "/" ; mm %]/[% url_search %]">[% mm %]</a>          <a href="/[% yyyy ; "/" %]/[% url_search %]">[% yyyy %]</a>-<a href="/[% yyyy ; "/" ; mm %]/[% url_search %]">[% mm %]</a>
# Line 154  Lists Line 74  Lists
74  <br>  <br>
75  Links  Links
76    
77  <!--  [% USE dumper ; dumper.dump(param.sort_by, param.search) %]
 [% USE dumper ; dumper.dump(calendar) %]  
 -->  
78    
79  </td>  </td>
80    

Legend:
Removed from v.23  
changed lines
  Added in v.24

  ViewVC Help
Powered by ViewVC 1.1.26