Bug 12164: follow-up: various fixes
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / admin / stopwords.tt
1 [% INCLUDE 'doc-head-open.inc' %]
2 <title>Koha &rsaquo; System administration &rsaquo; Stop words
3 [% IF ( add_form ) %]&rsaquo; [% IF ( searchfield ) %]Modify[% ELSE %]New[% END %] stop word
4 [% ELSIF ( add_validate ) %]&rsaquo; Data recorded
5 [% ELSIF ( delete_confirm ) %]&rsaquo; Delete stop word '[% searchfield %]' ?
6 [% ELSIF ( delete_confirmed ) %]&rsaquo; Data deleted
7 [% END %]
8 </title>
9 [% INCLUDE 'doc-head-close.inc' %]
10 <script type="text/javascript">
11 //<![CDATA[
12     $(document).ready(function() {
13         new YAHOO.widget.Button("newstopword");
14     });
15     function Check(f) {
16         if (f.word.value.length==0) {
17             alert(_("Form not submitted: word missing"));
18         } else {
19             document.Aform.submit();
20         }
21     }
22 //]]>
23 </script>
24 </head>
25 <body id="admin_stopwords" class="admin">
26 [% INCLUDE 'header.inc' %]
27 [% INCLUDE 'stopwords-admin-search.inc' %]
28
29 <div id="breadcrumbs">
30 <a href="/cgi-bin/koha/mainpage.pl">Home</a>
31 &rsaquo; <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a>
32 &rsaquo; <a href="/cgi-bin/koha/admin/stopwords.pl">Stop words</a>
33 [% IF ( add_form ) %]
34     &rsaquo; [% IF ( searchfield ) %]Modify[% ELSE %]New[% END %] Stop word
35 [% ELSIF ( add_validate ) %]
36     &rsaquo; Data recorded
37 [% ELSIF ( delete_confirm ) %]
38     &rsaquo; Delete stop word '[% searchfield %]' ?
39 [% ELSIF ( delete_confirmed ) %]
40     &rsaquo; Data deleted
41 [% END %]
42 </div>
43
44 <div id="doc3" class="yui-t2">
45    
46    <div id="bd">
47         <div id="yui-main">
48         <div class="yui-b">
49
50 [% IF ( add_form ) %]
51         [% IF ( searchfield ) %]
52             <h1>Modify word</h1>
53         [% ELSE %]
54             <h1>New word</h1>
55         [% END %]
56         <form action="[% script_name %]" name="Aform" method="post">
57             <input type="hidden" name="op" value="add_validate" />
58             <fieldset class="rows">
59             <ol><li>
60             [% IF ( searchfield ) %]
61                 <span class="label">Word</span>
62                     <input type="hidden" name="word" value="[% searchfield %]" />[% searchfield %]
63             [% ELSE %]
64                 <label for="word">Word</label>
65                 <input type="text" name="word" id="word" size="50" maxlength="250" onblur="toUC(this)" />
66             [% END %]
67                 </li>
68             </ol>
69             </fieldset>
70             <fieldset class="action">
71                 <input type="button" value="Save" onclick="Check(this.form)" />
72                 <a class="cancel" href="/cgi-bin/koha/admin/stopwords.pl">Cancel</a>
73             </fieldset>
74         </form>
75 [% END %]
76
77 [% IF ( add_validate ) %]
78    <div class="dialog message"> <h3>Data recorded</h3>
79     <form action="[% script_name %]" method="post">
80         <input type="submit" value="OK" class="approve" />
81     </form></div>
82 [% END %]
83
84 [% IF ( delete_confirm ) %]
85     <div class="dialog alert">
86     <h3>Delete stop word <span class="ex">'[% searchfield %]'</span></h3>
87         <form action="[% script_name %]" method="post">
88         <input type="hidden" name="op" value="delete_confirmed" />
89         <input type="hidden" name="searchfield" value="[% searchfield %]" />
90         <input type="submit" value="Yes, Delete" class="approve" />
91     </form>
92     <form action="[% script_name %]" method="get">
93         <input type="submit" class="deny" value="No, Do Not Delete" />
94     </form></div>
95 [% END %]
96
97 [% IF ( delete_confirmed ) %]
98    <div class="dialog message"> <h3>Data deleted</h3>
99     <form action="[% script_name %]" method="post">
100         <input type="submit" value="OK" class="approve" />
101     </form></div>
102 [% END %]
103
104 [% IF ( else ) %]
105
106 <div id="toolbar">
107         <ul class="toolbar">
108     <li><a id="newstopword" href="/cgi-bin/koha/admin/stopwords.pl?op=add_form">New stop word</a></li>
109 </ul></div>
110
111     <h1>Stop words</h1>
112     <p class="message">NOTE : if you change something in this table, ask your administrator to run misc/batchRebuildBiblioTables.pl script.</p>
113
114     [% IF ( searchfield ) %]
115         <p>You searched for <b>[% searchfield %]</b></p>
116     [% END %]
117
118     <table>
119         <tr><th>Word</th>
120             <th></th>
121         </tr>
122         [% FOREACH loo IN loop %]
123            [% IF ( loop.odd ) %]<tr>
124            [% ELSE %]<tr class="highlight">
125            [% END %]
126             <td>[% loo.word %]</td>
127             <td><a href="[% loo.script_name %]?op=delete_confirm&amp;searchfield=[% loo.word %]">Delete</a></td>
128         </tr>
129         [% END %]
130     </table>
131
132     <div class="pages">
133         [% IF ( offsetgtzero ) %]
134             <a href="[% script_name %]?offset=[% prevpage %]">&lt;&lt; Previous</a>
135         [% END %]
136         [% IF ( ltcount ) %]
137             <a href="[% script_name %]?offset=[% nextpage %]">Next &gt;&gt;</a>
138         [% END %]
139     </div>
140 [% END %]
141
142 </div>
143 </div>
144 <div class="yui-b">
145 [% INCLUDE 'admin-menu.inc' %]
146 </div>
147 </div>
148 [% INCLUDE 'intranet-bottom.inc' %]