/[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 13 by dpavlin, Thu May 6 16:53:40 2004 UTC revision 20 by dpavlin, Fri May 7 23:35:39 2004 UTC
# Line 4  Line 4 
4  </head>  </head>
5    
6  [% MACRO search(fld,text,link_text) BLOCK; %]  [% MACRO search(fld,text,link_text) BLOCK; %]
7  <a href="?search=[% fld %]:[% text %]">[% IF link_text ; link_text ; ELSE ; text ; END %]</a>  <a href="?search=[% fld %]:[% IF fld == "subject" %][% FILTER subject_search ; text ; END %][% ELSE ; text ; END %]">[% IF link_text ; link_text ; ELSE ; text ; END %]</a>
8  [% END %]  [% END %]
9    
10  [% MACRO option(var, value, text) BLOCK %]  [% MACRO option(var, value, text) BLOCK %]
# Line 20  Line 20 
20  [% END %]  [% END %]
21    
22  [% MACRO to(message) BLOCK %]  [% MACRO to(message) BLOCK %]
23  <span class="to">  [% IF message.to.size %]
24    <span class="to">To:
25   [% FOREACH f IN message.to %]   [% FOREACH f IN message.to %]
   [% IF !loop.fist %]To [% END %]  
26    [% search('to_phrase',f) %][% IF !loop.last %], [% END %]    [% search('to_phrase',f) %][% IF !loop.last %], [% END %]
27   [% END %]   [% END %]
28    </span>
29    [% END %]
30    [% IF message.cc.size %]
31    <span class="cc">Cc:
32   [% FOREACH f IN message.cc %]   [% FOREACH f IN message.cc %]
   [% IF !loop.fist %]Cc [% END %]  
33    [% search('cc_phrase',f) %][% IF !loop.last %], [% END %]    [% search('cc_phrase',f) %][% IF !loop.last %], [% END %]
34   [% END %]   [% END %]
35    </span>
36    [% END %]
37    [% IF message.bcc.size %]
38    <span class="bcc">Bcc:
39   [% FOREACH f IN message.bcc %]   [% FOREACH f IN message.bcc %]
40    [% IF !loop.fist %]Bcc [% END %]    [% IF loop.fist %]Bcc [% END %]
41    [% search('cc_phrase',f) %][% IF !loop.last %], [% END %]    [% search('bcc_phrase',f) %][% IF !loop.last %], [% END %]
42   [% END %]   [% END %]
43  </span>  </span>
44  [% END %]  [% END %]
45    [% END %]
46    
47  [% MACRO date(msg) BLOCK %]  [% MACRO date(msg) BLOCK %]
48  <span class="date">[% msg.date %]</span>  <span class="date">[% msg.date %]</span>
49  [% END %]  [% END %]
50    
51    [% MACRO usage_list(list,key,description) BLOCK %]
52    [% IF list %]
53    <div class="[% key %]">
54    [% description %]
55    [% FOREACH l IN list %]
56    <br><a href="?search=from_phrase:[% l.name %]">[% l.name %]</a>&nbsp;<span class="counter">[% l.usage %]</span>
57    [% END %]
58    </div>
59    [% END %]
60    [% END %]
61    
62  <body>  <body>
63    
64  <table border="0" width="100%">  <table border="0" width="100%">
# Line 49  Line 68 
68  <form>  <form>
69  Search  Search
70  <select name="search_fld">  <select name="search_fld">
71    [% option("search_fld","message","anywhere") %]
72  [% option("search_fld","subject","message subject") %]  [% option("search_fld","subject","message subject") %]
73  [% option("search_fld","body","message text") %]  [% option("search_fld","body","message text") %]
74  [% option("search_fld","from_phrase","sender name") %]  [% option("search_fld","from_phrase","sender name") %]
75  [% option("search_fld","from_address","sender address") %]  [% option("search_fld","from_address","sender address") %]
76  [% option("search_fld","to_phrase","recipient name") %]  [% option("search_fld","to_phrase","recipient name") %]
77  [% option("search_fld","to_address","recipient address") %]  [% option("search_fld","to_address","recipient address") %]
78    [% option("search_fld","cc_phrase","also to name") %]
79    [% option("search_fld","bcc_phrase","sneek to name") %]
80  </select>  </select>
81  <input type="text" name="search_val" size=20 value="[% param.search_val %]">  <input type="text" name="search_val" size=20 value="[% param.search_val %]">
82  </select>  </select>
83    <input type="submit" name="submit" value="Go!">
84  </form>  </form>
85    
86  </td>  </td>
# Line 75  Search Line 98  Search
98  </td>  </td>
99  <td valign="top">  <td valign="top">
100    
101    [% USE cal = Calendar.Simple %]  [% USE cal = Calendar.Simple(mm,yyyy) %]
102    
103    [% PERL %]
104    $stash->set( get_cal => sub {
105            my $cal = shift;
106            my $yyyy = shift || return "BUG2";
107            my $mm = shift || return "BUG3";
108            my $day = shift || return "&nbsp;";
109    
110            return $day if (! $cal);        # no calendar entries
111    
112            my $yyyymm = sprintf("%04d-%02d",$yyyy,$mm);
113            my $dd = sprintf("%02d",$day);
114    
115            if ($cal->{$yyyymm}->{$dd}) {
116                    return "<a href=\"/$yyyy/$mm/$dd/\" title=\"".$cal->{$yyyymm}->{$dd}."\">$day</a>";
117            } else {
118                    return $day;
119            }
120    } );
121    [% END %]
122    
123    <table border="0">    <table border="0">
124      <tr><th colspan="7"><a href="/[% yyyy ; "/" ; mm %]/">[% yyyy ; "-" ; mm %]</a></th></tr>
125    [% FOREACH row = cal.rows %]    [% FOREACH row = cal.rows %]
126       <tr>       <tr>
127       [% FOREACH col = row %]       [% FOREACH col = row %]
128          <td align="right">[% col || '&nbsp;' %]</td>          <td align="right">[% get_cal(calendar,yyyy,mm,col) %]</td>
129       [% END %]       [% END %]
130       </tr>       </tr>
131    [% END %]    [% END %]
# Line 90  Search Line 134  Search
134  <br>  <br>
135  Thread  Thread
136    
137  <br>  [% usage_list(counters.from,'from','From') %]
 Recipients  
138    
139  <br>  [% usage_list(counters.to,'to','To') %]
140  Contributors  
141    [% usage_list(counters.cc,'cc','Cc') %]
142    
143  <br>  <br>
144  Lists  Lists
# Line 103  Lists Line 147  Lists
147  Links  Links
148    
149  <br>  <br>
150    [% USE dumper ; dumper.dump(calendar) %]
151    
152  </td>  </td>
153    

Legend:
Removed from v.13  
changed lines
  Added in v.20

  ViewVC Help
Powered by ViewVC 1.1.26