/[webpac2]/Webpacus/root/results.tt
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 /Webpacus/root/results.tt

Parent Directory Parent Directory | Revision Log Revision Log


Revision 443 - (show annotations)
Mon May 1 13:48:42 2006 UTC (18 years ago) by dpavlin
File size: 2187 byte(s)
 r546@llin:  dpavlin | 2006-05-01 15:44:19 +0200
 much nicer results display

1 <!-- results -->
2
3 <pre>
4 [% USE dumper ; dumper.dump( site_uri_params( _page => 42 ) ) %]
5 </pre>
6
7 [% hits = html_results.size || 0 %]
8
9 [% IF hits < 1 %]
10 <div class="no_results">
11 No results found for '[% phrase %]'.
12 </div>
13
14 [% IF attr && attr.size %]
15 <span class="attr">[ [% attr.join(", ") %] ]</span>
16 [% END %]
17 [% ELSE %]
18
19 <div>
20
21 <div class="results">
22
23 Showing [% pager.first %] - [% pager.last %] of
24 <strong>[% hints.hit %] result[%- IF hints.hit > 1 ; 's' ; END %]</strong>
25 for '<strong>[% phrase %]</strong>'
26
27 [% IF attr && attr.size %]
28 <span class="attr">[ [% attr.join(", ") %] ]</span>
29 [% END %]
30
31 </div>
32
33 <div style="float:right; font-size: 80%; color: #888; text-align: right;">
34 time: [% hints.time %]s
35 <br/>
36 page: [% page %] of [% pager.last_page %]
37 <br/>
38 template: [% current_template %]
39 </div>
40
41 <span class="switch_template">
42
43 <a href="[% site_uri_params( _template => 'html_ffzg_results_short.tt' ) %]">short</a>
44 &middot;
45 <a href="[% site_uri_params( _template => 'html_ffzg_results_nonstd.tt' ) %]">full</a>
46 &middot;
47 <a href="[% site_uri_params( _template => 'html_ffzg_results_apa.tt') %]">APA</a>
48 &middot;
49 <a href="[% site_uri_params( _template => 'html_ffzg_results_isbd.tt') %]">ISBD</a>
50 </span>
51
52 <br/>
53
54 <a name="page_[% page %]"></a>
55
56 <div class="html_results" id="html_results">
57
58 [% FOREACH r IN html_results %]
59 [% r %]
60 [% END %]
61
62 </div>
63
64 </div>
65
66 <div class="pager" id="results_[% page + 1 %]">
67 <a name="page_[% page + 1 %]"></a>
68
69 [% IF pager.previous_page %]
70 <a id="prev_page" href="[% site_uri_params( _page => pager.previous_page ) %]">&lt;&lt;</a>
71 [% END %]
72
73 Page:
74 [% FOREACH page IN pager.pages_in_spread %]
75 [% IF ! page %]
76 ...
77 [% ELSIF page == pager.current_page %]
78 <b>[% page %]</b>
79 [% ELSE %]
80 <a href="[% site_uri_params( _page => page ) %]">[% page %]</a>
81 [% END %]
82 [% END %]
83
84 [% IF pager.next_page %]
85 <a id="next_page" href="[% site_uri_params( _page => pager.next_page ) %]">&gt;&gt;</a>
86 [% END %]
87
88
89 [% END # if hits > 1 %]
90
91 <input type="hidden" name="results_page_[% page %]" id="results_page_[% page %]" value="[%-
92 FOREACH n IN hints.node ;
93 n.key _ "/" _ n.value ;
94 IF ! loop.last ; " " ; END ;
95 END
96 -%]"/>
97
98 <!-- /results -->

  ViewVC Help
Powered by ViewVC 1.1.26