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 [% INCLUDE 'header.inc' %]
19 [% INCLUDE 'cat-search.inc' %]
21 <nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumb">
24 <a href="/cgi-bin/koha/mainpage.pl">Home</a>
27 <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a>
30 <a href="#" aria-current="page">
37 <div class="main container-fluid">
39 <div class="col-sm-12">
43 <div class="col-sm-8 col-sm-push-2">
45 <form method="post" action="/cgi-bin/koha/tags/review.pl">
47 [% IF ( filter_approved_all ) %]all[% END %]
48 [% IF ( filter_approved_ok ) %]approved[% END %]
49 [% IF ( filter_approved_pending ) %]pending[% END %]
50 [% IF ( filter_approved_rej ) %]rejected[% END %]
55 <div class="dialog message" id="main_status">
56 [% IF ( op == 'approve' ) %] Approved
57 [% ELSIF ( op == 'reject' ) %] Rejected
58 [% ELSIF ( op == 'test' ) %] Tested
59 [% ELSE %]Unknown operation ([% op | html %]) on
61 [% op_count | html %] Term(s).
64 [% IF ( message_loop ) %]
65 <div class="dialog alert" id="main_error">
66 [% FOREACH message_loo IN message_loop %]
67 [% IF ( message_loo.date_from ) %]<strong>Error: </strong>"Date from" is not a legal value ("[% message_loo.date_from | html %]").
68 [% ELSIF ( message_loo.date_to ) %]<strong>Error: </strong>"Date to" is not a legal value ("[% message_loo.date_to | html %]").
69 [% ELSIF ( message_loo.failed_ok ) %]<strong>Error: </strong>Failed to approve term ([% message_loo.failed_ok | html %]).
70 [% ELSIF ( message_loo.failed_rej ) %]<strong>Error: </strong>Failed to reject term ([% message_loo.failed_rej | html %]).
71 [% ELSIF ( message_loo.approver ) %]No match for user ([% message_loo.approver | html %]). FILTER REQUIRES BORROWERNUMBER (not name).
72 [% ELSIF ( message_loo.approved_by ) %]<strong>Error: </strong>No match for borrowernumber ([% message_loo.approved_by | html %]).
73 [% ELSIF ( message_loo.op_zero ) %]<strong>Error: </strong> The root koha user in your KOHA_CONF file
74 (default: kohaadmin) is not a valid tag moderator. These actions are logged
75 by borrowernumber, so the moderator must exist in your borrowers table.
76 Please log in as a different authorized staff user to moderate tags.
77 [% ELSE %]Unrecognized error!
83 [% IF ( pagination_bar ) %]
84 <div class="pages" id="pagination_top">
85 [% pagination_bar | $raw %]
93 <th class="NoSort"> </th>
97 <th class="NoSort noExport">Actions</th>
98 [% UNLESS ( filter_approved_pending ) %]<th>Reviewer</th>[% END %]
103 [% FOREACH tagloo IN tagloop %]
106 [% IF ( tagloo.approved == 0 ) %]
107 <input id="checkbox[% offset + loop.count | html %]" type="checkbox" value="[% tagloo.term | html %]" name="tags" class="pending" />
108 [% ELSIF ( tagloo.approved == 1 ) %]
109 <input id="checkbox[% offset + loop.count | html %]" type="checkbox" value="[% tagloo.term | html %]" name="tags" class="approved" />
111 <input id="checkbox[% offset + loop.count | html %]" type="checkbox" value="[% tagloo.term | html %]" name="tags" class="rejected" />
115 [% IF ( tagloo.approved == -1 ) %]
116 <label for="checkbox[% offset + loop.count | html %]">
117 <span class="rejected status[% offset + loop.count | html %]">Rejected</span>
119 [% ELSIF ( tagloo.approved == 1 ) %]
120 <label for="checkbox[% offset + loop.count | html %]">
121 <span class="approved status[% offset + loop.count | html %]">Approved</span>
124 <label for="checkbox[% offset + loop.count | html %]">
125 <span class="pending status[% offset + loop.count | html %]">Pending</span>
129 <td><a href="/cgi-bin/koha/tags/list.pl?tag=[% tagloo.term|uri %]">[% tagloo.term | html %]</a>
131 <td>[% tagloo.weight_total | html %]
133 [% IF ( tagloo.approved ) %]
134 <td class="actions"><span class="ajax_buttons" style="visibility:hidden">
135 [% IF ( tagloo.approved == -1 ) %]
136 <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>
137 <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>
139 <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>
140 <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>
144 <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 %]
147 <td class="actions"><span class="ajax_buttons" style="visibility:hidden">
148 <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>
149 <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>
152 [% UNLESS ( filter_approved_pending ) %]<td> </td>[% END %]
154 <td data-order="[% tagloo.date_approved | html %]">
155 [% tagloo.date_approved | $KohaDates %]
162 [% IF ( tagloop ) %]<fieldset class="action">
163 <button type="submit" value="Approve" class="btn btn-default" id="approve_button" name="op-approve"><i class="fa fa-check"></i> Approve</button>
164 <button type="submit" value="Reject" class="btn btn-default" id="reject_button" name="op-reject"><i class="fa fa-remove"></i> Reject</button>
168 <div class="col-sm-2 col-sm-push-2">
170 <fieldset class="brief">
171 <h4>Terms summary</h4>
173 <li><a href="/cgi-bin/koha/tags/review.pl?approved=1">Approved</a>:
174 <span id="terms_summary_approved_count">[% approved_count | html %]</span>
176 <li><a href="/cgi-bin/koha/tags/review.pl?approved=-1">Rejected</a>:
177 <span id="terms_summary_rejected_count">[% rejected_count | html %]</span>
179 <li><a href="/cgi-bin/koha/tags/review.pl?approved=0">Pending</a>:
180 <span id="terms_summary_unapproved_count">[% unapproved_count | html %]</span>
182 <li><a href="/cgi-bin/koha/tags/review.pl?approved=all">Total</a>:
183 <span id="terms_summary_approved_total">[% approved_total | html %]</span>
186 <span id="terms_summary_status"> </span>
188 <fieldset class="brief">
190 <div class="description">Enter a word or phrase to check against approved/rejected lists: </div>
191 <form method="post" action="/cgi-bin/koha/tags/review.pl">
192 <input type="text" size="14" name="test" id="test" />
193 <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>
195 [% IF ( test_term ) %]
196 [% IF ( verdict_ok ) %]
197 "[% test_term | html %]" is permitted.
198 [% ELSIF ( verdict_rej ) %]
199 "[% test_term | html %]" is prohibited.
200 [% ELSIF ( verdict_indeterminate ) %]
201 "[% test_term | html %]" is neither permitted nor prohibited.
209 <div class="col-sm-2 col-sm-pull-10">
211 <form method="post" action="/cgi-bin/koha/tags/review.pl">
212 <fieldset class="brief">
215 <li><label for="tag">Term:</label> <input type="text" name="tag" id="tag" value="[% filter_tag | html %]" />
217 <li><label for="approved">Status:</label>
218 <select name="approved" id="approved">
219 [% IF ( filter_approved_all ) %]<option selected="selected" value="all">all</option>
220 [% ELSE %]<option value="all">all</option>[% END %]
221 [% IF ( filter_approved_ok ) %]<option selected="selected" value="1">approved</option>
222 [% ELSE %]<option value="1">approved</option>[% END %]
223 [% IF ( filter_approved_pending ) %]<option selected="selected" value="0">pending</option>
224 [% ELSE %]<option value="0">pending</option>[% END %]
225 [% IF ( filter_approved_rej ) %]<option selected="selected" value="-1">rejected</option>
226 [% ELSE %]<option value="-1">rejected</option>[% END %]
229 <li><label for="approver">Reviewer:</label> <input type="text" name="approver" id="approver" value="[% filter_approver | html %]" />
232 <label for="from">Date: from </label>
233 <input type="text" size="10" id="from" name="from" value="[% filter_date_approved_from | html %]" class="flatpickr" data-date_to="to" />
234 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
236 <label for="to">...to </label>
237 <input type="text" size="10" id="to" name="to" value="[% filter_date_approved_to | html %]" class="flatpickr" />
238 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
241 <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>
251 [% MACRO jsinclude BLOCK %]
252 [% INCLUDE 'datatables.inc' %]
253 [% INCLUDE 'calendar.inc' %]
254 [% Asset.js("js/pages/tags-review.js") | $raw %]
257 [% INCLUDE 'intranet-bottom.inc' %]