/[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

Contents of /trunk/templates/master.html

Parent Directory Parent Directory | Revision Log Revision Log


Revision 19 - (show annotations)
Fri May 7 20:52:34 2004 UTC (19 years, 11 months ago) by dpavlin
File MIME type: text/html
File size: 2998 byte(s)
added From, To, Cc lists with unique feature: it will count same names
in different order as, well, same name :-) It will also remove accented
characters when counting names, to detect false duplicates (using
Text::Unaccent)

1 <html>
2 <head>
3 <title>[% IF title %][% title %] -- [% END %]Mail::Box Web Search</title>
4 </head>
5
6 [% MACRO search(fld,text,link_text) BLOCK; %]
7 <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 %]
9
10 [% MACRO option(var, value, text) BLOCK %]
11 <option value="[% value %]"[% IF value == param.search_fld %] selected[% END %]>[% text %]</option>
12 [% END %]
13
14 [% MACRO from(message) BLOCK %]
15 <span class="from">
16 [% FOREACH f IN message.from %]
17 [% search('from_phrase',f) %][% IF !loop.last %],[% END %]
18 [% END %]
19 </span>
20 [% END %]
21
22 [% MACRO to(message) BLOCK %]
23 [% IF message.to.size %]
24 <span class="to">To:
25 [% FOREACH f IN message.to %]
26 [% search('to_phrase',f) %][% IF !loop.last %], [% END %]
27 [% END %]
28 </span>
29 [% END %]
30 [% IF message.cc.size %]
31 <span class="cc">Cc:
32 [% FOREACH f IN message.cc %]
33 [% search('cc_phrase',f) %][% IF !loop.last %], [% END %]
34 [% END %]
35 </span>
36 [% END %]
37 [% IF message.bcc.size %]
38 <span class="bcc">Bcc:
39 [% FOREACH f IN message.bcc %]
40 [% IF loop.fist %]Bcc [% END %]
41 [% search('bcc_phrase',f) %][% IF !loop.last %], [% END %]
42 [% END %]
43 </span>
44 [% END %]
45 [% END %]
46
47 [% MACRO date(msg) BLOCK %]
48 <span class="date">[% msg.date %]</span>
49 [% 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>
63
64 <table border="0" width="100%">
65 <tr>
66 <td colspan="2">
67
68 <form>
69 Search
70 <select name="search_fld">
71 [% option("search_fld","message","anywhere") %]
72 [% option("search_fld","subject","message subject") %]
73 [% option("search_fld","body","message text") %]
74 [% option("search_fld","from_phrase","sender name") %]
75 [% option("search_fld","from_address","sender address") %]
76 [% option("search_fld","to_phrase","recipient name") %]
77 [% 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>
81 <input type="text" name="search_val" size=20 value="[% param.search_val %]">
82 </select>
83 <input type="submit" name="submit" value="Go!">
84 </form>
85
86 </td>
87 </tr>
88
89 <tr>
90 <td valign="top" width="90%">
91
92 [% IF results %]
93 [% INCLUDE results.html %]
94 [% ELSIF message %]
95 [% INCLUDE message.html %]
96 [% END %]
97
98 </td>
99 <td valign="top">
100
101 [% USE cal = Calendar.Simple %]
102
103 <table border="0">
104 [% FOREACH row = cal.rows %]
105 <tr>
106 [% FOREACH col = row %]
107 <td align="right">[% col || '&nbsp;' %]</td>
108 [% END %]
109 </tr>
110 [% END %]
111 </table>
112
113 <br>
114 Thread
115
116 [% usage_list(counters.from,'from','From') %]
117
118 [% usage_list(counters.to,'to','To') %]
119
120 [% usage_list(counters.cc,'cc','Cc') %]
121
122 <br>
123 Lists
124
125 <br>
126 Links
127
128 <br>
129 [% USE dumper ; dumper.dump(counters) %]
130
131 </td>
132
133 </tr>
134
135
136 </table>
137
138 </body>

  ViewVC Help
Powered by ViewVC 1.1.26