source: trunk/templates/search.tt @ 811

Last change on this file since 811 was 716, checked in by Earle Martin, 16 years ago

Renaming OpenGuides::SuperSearch? to OpenGuides::Search and supersearch.cgi to search.cgi - bug #17.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.8 KB
Line 
1[% IF search_terms %]
2[% node_name = "Search results for $search_terms" %]
3[% ELSE %]
4[% node_name = "Search" %]
5[% END %]
6[% INCLUDE header.tt %]
7[% INCLUDE banner.tt %]
8<div id="content">
9[% INCLUDE navbar.tt %]
10<div id="maincontent">
11  [% IF search_terms %]
12  <h2>Search Results for <em>[% search_terms %]</em></h2>
13    [% IF results.size %]
14      <h3>[% total_num %] matches found, showing [% first_num %] - [% last_num %]</h3>
15    [% END %]
16  [% ELSE %]
17  <h2>Search [% site_name %]</h2>
18  [% END %]
19
20  <p><small>
21    Version [% ss_version %].  See the
22    <a href="[% ss_info_url %]">information page</a> for help and more details.
23  </small></p>
24
25  <form method="get" action="search.cgi">
26    <table border="1">
27      <tr>
28         <th>
29           <label for="search_upper">Pages containing text:</label>
30         </th>
31         <td>
32           <input type="text" name="search" value="[% IF search_terms %][% search_terms %][% END %]" size="50" maxlength="80" id="search_upper" />
33         </td>
34       </tr>
35      <tr>
36        <th>Location:</th>
37        <td>
38        [% IF coord_field_1 != 'latitude' %]
39          <p>
40            within <input type="text" name="[% dist_field %]" value="[% dist %]" size="5" maxlength="5" /> metres of<br />
41            [% coord_field_1_name %] <input type="text" name="[% coord_field_1 %]" value="[% coord_field_1_value %]" size="10" maxlength="10" />,<br />
42            [% coord_field_2_name %] <input type="text" name="[% coord_field_2 %]" value="[% coord_field_2_value %]" size="10" maxlength="10" />
43          </p>
44        [% END %]
45          <p>
46            within <input type="text" name="latlong_dist" value="[% dist %]" size="5" maxlength="5" /> metres of<br />
47            latitude (decimal) <input type="text" name="latitude" value="[% latitude %]" size="10" maxlength="10" />,<br />
48            longitude (decimal) <input type="text" name="longitude" value="[% longitude %]" size="10" maxlength="10" />
49          </p>
50        </td>
51      </tr>
52      <tr>
53        <td colspan="2" align="right">
54          <input type="submit" name="go" class="form_button" value="Go" />
55        </td>
56      </tr>
57    </table>
58  </form>
59
60  [% IF search_terms OR dist %]
61
62    <hr />
63
64    [% IF results.size %]
65
66      <ol start="[% first_num %]">
67        [% FOREACH result = results %]
68          <li>
69            <a href="[% result.url %]"><b>[% result.name %]</b></a> (score: [% result.score %])
70            [% IF result.distance %]
71              ([% result.distance %] metres away)
72            [% END %][% IF result.summary %]
73            <div class="hit_summary">
74            [% result.summary %]
75            </div>[% END %]
76          </li>
77        [% END %]
78      </ol>
79
80      <p>
81      Matches [% first_num %] - [% last_num %] of [% total_num %].
82      [% IF (first_num > 20) %]
83        <a href="search.cgi?search=[% search_terms %]&next=[% first_num - 21 %]">Previous 20 results</a>
84      [% END %]
85      [% IF ((first_num > 20) and next_page_startpos) %]
86      /
87      [% END %]
88      [% IF next_page_startpos %]
89        <a href="search.cgi?search=[% search_terms %];[% dist_field %]=[% dist %];[% coord_field_1 %]=[% coord_field_1_value %];[% coord_field_2 %]=[% coord_field_2_value %];next=[% next_page_startpos %]">Next
90        [% IF ((total_num - last_num >= 20)) %]
91          20
92        [% ELSE %]
93          [% total_num - last_num %]
94        [% END %]
95        results</a>
96      [% END %]
97      </p>
98
99    [% ELSE %]
100      <h2>No Items Matched</h2>
101    [% END %] 
102
103  <form method="get" action="search.cgi">
104    <label for="search_lower">Search:</label>
105    <input type="text" name="search" id="search_lower" value="[% search_terms %]" size="50" maxlength="80" value="Search text" onclick="this.value=''" />
106    <input type="submit" name="go" class="form_button" value="Go" />
107  </form>
108  [% END %]
109
110</div>
111[% INCLUDE footer.tt %]
Note: See TracBrowser for help on using the repository browser.