source: server/trunk/web/root/templates/html/search/results.tt @ 147

Last change on this file since 147 was 147, checked in by nanardon, 14 years ago
  • split search function (will probably break something...)
  • Property svn:keywords set to Id
File size: 1.6 KB
Line 
1<!-- $Id$ -->
2
3[% USE 'GuessEncode' %]
4[% USE 'ObfuscateMail' %]
5
6<p>
7[% IF pager.current_page != pager.first_page %]
8<a href="[% c.uri_for('/', c.req.path, { 'page' => pager.first_page }) %]">First</a>
9[% END %]
10[% IF pager.previous_page != pager.first_page %]
11<a href="[% c.uri_for('/', c.req.path, { 'page' => pager.previous_page }) %]">[%
12pager.previous_page %]</a>
13[% END %]
14[% pager.current_page %] / [% pager.last_page %]
15[% IF pager.next_page != pager.last_page %]
16<a href="[% c.uri_for('/', c.req.path, { 'page' => pager.next_page }) %]">[%
17pager.next_page %]</a>
18[% END %]
19[% IF pager.current_page != pager.last_page %]
20<a href="[% c.uri_for('/', c.req.path, { 'page' => pager.last_page }) %]">Last</a>
21[% END %]
22</p>
23
24[% FOREACH pkgid = xmlrpc.results %]
25[% info = c.forward('/rpms/info', [ pkgid ]) %]
26<div class="sophie_search_list">
27<h2><a href="[% c.uri_for('/rpms', pkgid) %]">
28    [% info.name %]-[% info.version %]-[% info.release %].[% IF info.src %]src[% ELSE %][% info.arch %][% END %]</a></h2>
29<p>
30[% info.summary | guessencode | html %]
31</p>
32
33[%# Depending the search, we have to perform a quick search per package to show
34result detail %]
35[% IF c.req.param('type') == 'bydep' %]
36[% sargs.0.pkgid = pkgid %]
37<ul>
38[% FOREACH dep = c.forward('/search/dep/match', sargs) %]
39<li>[% dep.name | html %] [% dep.sense | html %] [% dep.evr | html %]</li>
40[% END %]
41</ul>
42[% END %]
43
44[% IF c.req.param('type') == 'byfile' %]
45[% sargs.0.pkgid = pkgid %]
46<ul class="filename">
47[% FOREACH file = c.forward('/search/file/byname', sargs) %]
48<li>[% file.dirname | html -%][%- file.basename | html %]</li>
49[% END %]
50</ul>
51[% END %]
52
53</div>
54[% END %]
Note: See TracBrowser for help on using the repository browser.