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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 275 - (show annotations)
Sat Dec 17 03:20:19 2005 UTC (18 years, 4 months ago) by dpavlin
File size: 2723 byte(s)
 r11753@llin:  dpavlin | 2005-12-17 08:19:38 +0100
 semi-working version: added filtering by databases (using STRRX Hyper Estraier
 operator because number of attributes when searching is limited to 9),
 added link to search from editor and fixed load_template URI (needs /ajax)

1 [% INCLUDE header.tt %]
2
3 [% url = base _ 'search/suggest/' %]
4
5 [% c.prototype.form_remote_tag(
6 url => base _ 'search/results',
7 update => 'results',
8 loading => 'show_searching();',
9 loaded => 'hide_searching();',
10 html_options => {
11 id => 'results_form',
12 name => 'results_form',
13 }
14 ) %]
15
16 <table>
17
18 <tr>
19 <td>
20 Sve:
21 </td><td>
22 <input autocomplete="off" id="sve_input" name="all" type="text" value="" size="60"/>
23 <span id="sve_input_loading" style="display: none;">
24 <img src="/img/indicator.gif" />
25 </span>
26
27 <div class="auto_complete" id="sve_input_auto_complete"></div>
28 [% c.prototype.auto_complete_field( 'sve_input', {
29 url => url _ 'TitleProper',
30 indicator => 'sve_input_loading',
31 frequency => 0.8,
32 } ) %]
33 <!-- operator for individual words -->
34 <input type="hidden" name="_all" value="AND" />
35 </td>
36
37 </tr><tr>
38
39 <td>
40 Naslov:
41 </td><td>
42 <input autocomplete="off" id="naslov_input" name="TitleProper" type="text" value="" size="60"/>
43 <span id="naslov_input_loading" style="display: none;">
44 <img src="/img/indicator.gif" />
45 </span>
46
47 <div class="auto_complete" id="naslov_input_auto_complete"></div>
48 [% c.prototype.auto_complete_field( 'naslov_input', {
49 url => url _ 'TitleProper',
50 indicator => 'naslov_input_loading',
51 frequency => 0.8,
52 } ) %]
53 </td>
54
55 </tr><tr>
56
57 <td>
58 Autor:
59 </td><td>
60 <input autocomplete="off" id="autor_input" name="Names" type="text" value="" size="60"/>
61 <span id="autor_input_loading" style="display: none;">
62 <img src="/img/indicator.gif" />
63 </span>
64 <div class="auto_complete" id="autor_input_auto_complete"></div>
65 [% c.prototype.auto_complete_field( 'autor_input', {
66 url => url _ 'Names',
67 indicator => 'autor_input_loading',
68 frequency => 0.8,
69 } ) %]
70 </td>
71
72 </tr>
73 </table>
74
75 <!-- additional fields which might get updated by javascript -->
76 <input name="_template" type="hidden" id="template_name" />
77 <input name="_page" type="hidden" id="page_nr" />
78 <input name="_ajax" type="hidden" value="0" id="_ajax" />
79
80 <div class="databases">
81 <a href="#" onclick="return toggleLinkAndElement( this, 'database_list', 'Select databases');">Databases</a>
82 <div id="database_list">
83 <ul>
84 [% FOREACH db = c.comp('Model::Databases').list.sort('name') %]
85 <li><input type="checkbox" name="_database" value="[% db.prefix %]">[% db.name %]</li>
86 [% END %]
87 </ul>
88 </div>
89 </div>
90
91 <input type="submit" name="_submit" value="Search"
92 onclick="reset_page_nr( 1 ); return true;"
93 />
94
95 <span id="searching" style="display: none;">
96 Search in progress...
97 <img src="/img/indicator.gif" />
98 </span>
99
100 <input type="reset" name="_reset" value="Clear" />
101
102 </form>
103
104 <div id="results">
105 [% IF results ; results ; ELSE %]
106 <span class="notice">No results yet.</span>
107 [% END %]
108 </div>
109
110 [% INCLUDE footer.tt %]

  ViewVC Help
Powered by ViewVC 1.1.26