[Koha-patches] [PATCH] Bug 8715 [Follow-up] Receiving all serials for a year
Owen Leonard
oleonard at myacpl.org
Wed Sep 12 20:06:06 CEST 2012
Follow-up: For consistency, I would prefer to have the
column of checkboxes at the beginning of the table and the
select/clear links above.
---
.../prog/en/modules/serials/serials-collection.tt | 56 +++++++++-----------
1 file changed, 25 insertions(+), 31 deletions(-)
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-collection.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-collection.tt
index fc658c3..f8f1a84 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-collection.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-collection.tt
@@ -60,7 +60,7 @@ $(document).ready(function() {
$(".subscription-year-table").dataTable($.extend(true, {}, dataTablesDefaults, {
"aoColumnDefs": [
- { "aTargets": [ -1 ], "bSortable": false, "bSearchable": false },
+ { "aTargets": [ 0 ], "bSortable": false, "bSearchable": false },
],
"bAutoWidth": false,
"bPaginate": false,
@@ -216,10 +216,16 @@ $(document).ready(function() {
<input type="button" value="Generate Next" onclick="javascript:generateNext([% subscriptionidlist %])" />
</p>
[% END %]
-
+ <span class="checkall">
+ <a class="CheckAll" href="#" onclick="CheckAll('subscription-year-[% year.year %]'); return false;">Select all</a>
+ </span> |
+ <span class="clearall">
+ <a class="CheckNone" href="#" onclick="CheckNone('subscription-year-[% year.year %]'); return false;">Clear all</a>
+ </span>
<table class="subscription-year-table">
<thead>
<tr>
+ [% IF ( CAN_user_serials_receive_serials ) %]<th>Edit</th>[% END %]
[% IF ( subscriptions.size > 1 ) %]
<th># Subs</th>
[% END %]
@@ -236,23 +242,28 @@ $(document).ready(function() {
<th>Library
</th>
[% IF ( routing ) %]<th>Routing</th>[% END %]
- [% IF ( CAN_user_serials_receive_serials ) %]
- <th style="min-width: 60px;">
- <span style="font-size: 70%;">
- <span class="checkall">
- <a class="CheckAll" href="#" onclick="CheckAll('subscription-year-[% year.year %]'); return false;">Select all</a>
- </span>
- <span class="clearall">
- <a class="CheckNone" href="#" onclick="CheckNone('subscription-year-[% year.year %]'); return false;">Clear all</a>
- </span>
- </span>
- </th>
- [% END %]
</tr>
</thead>
<tbody>
[% FOREACH serial IN year.serials %]
[% UNLESS ( loop.odd ) %]<tr class="highlight">[% ELSE %]<tr>[% END %]
+ [% IF ( CAN_user_serials_receive_serials ) %]
+ <td>
+ [% IF ( serial.cannotedit ) %]
+ disabled
+ [% ELSE %]
+ [% IF ( serial.subscriptionexpired ) %]
+ <input type="checkbox" name="serialid" value="[% serial.serialid %]" disabled="disabled" />
+ [% ELSE %]
+ [% IF ( serial.checked ) %]
+ <input type="checkbox" class="checkboxed" name="serialid" checked="checked" value="[% serial.serialid %]" />
+ [% ELSE %]
+ <input type="checkbox" class="checkboxed" name="serialid" value="[% serial.serialid %]" />
+ [% END %]
+ [% END %]
+ [% END %]
+ </td>
+ [% END %]
[% IF ( subscriptions.size > 1 ) %]
<td><a href="serials-collection.pl?subscriptionid=[% serial.subscriptionid %]">[% serial.subscriptionid %]</a></td>
[% END %]
@@ -279,23 +290,6 @@ $(document).ready(function() {
<a href="" onclick="print_slip([% serial.subscriptionid |html %], '[% serial.serialseq |html %] ([% serial.planneddate %])'); return false" >Print list</a>
</td>
[% END %]
- [% IF ( CAN_user_serials_receive_serials ) %]
- <td>
- [% IF ( serial.cannotedit ) %]
- disabled
- [% ELSE %]
- [% IF ( serial.subscriptionexpired ) %]
- <input type="checkbox" name="serialid" value="[% serial.serialid %]" disabled="disabled" />
- [% ELSE %]
- [% IF ( serial.checked ) %]
- <input type="checkbox" class="checkboxed" name="serialid" checked="checked" value="[% serial.serialid %]" />
- [% ELSE %]
- <input type="checkbox" class="checkboxed" name="serialid" value="[% serial.serialid %]" />
- [% END %]
- [% END %]
- [% END %]
- </td>
- [% END %]
</tr>
[% END %]
</tbody>
--
1.7.9.5
More information about the Koha-patches
mailing list