View | Details | Raw Unified | Return to bug 10730
Collapse All | Expand All

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tags/list.tt (-3 / +1 lines)
Lines 2-10 Link Here
2
<title>Koha &rsaquo; Tools &rsaquo; Tags &rsaquo; [% IF ( do_it ) %]Review &rsaquo; [% ELSE %]Review tags[% END %]</title>
2
<title>Koha &rsaquo; Tools &rsaquo; Tags &rsaquo; [% IF ( do_it ) %]Review &rsaquo; [% ELSE %]Review tags[% END %]</title>
3
[% INCLUDE 'doc-head-close.inc' %]
3
[% INCLUDE 'doc-head-close.inc' %]
4
<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/en/css/datatables.css" />
4
<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/en/css/datatables.css" />
5
<script type="text/javascript" src="[% interface %]/[% theme %]/en/lib/jquery/plugins/jquery.dataTables.min.js"></script>
5
[% INCLUDE 'datatables.inc' %]
6
[% INCLUDE 'datatables-strings.inc' %]
7
<script type="text/javascript" src="[% interface %]/[% theme %]/en/js/datatables.js"></script>
8
<script type="text/javascript">
6
<script type="text/javascript">
9
//<![CDATA[
7
//<![CDATA[
10
    $(document).ready(function() {
8
    $(document).ready(function() {
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tags/review.tt (-42 / +66 lines)
Lines 1-6 Link Here
1
[% USE KohaDates %]
1
[% INCLUDE 'doc-head-open.inc' %]
2
[% INCLUDE 'doc-head-open.inc' %]
2
<title>Home &rsaquo; Tools &rsaquo; Tags &rsaquo; [% IF ( do_it ) %]Review &rsaquo; [% ELSE %]Review tags[% END %]</title>
3
<title>Home &rsaquo; Tools &rsaquo; Tags &rsaquo; [% IF ( do_it ) %]Review &rsaquo; [% ELSE %]Review tags[% END %]</title>
3
[% INCLUDE 'doc-head-close.inc' %]
4
[% INCLUDE 'doc-head-close.inc' %]
5
<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/en/css/datatables.css" />
6
[% INCLUDE 'datatables.inc' %]
4
[% INCLUDE 'calendar.inc' %]
7
[% INCLUDE 'calendar.inc' %]
5
<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.checkboxes.min.js"></script>
8
<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.checkboxes.min.js"></script>
6
<style type="text/css">
9
<style type="text/css">
Lines 121-126 td input,td input[type="submit"] { font-size: 85%; padding: 1px; } Link Here
121
		$("*").ajaxError(function(evt, request, settings){
124
		$("*").ajaxError(function(evt, request, settings){
122
			if ((alerted +=1) <= 1){ window.alert(_("AJAX error")+" (" + alerted + " alert)"); }
125
			if ((alerted +=1) <= 1){ window.alert(_("AJAX error")+" (" + alerted + " alert)"); }
123
		});
126
		});
127
        $("#tagst").dataTable($.extend(true, {}, dataTablesDefaults, {
128
            "aoColumnDefs": [
129
                [% IF ( filter_approved_pending ) %]
130
                    { "aTargets": [ 0,1,-2 ], "bSortable": false, "bSearchable": false }
131
                [% ELSE %]
132
                    { "aTargets": [ 0,1,-3 ], "bSortable": false, "bSearchable": false }
133
                [% END %]
134
            ],
135
            "aoColumns": [
136
                null,null,null,null,null,null,[% UNLESS ( filter_approved_pending ) %]null,[% END %]{ "sType": "title-string" }
137
            ],
138
            "aaSorting": [[ 4, "desc" ]],
139
            "aLengthMenu": [[10, 20, 50, 100, -1], [10, 20, 50, 100, "All"]],
140
            "iDisplayLength": 20,
141
            "sPaginationType": "four_button"
142
        }));
124
	});
143
	});
