[Koha-bugs] [Bug 29713] Make item table when placing an item level hold sortable
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Mon Feb 28 18:17:20 CET 2022
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29713
--- Comment #11 from Jonathan Druart <jonathan.druart+koha at gmail.com> ---
I don't have the time right now, but here is the result of the -w version of
the local branch I have. That should make the patch easier to rewrite.
diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt
b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt
index 2d84cdffb44..424a26bac19 100644
--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt
+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt
@@ -345,6 +345,7 @@
[% IF bibitemloo.itemholdable %]
<table class="copiesrow table
table-bordered table-striped" id="copiesrow_[% bibitemloo.biblionumber | html
%]">
<caption>Select a specific
item:</caption>
+ <thead>
<tr>
<th>Copy
number</th>
[% IF (
item_level_itypes ) %]
@@ -365,10 +366,11 @@
<th>Notes</th>
<th>Information</th>
</tr>
-
+ </thead>
+ <tbody>
[% FOREACH itemLoo IN
bibitemloo.itemLoop %]
<tr class="[%
itemLoo.backgroundcolor | html %]">
- <td
class="copynumber">
+ <td
class="copynumber" data-order="[% itemLoo.copynumber | html %]">
[% IF (
itemLoo.available ) %]
<input
type="radio" class="checkitem checkitem_[% bibitemloo.biblionumber | html %]"
name="checkitem_[% bibitemloo.biblionumber | html %]" value="[%
itemLoo.itemnumber | html %]" />
[% ELSE %]
@@ -451,6 +453,7 @@
</td>
</tr>
[% END # / FOREACH
itemLoo IN bibitemloo.itemLoop%]
+ </tbody>
</table> <!-- / #copiesrow_[%
bibitemloo.biblionumber | html %] -->
[% END # / IF (
bibitemloo.itemholdable )%]
</div> <!-- / #hold-options-[%
bibitemloo.biblionumber | html %] -->
@@ -472,6 +475,7 @@
[% INCLUDE 'opac-bottom.inc' %]
[% BLOCK jsinclude %]
[% INCLUDE 'calendar.inc' %]
+ [% INCLUDE 'datatables.inc' %]
<script>
var MSG_NO_ITEM_SELECTED = _("Expecting a specific item selection.");
@@ -673,6 +677,11 @@
return true;
});
+ $(".copiesrow").each(function(){
+ $(this).DataTable({
+ dom: "t"
+ });
+ });
});
</script>
[% END %]
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list