4 [% PROCESS 'i18n.inc' %]
6 [% INCLUDE 'doc-head-open.inc' %]
7 <title>[% FILTER collapse %]
8 [% IF ( filter_approved_ok ) %]
9 [% t("Approved") | html %] ›
10 [% ELSIF ( filter_approved_pending ) %]
11 [% t("Pending") | html %] ›
12 [% ELSIF ( filter_approved_rej ) %]
13 [% t("Rejected") | html %] ›
15 [% t("Tags") | html %] ›
16 [% t("Tools") | html %] ›
17 [% t("Koha") | html %]
19 [% INCLUDE 'doc-head-close.inc' %]
21 .setlabel {width: 6em; font-family: courier; background-color:#E8E8E8;}
22 .rejected { color: #CC0033; }
23 .approved { color: #339900; }
24 .pending { color: #CCC; font-style: italic; }
25 tr > td input,td input[type="submit"] { font-size: 85%; padding: 1px; }
29 <body id="tags_review" class="tools">
30 [% WRAPPER 'header.inc' %]
31 [% INCLUDE 'cat-search.inc' %]
34 [% WRAPPER 'sub-header.inc' %]
35 [% WRAPPER breadcrumbs %]
36 [% WRAPPER breadcrumb_item %]
37 <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a>
39 [% IF ( filter_approved_ok || filter_approved_pending || filter_approved_rej ) %]
40 [% WRAPPER breadcrumb_item %]
41 <a href="/cgi-bin/koha/tags/review.pl">Tags</a>
44 [% WRAPPER breadcrumb_item bc_active= 1 %]
48 [% IF ( filter_approved_ok ) %]
49 [% WRAPPER breadcrumb_item bc_active= 1 %]
50 [% t("Approved") | html %]
52 [% ELSIF ( filter_approved_pending ) %]
53 [% WRAPPER breadcrumb_item bc_active= 1 %]
54 [% t("Pending") | html %]
56 [% ELSIF ( filter_approved_rej ) %]
57 [% WRAPPER breadcrumb_item bc_active= 1 %]
58 [% t("Rejected") | html %]
61 [% END #/ WRAPPER breadcrumbs %]
62 [% END #/ WRAPPER sub-header.inc %]
64 <div class="main container-fluid">
66 <div class="col-sm-12">
70 <div class="col-sm-8 col-sm-push-2">
72 <form method="post" action="/cgi-bin/koha/tags/review.pl">
74 [% IF ( filter_approved_all ) %]<span>Displaying all terms</span>[% END %]
75 [% IF ( filter_approved_ok ) %]<span>Displaying approved terms</span>[% END %]
76 [% IF ( filter_approved_pending ) %]<span>Displaying pending terms</span>[% END %]
77 [% IF ( filter_approved_rej ) %]<span>Displaying rejected terms</span>[% END %]
81 <div class="dialog message" id="main_status">
82 [% IF ( op == 'approve' ) %] <span>Approved</span>
83 [% ELSIF ( op == 'reject' ) %] <span>Rejected</span>
84 [% ELSIF ( op == 'test' ) %] <span>Tested</span>
85 [% ELSE %]<span>Unknown operation ([% op | html %]) on</span>
87 <span>[% op_count | html %] Term(s).</span>
90 [% IF ( message_loop ) %]
91 <div class="dialog alert" id="main_error">
92 [% FOREACH message_loo IN message_loop %]
93 [% IF ( message_loo.failed_ok ) %]<strong>Error: </strong><span>Failed to approve term ([% message_loo.failed_ok | html %]).</span>
94 [% ELSIF ( message_loo.failed_rej ) %]<strong>Error: </strong><span>Failed to reject term ([% message_loo.failed_rej | html %]).</span>
95 [% ELSIF ( message_loo.approver ) %]<span>No match for user ([% message_loo.approver | html %]). FILTER REQUIRES BORROWERNUMBER (not name).</span>
96 [% ELSIF ( message_loo.approved_by ) %]<strong>Error: </strong><span>No match for borrowernumber ([% message_loo.approved_by | html %]).</span>
97 [% ELSIF ( message_loo.op_zero ) %]<strong>Error: </strong>
98 <span>The root koha user in your KOHA_CONF file
99 (default: kohaadmin) is not a valid tag moderator. These actions are logged
100 by borrowernumber, so the moderator must exist in your borrowers table.
101 Please log in as a different authorized staff user to moderate tags.</span>
102 [% ELSE %]<span>Unrecognized error!</span>
108 [% IF ( pagination_bar ) %]
109 <div class="pages" id="pagination_top">
110 [% pagination_bar | $raw %]
114 <div class="page-section">
115 <p class="check"></p>
119 <th class="NoSort"> </th>
123 <th class="NoSort noExport">Actions</th>
124 [% UNLESS ( filter_approved_pending ) %]<th>Reviewer</th>[% END %]
129 [% FOREACH tagloo IN tagloop %]
132 [% IF ( tagloo.approved == 0 ) %]
133 <input id="checkbox[% offset + loop.count | html %]" type="checkbox" value="[% tagloo.term | html %]" name="tags" class="pending" />
134 [% ELSIF ( tagloo.approved == 1 ) %]
135 <input id="checkbox[% offset + loop.count | html %]" type="checkbox" value="[% tagloo.term | html %]" name="tags" class="approved" />
137 <input id="checkbox[% offset + loop.count | html %]" type="checkbox" value="[% tagloo.term | html %]" name="tags" class="rejected" />
141 [% IF ( tagloo.approved == -1 ) %]
142 <label for="checkbox[% offset + loop.count | html %]">
143 <span class="rejected status[% offset + loop.count | html %]">[% tp('Tags (single)', 'Rejected') | html %]</span>
145 [% ELSIF ( tagloo.approved == 1 ) %]
146 <label for="checkbox[% offset + loop.count | html %]">
147 <span class="approved status[% offset + loop.count | html %]">[% tp('Tags (single)', 'Approved') | html %]</span>
150 <label for="checkbox[% offset + loop.count | html %]">
151 <span class="pending status[% offset + loop.count | html %]">[% tp('Tags (single)', 'Pending') | html %]</span>
155 <td><a href="/cgi-bin/koha/tags/list.pl?tag=[% tagloo.term|uri %]">[% tagloo.term | html %]</a>
157 <td>[% tagloo.weight_total | html %]
159 [% IF ( tagloo.approved ) %]
160 <td class="actions"><span class="ajax_buttons" style="visibility:hidden">
161 [% IF ( tagloo.approved == -1 ) %]
162 <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>
163 <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-times"></i> [% tp('Tags (single)', 'Rejected') | html %]</button>
165 <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> [% tp('Tags (single)', 'Approved') | html %]</button>
166 <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-times"></i> Reject</button>
170 <td>[% IF ( tagloo.approved_by_name ) %]<a href="/cgi-bin/koha/tags/review.pl?approved_by=[% tagloo.approved_by | uri %]&approved=all">[% tagloo.approved_by_name | html %]</a>[% ELSE %] [% END %]
173 <td class="actions"><span class="ajax_buttons" style="visibility:hidden">
174 <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>
175 <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-times"></i> Reject</button>
178 [% UNLESS ( filter_approved_pending ) %]<td> </td>[% END %]
180 <td data-order="[% tagloo.date_approved | html %]">
181 [% tagloo.date_approved | $KohaDates %]
187 </div> <!-- /.page-section -->
189 [% IF ( tagloop ) %]<fieldset class="action">
190 <button type="submit" value="Approve" class="btn btn-default" id="approve_button" name="op-approve"><i class="fa fa-check"></i> Approve</button>
191 <button type="submit" value="Reject" class="btn btn-default" id="reject_button" name="op-reject"><i class="fa fa-times"></i> Reject</button>
195 <div class="col-sm-2 col-sm-push-2">
197 <fieldset class="brief">
198 <h4>Terms summary</h4>
200 <li><a href="/cgi-bin/koha/tags/review.pl?approved=1">[% tp('Tags (multiple)', 'Approved') | html %]</a>:
201 <span id="terms_summary_approved_count">[% approved_count | html %]</span>
203 <li><a href="/cgi-bin/koha/tags/review.pl?approved=-1">[% tp('Tags (multiple)', 'Rejected') | html %]</a>:
204 <span id="terms_summary_rejected_count">[% rejected_count | html %]</span>
206 <li><a href="/cgi-bin/koha/tags/review.pl?approved=0">[% tp('Tags (multiple)', 'Pending') | html %]</a>:
207 <span id="terms_summary_unapproved_count">[% unapproved_count | html %]</span>
209 <li><a href="/cgi-bin/koha/tags/review.pl?approved=all">Total</a>:
210 <span id="terms_summary_approved_total">[% approved_total | html %]</span>
213 <span id="terms_summary_status"> </span>
215 <fieldset class="brief">
217 <div class="description">Enter a word or phrase to check against approved/rejected lists: </div>
218 <form method="post" action="/cgi-bin/koha/tags/review.pl">
219 <input type="text" size="14" name="test" id="test" />
220 <fieldset class="action"><button type="submit" value="Test" class="approval_btn btn btn-default btn-sm" id="test_button" name="op-test"><i class="fas fa-check-square" aria-hidden="true"></i> Test</button></fieldset>
222 [% IF ( test_term ) %]
223 [% IF ( verdict_ok ) %]
224 <span>"[% test_term | html %]" is permitted.</span>
225 [% ELSIF ( verdict_rej ) %]
226 <span>"[% test_term | html %]" is prohibited.</span>
227 [% ELSIF ( verdict_indeterminate ) %]
228 <span>"[% test_term | html %]" is neither permitted nor prohibited.</span>
236 <div class="col-sm-2 col-sm-pull-10">
238 <form method="post" action="/cgi-bin/koha/tags/review.pl">
239 <fieldset class="brief">
242 <li><label for="tag">Term:</label> <input type="text" name="tag" id="tag" value="[% filter_tag | html %]" />
244 <li><label for="approved">Status:</label>
245 <select name="approved" id="approved">
246 [% IF ( filter_approved_all ) %]<option selected="selected" value="all">all</option>
247 [% ELSE %]<option value="all">all</option>[% END %]
248 [% IF ( filter_approved_ok ) %]<option selected="selected" value="1">approved</option>
249 [% ELSE %]<option value="1">approved</option>[% END %]
250 [% IF ( filter_approved_pending ) %]<option selected="selected" value="0">pending</option>
251 [% ELSE %]<option value="0">pending</option>[% END %]
252 [% IF ( filter_approved_rej ) %]<option selected="selected" value="-1">rejected</option>
253 [% ELSE %]<option value="-1">rejected</option>[% END %]
256 <li><label for="approver">Reviewer:</label> <input type="text" name="approver" id="approver" value="[% filter_approver | html %]" />
259 <label for="from">Date: from </label>
260 <input type="text" size="10" id="from" name="from" value="[% filter_date_approved_from | html %]" class="flatpickr" data-date_to="to" />
261 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
263 <label for="to">...to </label>
264 <input type="text" size="10" id="to" name="to" value="[% filter_date_approved_to | html %]" class="flatpickr" />
265 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
268 <fieldset class="action"><button type="submit" class="btn btn-primary btn-sm"><i class="fa fa-filter" aria-hidden="true"></i> Apply filter(s)</button></fieldset>
272 [% INCLUDE 'tools-menu.inc' %]
281 [% MACRO jsinclude BLOCK %]
282 [% INCLUDE 'datatables.inc' %]
283 [% INCLUDE 'calendar.inc' %]
284 [% Asset.js("js/pages/tags-review.js") | $raw %]
287 [% INCLUDE 'intranet-bottom.inc' %]