125
//]]>
144
//]]>
126
</script>
145
</script>
Lines 184-241 td input,td input[type="submit"] { font-size: 85%; padding: 1px; } Link Here
184
  [% END %]
203
  [% END %]
185
  [% IF ( tagloop ) %]
204
  [% IF ( tagloop ) %]
186
  <p class="check"></p>
205
  <p class="check"></p>
187
  <table>
206
  <table id="tagst">
188
    <tr>
207
    <thead>
189
    	<th>&nbsp;</th>
208
        <tr>
190
    	<th>&nbsp;</th>
209
		<th>&nbsp;</th>
210
		<th>&nbsp;</th>
191
		<th>Status</th>
211
		<th>Status</th>
192
		<th>Term</th>
212
		<th>Term</th>
193
		<th>Weight</th>
213
		<th>Weight</th>
194
		<th>Actions</th>
214
		<th>Actions</th>
195
        [% UNLESS ( filter_approved_pending ) %]<th>Reviewer</th>[% END %]
215
            [% UNLESS ( filter_approved_pending ) %]<th>Reviewer</th>[% END %]
196
		<th>Date</th>
216
		<th>Date</th>
197
	</tr>
217
	</tr>
218
    </thead>
219
    <tbody>
198
	[% FOREACH tagloo IN tagloop %]
220
	[% FOREACH tagloo IN tagloop %]
199
	<tr>
221
		<tr>
200
	    <td class="count">[% offset + loop.count %]
222
		    <td class="count">[% offset + loop.count %]
201
	    </td>
223
		    </td>
202
        [% IF ( tagloo.approved == 0 ) %]<td><span><input type="checkbox" value="[% tagloo.term %]" name="tags" class="pending" /></span>
224
                [% IF ( tagloo.approved == 0 ) %]<td><span><input type="checkbox" value="[% tagloo.term %]" name="tags" class="pending" /></span>
203
        [% ELSE %]<td><span><input type="checkbox" value="[% tagloo.term %]" name="tags" /></span>[% END %]
225
                [% ELSE %]<td><span><input type="checkbox" value="[% tagloo.term %]" name="tags" /></span>[% END %]
204
	    </td>
226
		    </td>
205
	    [% IF ( tagloo.approved == -1 ) %]<td class="red">rejected
227
		    [% IF ( tagloo.approved == -1 ) %]<td class="red">rejected
206
        [% ELSIF ( tagloo.approved == 1 ) %]<td class="green"><img alt="OK" src="[% interface %]/[% theme %]/img/approve.gif" />
228
                [% ELSIF ( tagloo.approved == 1 ) %]<td class="green"><img alt="OK" src="[% interface %]/[% theme %]/img/approve.gif" />
207
		[% ELSE %]<td class="pending">
229
			[% ELSE %]<td class="pending">
208
		[% END %]
230
			[% END %]
209
	    </td>
231
		    </td>
210
	    <td><a href="/cgi-bin/koha/tags/list.pl?tag=[% tagloo.term %]">[% tagloo.term %]</a>
232
		    <td><a href="/cgi-bin/koha/tags/list.pl?tag=[% tagloo.term|uri %]">[% tagloo.term %]</a>
211
	    </td>
233
		    </td>
212
		<td>[% tagloo.weight_total %]
234
			<td>[% tagloo.weight_total %]
213
	    </td>
235
		    </td>
214
		[% IF ( tagloo.approved ) %]
236
			[% IF ( tagloo.approved ) %]
215
	    <td><span class="ajax_buttons" style="visibility:hidden">
237
		    <td><span class="ajax_buttons" style="visibility:hidden">
216
            [% IF ( tagloo.approved == -1 ) %]
238
                    [% IF ( tagloo.approved == -1 ) %]
217
			<input class="ok"  type="submit" title="[% tagloo.term %]" value="Approve" name="approve" />
239
				<input class="ok"  type="submit" title="[% tagloo.term %]" value="Approve" name="approve" />
