Bug 26118: Move translatable strings out of tags/review.tt and into tags-review.js
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / tags / review.tt
1 [% USE raw %]
2 [% USE Asset %]
3 [% USE KohaDates %]
4 [% SET footerjs = 1 %]
5 [% INCLUDE 'doc-head-open.inc' %]
6 <title>Koha &rsaquo; Tools &rsaquo; Tags &rsaquo; [% IF ( do_it ) %]Review &rsaquo; [% ELSE %]Review tags[% END %]</title>
7 [% INCLUDE 'doc-head-close.inc' %]
8 <style>
9 .setlabel {width: 6em; font-family: courier; background-color:#E8E8E8;}
10 .rejected { color: #CC0033; }
11 .approved { color: #339900; }
12 .pending { color: #CCC; font-style: italic; }
13 tr > td input,td input[type="submit"] { font-size: 85%; padding: 1px; }
14 </style>
15 </head>
16
17 <body id="tags_review" class="tools">
18 [% INCLUDE 'header.inc' %]
19 [% INCLUDE 'cat-search.inc' %]
20
21 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> &rsaquo; Tags</div>
22
23 <div class="main container-fluid">
24     <div class="row">
25         <div class="col-sm-12">
26             <main>
27
28 <div class="row">
29 <div class="col-sm-8 col-sm-push-2">
30 <h1>Tags</h1>
31 <form method="post" action="/cgi-bin/koha/tags/review.pl" class="checkboxed">
32   <h4>Displaying 
33         [% IF ( filter_approved_all ) %]all[% END %]
34         [% IF ( filter_approved_ok ) %]approved[% END %]
35         [% IF ( filter_approved_pending ) %]pending[% END %]
36         [% IF ( filter_approved_rej ) %]rejected[% END %]
37         terms
38   </h4>
39
40   [% IF ( op_count ) %]
41   <div class="dialog message" id="main_status">
42                 [% IF ( op == 'approve' ) %]            Approved
43                 [% ELSIF ( op == 'reject' ) %]  Rejected
44                 [% ELSIF ( op == 'test' ) %]            Tested
45                 [% ELSE %]Unknown Operation ([% op | html %]) on
46                 [% END %]
47         [% op_count | html %] Term(s).
48   </div>
49   [% END %]
50   [% IF ( message_loop ) %]
51   <div class="dialog alert" id="main_error">
52     [% FOREACH message_loo IN message_loop %]
53         [% IF ( message_loo.date_from ) %]<strong>Error: </strong>"Date from" is not a legal value ("[% message_loo.date_from | html %]").
54         [% ELSIF ( message_loo.date_to ) %]<strong>Error: </strong>"Date to" is not a legal value ("[% message_loo.date_to | html %]").
55         [% ELSIF ( message_loo.failed_ok ) %]<strong>Error: </strong>Failed to approve term ([% message_loo.failed_ok | html %]).
56         [% ELSIF ( message_loo.failed_rej ) %]<strong>Error: </strong>Failed to reject term ([% message_loo.failed_rej | html %]).
57         [% ELSIF ( message_loo.approver ) %]No match for user ([% message_loo.approver | html %]). FILTER REQUIRES BORROWERNUMBER (not name).
58         [% ELSIF ( message_loo.approved_by ) %]<strong>Error: </strong>No match for borrowernumber ([% message_loo.approved_by | html %]).
59         [% ELSIF ( message_loo.op_zero ) %]<strong>Error: </strong> The root koha user in your KOHA_CONF file
60             (default: kohaadmin) is not a valid tag moderator. These actions are logged
61             by borrowernumber, so the moderator must exist in your borrowers table.
62             Please log in as a different authorized staff user to moderate tags.
63         [% ELSE %]Unrecognized error!
64         [% END %]
65             <br />
66         [% END %]
67   </div>
68   [% END %]
69   [% IF ( pagination_bar ) %]
70   <div class="pages" id="pagination_top">
71     [% pagination_bar | $raw %]
72   </div>
73   [% END %]
74   [% IF ( tagloop ) %]
75   <p class="check"></p>
76   <table id="tagst">
77     <thead>
78         <tr>
79             <th class="NoSort">&nbsp;</th>
80             <th class="NoSort">&nbsp;</th>
81                 <th>Status</th>
82                 <th>Term</th>
83                 <th>Weight</th>
84             <th class="NoSort">Actions</th>
85             [% UNLESS ( filter_approved_pending ) %]<th>Reviewer</th>[% END %]
86         <th class="title-string">Date</th>
87         </tr>
88     </thead>
89     <tbody>
90     [% FOREACH tagloo IN tagloop %]
91         <tr>
92             <td class="count">[% offset + loop.count | html %]
93             </td>
94                 [% IF ( tagloo.approved == 0 ) %]<td><span><input type="checkbox" value="[% tagloo.term | html %]" name="tags" class="pending" /></span>
95                 [% ELSE %]<td><span><input type="checkbox" value="[% tagloo.term | html %]" name="tags" /></span>[% END %]
96             </td>
97             <td>
98                 [% IF ( tagloo.approved == -1 ) %]
99                     <span class="rejected status[% offset + loop.count | html %]">Rejected</span>
100                 [% ELSIF ( tagloo.approved == 1 ) %]
101                     <span class="approved status[% offset + loop.count | html %]">Approved</span>
102                 [% ELSE %]
103                     <span class="pending status[% offset + loop.count | html %]">Pending</span>
104                 [% END %]
105             </td>
106             <td><a href="/cgi-bin/koha/tags/list.pl?tag=[% tagloo.term|uri %]">[% tagloo.term | html %]</a>
107             </td>
108             <td>[% tagloo.weight_total | html %]
109             </td>
110             [% IF ( tagloo.approved ) %]
111             <td class="actions"><span class="ajax_buttons" style="visibility:hidden">
112                 [% IF ( tagloo.approved == -1 ) %]
113                     <button data-num="[% offset + loop.count | html %]" class="approval_btn ok btn btn-default btn-xs" type="submit" title="[% tagloo.term | html %]" value="Approve" name="approve"><i class="fa fa-check"></i> Approve</button>
114                     <button data-num="[% offset + loop.count | html %]" class="approval_btn rej btn btn-default btn-xs" disabled="disabled" type="submit" title="[% tagloo.term | html %]" value="Rejected" name="reject"><i class="fa fa-remove"></i> Rejected</button>
115                 [% ELSE %]
116                     <button data-num="[% offset + loop.count | html %]" class="approval_btn ok btn btn-default btn-xs"  disabled="disabled" type="submit" title="[% tagloo.term | html %]" value="Approved" name="approve"><i class="fa fa-check"></i> Approved</button>
117                     <button data-num="[% offset + loop.count | html %]" class="approval_btn rej btn btn-default btn-xs" type="submit" title="[% tagloo.term | html %]" value="Reject" name="reject"><i class="fa fa-remove"></i> Reject</button>
118                 [% END %]
119                 </span>
120             </td>
121             <td>[% IF ( tagloo.approved_by_name ) %]<a href="/cgi-bin/koha/tags/review.pl?approved_by=[% tagloo.approved_by | uri %]&amp;approved=all">[% tagloo.approved_by_name | html %]</a>[% ELSE %]&nbsp;[% END %]
122             </td>
123             [% ELSE %]
124             <td class="actions"><span class="ajax_buttons" style="visibility:hidden">
125                 <button data-num="[% offset + loop.count | html %]" class="approval_btn ok btn btn-default btn-xs"  type="submit" title="[% tagloo.term | html %]" value="Approve" name="approve"><i class="fa fa-check"></i> Approve</button>
126                 <button data-num="[% offset + loop.count | html %]" class="approval_btn rej btn btn-default btn-xs" type="submit" title="[% tagloo.term | html %]" value="Reject" name="reject"><i class="fa fa-remove"></i> Reject</button>
127                 </span>
128             </td>
129             [% UNLESS ( filter_approved_pending ) %]<td>&nbsp;</td>[% END %]
130             [% END %]
131             <td>
132                 <span title="[% tagloo.date_approved | html %]">[% tagloo.date_approved | $KohaDates %]</span>
133             </td>
134         </tr>
135     [% END %]
136     </tbody>
137   </table>
138   [% END %]
139     [% IF ( tagloop ) %]<fieldset class="action">
140    <button type="submit" value="Approve" class="btn btn-default" id="approve_button" name="op-approve"><i class="fa fa-check"></i> Approve</button>
141    <button type="submit" value="Reject" class="btn btn-default"  id="reject_button" name="op-reject"><i class="fa fa-remove"></i> Reject</button>
142   </fieldset>[% END %]
143   </form>
144 </div>
145 <div class="col-sm-2 col-sm-push-2">
146     <aside>
147  <fieldset class="brief">
148   <h4>Terms summary</h4>
149   <ul>
150     <li><a href="/cgi-bin/koha/tags/review.pl?approved=1">Approved</a>:
151         <span id="terms_summary_approved_count">[% approved_count | html %]</span>
152         </li>
153     <li><a href="/cgi-bin/koha/tags/review.pl?approved=-1">Rejected</a>:
154         <span id="terms_summary_rejected_count">[% rejected_count | html %]</span>
155     </li>
156     <li><a href="/cgi-bin/koha/tags/review.pl?approved=0">Pending</a>:
157     <span id="terms_summary_unapproved_count">[% unapproved_count | html %]</span>
158     </li>
159     <li><a href="/cgi-bin/koha/tags/review.pl?approved=all">Total</a>:
160         <span id="terms_summary_approved_total">[% approved_total | html %]</span>
161     </li>
162   </ul>
163   <span id="terms_summary_status">&nbsp;</span>
164   </fieldset>
165   <fieldset class="brief">
166    <h4>Check lists</h4>
167    <div class="description">Enter a word or phrase to check against approved/rejected lists: </div>
168    <form method="post" action="/cgi-bin/koha/tags/review.pl">
169    <input type="text" size="14" name="test" id="test" />
170    <fieldset class="action"><button type="submit" value="Test" class="approval_btn btn btn-default btn-sm" id="test_button" name="op-test"><i class="fa fa-check-square-o" aria-hidden="true"></i> Test</button></fieldset>
171    <div id="verdict">
172         [% IF ( test_term ) %]
173         [% IF ( verdict_ok ) %]
174                 &quot;[% test_term | html %]&quot; is permitted.
175         [% ELSIF ( verdict_rej ) %]
176                 &quot;[% test_term | html %]&quot; is prohibited.
177         [% ELSIF ( verdict_indeterminate ) %]
178                 &quot;[% test_term | html %]&quot; is neither permitted nor prohibited.
179         [% END %]
180         [% END %]
181    </div>
182    </form>
183   </fieldset>
184     </aside>
185 </div>
186 <div class="col-sm-2 col-sm-pull-10">
187     <aside>
188 <form method="post" action="/cgi-bin/koha/tags/review.pl">
189 <fieldset class="brief">
190   <h4>Filters</h4>
191         <ol>
192             <li><label for="tag">Term:</label> <input type="text" name="tag" id="tag" value="[% filter_tag | html %]" />
193             </li>
194             <li><label for="approved">Status:</label>
195             <select name="approved" id="approved">
196             [% IF ( filter_approved_all ) %]<option selected="selected" value="all">all</option>
197             [% ELSE %]<option value="all">all</option>[% END %]
198             [% IF ( filter_approved_ok ) %]<option selected="selected" value="1">approved</option>
199             [% ELSE %]<option value="1">approved</option>[% END %]
200             [% IF ( filter_approved_pending ) %]<option selected="selected" value="0">pending</option>
201             [% ELSE %]<option value="0">pending</option>[% END %]
202             [% IF ( filter_approved_rej ) %]<option selected="selected" value="-1">rejected</option>
203             [% ELSE %]<option value="-1">rejected</option>[% END %]
204                         </select>
205             </li>
206             <li><label for="approver">Reviewer:</label> <input type="text" name="approver" id="approver" value="[% filter_approver | html %]" />
207             </li>
208             <li>
209                         <label for="from">Date: from </label>
210             <input type="text" size="10" id="from" name="from" value="[% filter_date_approved_from | html %]" class="datepickerfrom" />
211                         <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
212
213                         <label for="to">...to </label>
214             <input type="text" size="10" id="to" name="to" value="[% filter_date_approved_to | html %]" class="datepickerto" />
215                         <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
216             </li>
217   </ol>
218  <fieldset class="action"><button type="submit" class="btn btn-default btn-sm"><i class="fa fa-filter" aria-hidden="true"></i> Apply filter(s)</button></fieldset>
219 </fieldset>
220 </form>
221 </aside>
222 </div>
223 </div>
224 </main>
225 </div>
226 </div>
227
228 [% MACRO jsinclude BLOCK %]
229     [% INCLUDE 'datatables.inc' %]
230     [% INCLUDE 'calendar.inc' %]
231     [% Asset.js("lib/jquery/plugins/jquery.checkboxes.min.js") | $raw %]
232     [% Asset.js("js/pages/tags-review.js") | $raw %]
233 [% END %]
234
235 [% INCLUDE 'intranet-bottom.inc' %]