5 [% INCLUDE 'doc-head-open.inc' %]
6 <title>[% IF ( do_it ) %]Review[% ELSE %]Review tags[% END %] › Tags › Tools › Koha</title>
7 [% INCLUDE 'doc-head-close.inc' %]
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; }
17 <body id="tags_review" class="tools">
18 [% WRAPPER 'header.inc' %]
19 [% INCLUDE 'cat-search.inc' %]
22 [% WRAPPER 'sub-header.inc' %]
23 <nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumb">
26 <a href="/cgi-bin/koha/mainpage.pl">Home</a>
29 <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a>
32 <a href="#" aria-current="page">
40 <div class="main container-fluid">
42 <div class="col-sm-12">
46 <div class="col-sm-8 col-sm-push-2">
48 <form method="post" action="/cgi-bin/koha/tags/review.pl">
49 <h4><span>Displaying</span>
50 [% IF ( filter_approved_all ) %]<span>all</span>[% END %]
51 [% IF ( filter_approved_ok ) %]<span>approved</span>[% END %]
52 [% IF ( filter_approved_pending ) %]<span>pending</span>[% END %]
53 [% IF ( filter_approved_rej ) %]<span>rejected</span>[% END %]
58 <div class="dialog message" id="main_status">
59 [% IF ( op == 'approve' ) %] <span>Approved</span>
60 [% ELSIF ( op == 'reject' ) %] <span>Rejected</span>
61 [% ELSIF ( op == 'test' ) %] <span>Tested</span>
62 [% ELSE %]<span>Unknown operation ([% op | html %]) on</span>
64 <span>[% op_count | html %] Term(s).</span>
67 [% IF ( message_loop ) %]
68 <div class="dialog alert" id="main_error">
69 [% FOREACH message_loo IN message_loop %]
70 [% IF ( message_loo.failed_ok ) %]<strong>Error: </strong><span>Failed to approve term ([% message_loo.failed_ok | html %]).</span>
71 [% ELSIF ( message_loo.failed_rej ) %]<strong>Error: </strong><span>Failed to reject term ([% message_loo.failed_rej | html %]).</span>
72 [% ELSIF ( message_loo.approver ) %]<span>No match for user ([% message_loo.approver | html %]). FILTER REQUIRES BORROWERNUMBER (not name).</span>
73 [% ELSIF ( message_loo.approved_by ) %]<strong>Error: </strong><span>No match for borrowernumber ([% message_loo.approved_by | html %]).</span>
74 [% ELSIF ( message_loo.op_zero ) %]<strong>Error: </strong>
75 <span>The root koha user in your KOHA_CONF file
76 (default: kohaadmin) is not a valid tag moderator. These actions are logged
77 by borrowernumber, so the moderator must exist in your borrowers table.
78 Please log in as a different authorized staff user to moderate tags.</span>
79 [% ELSE %]<span>Unrecognized error!</span>
85 [% IF ( pagination_bar ) %]
86 <div class="pages" id="pagination_top">
87 [% pagination_bar | $raw %]
91 <div class="page-section">
96 <th class="NoSort"> </th>
100 <th class="NoSort noExport">Actions</th>
101 [% UNLESS ( filter_approved_pending ) %]<th>Reviewer</th>[% END %]
106 [% FOREACH tagloo IN tagloop %]
109 [% IF ( tagloo.approved == 0 ) %]
110 <input id="checkbox[% offset + loop.count | html %]" type="checkbox" value="[% tagloo.term | html %]" name="tags" class="pending" />
111 [% ELSIF ( tagloo.approved == 1 ) %]
112 <input id="checkbox[% offset + loop.count | html %]" type="checkbox" value="[% tagloo.term | html %]" name="tags" class="approved" />
114 <input id="checkbox[% offset + loop.count | html %]" type="checkbox" value="[% tagloo.term | html %]" name="tags" class="rejected" />
118 [% IF ( tagloo.approved == -1 ) %]
119 <label for="checkbox[% offset + loop.count | html %]">
120 <span class="rejected status[% offset + loop.count | html %]">Rejected</span>
122 [% ELSIF ( tagloo.approved == 1 ) %]
123 <label for="checkbox[% offset + loop.count | html %]">
124 <span class="approved status[% offset + loop.count | html %]">Approved</span>
127 <label for="checkbox[% offset + loop.count | html %]">
128 <span class="pending status[% offset + loop.count | html %]">Pending</span>
132 <td><a href="/cgi-bin/koha/tags/list.pl?tag=[% tagloo.term|uri %]">[% tagloo.term | html %]</a>
134 <td>[% tagloo.weight_total | html %]
136 [% IF ( tagloo.approved ) %]
137 <td class="actions"><span class="ajax_buttons" style="visibility:hidden">
138 [% IF ( tagloo.approved == -1 ) %]
139 <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>
140 <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>
142 <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>
143 <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>
147 <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 %]
150 <td class="actions"><span class="ajax_buttons" style="visibility:hidden">
151 <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>
152 <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>
155 [% UNLESS ( filter_approved_pending ) %]<td> </td>[% END %]
157 <td data-order="[% tagloo.date_approved | html %]">
158 [% tagloo.date_approved | $KohaDates %]
164 </div> <!-- /.page-section -->
166 [% IF ( tagloop ) %]<fieldset class="action">
167 <button type="submit" value="Approve" class="btn btn-default" id="approve_button" name="op-approve"><i class="fa fa-check"></i> Approve</button>
168 <button type="submit" value="Reject" class="btn btn-default" id="reject_button" name="op-reject"><i class="fa fa-remove"></i> Reject</button>
172 <div class="col-sm-2 col-sm-push-2">
174 <fieldset class="brief">
175 <h4>Terms summary</h4>
177 <li><a href="/cgi-bin/koha/tags/review.pl?approved=1">Approved</a>:
178 <span id="terms_summary_approved_count">[% approved_count | html %]</span>
180 <li><a href="/cgi-bin/koha/tags/review.pl?approved=-1">Rejected</a>:
181 <span id="terms_summary_rejected_count">[% rejected_count | html %]</span>
183 <li><a href="/cgi-bin/koha/tags/review.pl?approved=0">Pending</a>:
184 <span id="terms_summary_unapproved_count">[% unapproved_count | html %]</span>
186 <li><a href="/cgi-bin/koha/tags/review.pl?approved=all">Total</a>:
187 <span id="terms_summary_approved_total">[% approved_total | html %]</span>
190 <span id="terms_summary_status"> </span>
192 <fieldset class="brief">
194 <div class="description">Enter a word or phrase to check against approved/rejected lists: </div>
195 <form method="post" action="/cgi-bin/koha/tags/review.pl">
196 <input type="text" size="14" name="test" id="test" />
197 <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>
199 [% IF ( test_term ) %]
200 [% IF ( verdict_ok ) %]
201 <span>"[% test_term | html %]" is permitted.</span>
202 [% ELSIF ( verdict_rej ) %]
203 <span>"[% test_term | html %]" is prohibited.</span>
204 [% ELSIF ( verdict_indeterminate ) %]
205 <span>"[% test_term | html %]" is neither permitted nor prohibited.</span>
213 <div class="col-sm-2 col-sm-pull-10">
215 <form method="post" action="/cgi-bin/koha/tags/review.pl">
216 <fieldset class="brief">
219 <li><label for="tag">Term:</label> <input type="text" name="tag" id="tag" value="[% filter_tag | html %]" />
221 <li><label for="approved">Status:</label>
222 <select name="approved" id="approved">
223 [% IF ( filter_approved_all ) %]<option selected="selected" value="all">all</option>
224 [% ELSE %]<option value="all">all</option>[% END %]
225 [% IF ( filter_approved_ok ) %]<option selected="selected" value="1">approved</option>
226 [% ELSE %]<option value="1">approved</option>[% END %]
227 [% IF ( filter_approved_pending ) %]<option selected="selected" value="0">pending</option>
228 [% ELSE %]<option value="0">pending</option>[% END %]
229 [% IF ( filter_approved_rej ) %]<option selected="selected" value="-1">rejected</option>
230 [% ELSE %]<option value="-1">rejected</option>[% END %]
233 <li><label for="approver">Reviewer:</label> <input type="text" name="approver" id="approver" value="[% filter_approver | html %]" />
236 <label for="from">Date: from </label>
237 <input type="text" size="10" id="from" name="from" value="[% filter_date_approved_from | html %]" class="flatpickr" data-date_to="to" />
238 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
240 <label for="to">...to </label>
241 <input type="text" size="10" id="to" name="to" value="[% filter_date_approved_to | html %]" class="flatpickr" />
242 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
245 <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>
255 [% MACRO jsinclude BLOCK %]
256 [% INCLUDE 'datatables.inc' %]
257 [% INCLUDE 'calendar.inc' %]
258 [% Asset.js("js/pages/tags-review.js") | $raw %]
261 [% INCLUDE 'intranet-bottom.inc' %]