218
			<input class="rej" disabled="disabled" type="submit" title="[% tagloo.term %]" value="Rejected" name="reject" />
240
				<input class="rej" disabled="disabled" type="submit" title="[% tagloo.term %]" value="Rejected" name="reject" />
241
				[% ELSE %]
242
				<input class="ok"  disabled="disabled" type="submit" title="[% tagloo.term %]" value="Approved" name="approve" />
243
				<input class="rej" type="submit" title="[% tagloo.term %]" value="Reject" name="reject" />
244
				[% END %]
245
				</span>
246
		    </td>
247
		    <td>[% IF ( tagloo.approved_by_name ) %]<a href="/cgi-bin/koha/tags/review.pl?approved_by=[% tagloo.approved_by %]&amp;approved=all">[% tagloo.approved_by_name %]</a>[% ELSE %]&nbsp;[% END %]
248
		    </td>
219
			[% ELSE %]
249
			[% ELSE %]
220
			<input class="ok"  disabled="disabled" type="submit" title="[% tagloo.term %]" value="Approved" name="approve" />
250
			<td><span class="ajax_buttons" style="visibility:hidden">
221
			<input class="rej" type="submit" title="[% tagloo.term %]" value="Reject" name="reject" />
251
			<input class="ok"  type="submit" title="[% tagloo.term %]" value="Approve" name="approve" />
252
				<input class="rej" type="submit" title="[% tagloo.term %]" value="Reject" name="reject" />
253
				</span>
254
		    </td>
255
		    [% UNLESS ( filter_approved_pending ) %]<td>&nbsp;</td>[% END %]
222
			[% END %]
256
			[% END %]
223
			</span>
257
            <td>
224
	    </td>
258
                <span title="[% tagloo.date_approved %]">[% tagloo.date_approved | $KohaDates %]</span>
225
	    <td>[% IF ( tagloo.approved_by_name ) %]<a href="/cgi-bin/koha/tags/review.pl?approved_by=[% tagloo.approved_by %]&amp;approved=all">[% tagloo.approved_by_name %]</a>[% ELSE %]&nbsp;[% END %]
259
		    </td>
226
	    </td>
260
		</tr>
227
		[% ELSE %]
228
		<td><span class="ajax_buttons" style="visibility:hidden">
229
	    	<input class="ok"  type="submit" title="[% tagloo.term %]" value="Approve" name="approve" />
230
			<input class="rej" type="submit" title="[% tagloo.term %]" value="Reject" name="reject" />
231
			</span>
232
	    </td>
233
	    [% UNLESS ( filter_approved_pending ) %]<td>&nbsp;</td>[% END %]
234
		[% END %]
235
	    <td>[% tagloo.date_approved %]
236
	    </td>
237
	</tr>
238
	[% END %]
261
	[% END %]
262
    </tbody>
239
  </table>
263
  </table>
240
  [% END %]
264
  [% END %]
241
    [% IF ( tagloop ) %]<fieldset class="action">
265
    [% IF ( tagloop ) %]<fieldset class="action">
(-)a/tags/review.pl (-4 lines)
Lines 202-210 if ($filter = $input->param('approved_by')) { # borrowernumber from link Link Here
202
}
202
}
203
$debug and print STDERR "filters: " . Dumper(\%filters);
203
$debug and print STDERR "filters: " . Dumper(\%filters);
204
my $tagloop = get_approval_rows(\%filters);
204
my $tagloop = get_approval_rows(\%filters);
205
for ( @{$tagloop} ) {
206
    $_->{date_approved} = format_date( $_->{date_approved} );
207
}
208
my $qstring = $input->query_string;
205
my $qstring = $input->query_string;
209
$qstring =~ s/([&;])*\blimit=\d+//;		# remove pagination var
206
$qstring =~ s/([&;])*\blimit=\d+//;		# remove pagination var
210
$qstring =~ s/^;+//;					# remove leading delims
207
$qstring =~ s/^;+//;					# remove leading delims
211
- 

Return to bug 10730