/[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 442 - (show annotations)
Mon May 1 10:30:03 2006 UTC (18 years ago) by dpavlin
File size: 2049 byte(s)
 r544@llin:  dpavlin | 2006-05-01 12:30:53 +0200
 added site_uri_params which can be used to create self-referencing link and
 change or delete parametars from it. Implemented pager and load tamplate using it.

1 <!-- results -->
2
3 <pre>
4 [% USE dumper ; dumper.dump( site_uri_params ) %]
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 Found <em>[% hints.hit %] result[%- IF hints.hit > 1 ; 's' ; END %]</em>
24 for '<em>[% phrase %]</em>'
25 [%- IF page > 1 ; ', this is page ' ; page ; END %]
26 in [% hints.time %]s.
27 Showing results [% pager.first %] - [% pager.last %].
28
29 [% IF attr && attr.size %]
30 <span class="attr">[ [% attr.join(", ") %] ]</span>
31 [% END %]
32
33 </div>
34
35
36 <span class="switch_template">
37
38 <a href="[% site_uri_params( _template => 'html_ffzg_results_short.tt' ) %]">short</a>
39 &middot;
40 <a href="[% site_uri_params( _template => 'html_ffzg_results_nonstd.tt' ) %]">full</a>
41 &middot;
42 <a href="[% site_uri_params( _template => 'html_ffzg_results_apa.tt') %]">APA</a>
43 &middot;
44 <a href="[% site_uri_params( _template => 'html_ffzg_results_isbd.tt') %]">ISBD</a>
45 </span>
46
47 <br/>
48
49 <a name="page_[% page %]"></a>
50
51 <div class="html_results" id="html_results">
52
53 [% FOREACH r IN html_results %]
54 [% r %]
55 [% END %]
56
57 </div>
58
59 </div>
60
61 <div class="pager" id="results_[% page + 1 %]">
62 <a name="page_[% page + 1 %]"></a>
63
64 [% IF pager.previous_page %]
65 <a id="prev_page" href="[% site_uri_params( _page => pager.previous_page ) %]">&lt;&lt;</a>
66 [% END %]
67
68 Page:
69 [% FOREACH page IN pager.pages_in_spread %]
70 [% IF ! page %]
71 ...
72 [% ELSIF page == pager.current_page %]
73 <b>[% page %]</b>
74 [% ELSE %]
75 <a href="[% site_uri_params( _page => page ) %]">[% page %]</a>
76 [% END %]
77 [% END %]
78
79 [% IF pager.next_page %]
80 <a id="next_page" href="[% site_uri_params( _page => pager.next_page ) %]">&gt;&gt;</a>
81 [% END %]
82
83
84 [% END # if hits > 1 %]
85
86 <input type="hidden" name="results_page_[% page %]" id="results_page_[% page %]" value="[%-
87 FOREACH n IN hints.node ;
88 n.key _ "/" _ n.value ;
89 IF ! loop.last ; " " ; END ;
90 END
91 -%]"/>
92
93 <!-- /results -->

  ViewVC Help
Powered by ViewVC 1.1.26