Bugzilla – Attachment 129960 Details for
Bug 29972
The "select a specific item" table on opac-reserve.tt should be column configurable
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 29972: Make the select a specific item table configurable on opac-reserve.tt
Bug-29972-Make-the-select-a-specific-item-table-co.patch (text/plain), 8.06 KB, created by
Lucas Gass (lukeg)
on 2022-01-28 22:10:31 UTC
(
hide
)
Description:
Bug 29972: Make the select a specific item table configurable on opac-reserve.tt
Filename:
MIME Type:
Creator:
Lucas Gass (lukeg)
Created:
2022-01-28 22:10:31 UTC
Size:
8.06 KB
patch
obsolete
>From ab666d3a01f644991ef576fb975e28c00222f3f1 Mon Sep 17 00:00:00 2001 >From: Lucas Gass <lucas@bywatersolutions.com> >Date: Fri, 28 Jan 2022 22:04:21 +0000 >Subject: [PATCH] Bug 29972: Make the select a specific item table configurable > on opac-reserve.tt > >To test: >1. Apply patch and restart everything >2. Find a record that was multiple items on it, place a hold on that item. >3. On the "Placing hold" page, click "Show more options" and "A specific > item." >4. See that the table can now be sorted by each column, make sure the sorting works >5. Go to Administration > Table settings, and in the OPAC section find reserves_table >6. Try hiding some columns and then do step 3 again. >7. Confirm the columns are properly being hidden. >--- > admin/columns_settings.yml | 25 ++++++++ > .../bootstrap/en/modules/opac-reserve.tt | 63 ++++++++++++------- > 2 files changed, 65 insertions(+), 23 deletions(-) > >diff --git a/admin/columns_settings.yml b/admin/columns_settings.yml >index 56bec9ea04..49c37c93e5 100644 >--- a/admin/columns_settings.yml >+++ b/admin/columns_settings.yml >@@ -1469,6 +1469,31 @@ modules: > - > columnname: notes > >+ reserves_table: >+ columns: >+ - >+ columnname: copy_number >+ cannot_be_toggled: 1 >+ cannot_be_modified: 1 >+ - >+ columnname: item_type >+ cannot_be_toggled: 1 >+ cannot_be_modified: 1 >+ - >+ columnname: barcode >+ - >+ columnname: home_libray >+ - >+ columnname: last_location >+ - >+ columnname: collection >+ - >+ columnname: call_number >+ - >+ columnname: notes >+ - >+ columnname: information >+ > subscriptionst: > columns: > - >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 6b65b4c721..84e05557f6 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt >@@ -4,10 +4,13 @@ > [% USE Price %] > [% USE ItemTypes %] > [% USE AuthorisedValues %] >+[% USE TablesSettings %] > [% INCLUDE 'doc-head-open.inc' %] > <title>Placing a hold › [% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog</title> > [% INCLUDE 'doc-head-close.inc' %] >-[% BLOCK cssinclude %][% END %] >+[% BLOCK cssinclude %] >+ [% Asset.css("css/datatables.css") | $raw %] >+[% END %] > </head> > > [% INCLUDE 'bodytag.inc' bodyid='opac-holds' %] >@@ -345,27 +348,29 @@ > [% IF bibitemloo.itemholdable %] > <table class="copiesrow table table-bordered table-striped" id="copiesrow_[% bibitemloo.biblionumber | html %]"> > <caption>Select a specific item:</caption> >- <tr> >- <th>Copy number</th> >- [% IF ( item_level_itypes ) %] >- <th>Item type</th> >- [% END %] >- <th>Barcode</th> >- [% UNLESS ( singleBranchMode ) %] >- <th>Home library</th> >- <th>Last location</th> >- [% END %] >- [% IF ( itemdata_ccode ) %] >- <th>Collection</th> >- [% END %] >- <th>Call number</th> >- [% IF ( itemdata_enumchron ) %] >- <th>Vol info</th> >- [% END %] >- <th>Notes</th> >- <th>Information</th> >- </tr> >- >+ <thead> >+ <tr> >+ <th>Copy number</th> >+ [% IF ( item_level_itypes ) %] >+ <th>Item type</th> >+ [% END %] >+ <th>Barcode</th> >+ [% UNLESS ( singleBranchMode ) %] >+ <th>Home library</th> >+ <th>Last location</th> >+ [% END %] >+ [% IF ( itemdata_ccode ) %] >+ <th>Collection</th> >+ [% END %] >+ <th>Call number</th> >+ [% IF ( itemdata_enumchron ) %] >+ <th>Vol info</th> >+ [% END %] >+ <th>Notes</th> >+ <th>Information</th> >+ </tr> >+ </thead> >+ </tbody> > [% FOREACH itemLoo IN bibitemloo.itemLoop %] > <tr class="[% itemLoo.backgroundcolor | html %]"> > <td class="copynumber"> >@@ -451,6 +456,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 %] --> >@@ -471,7 +477,9 @@ > </div> <!-- / .main --> > [% INCLUDE 'opac-bottom.inc' %] > [% BLOCK jsinclude %] >-[% INCLUDE 'calendar.inc' %] >+ [% INCLUDE 'datatables.inc' %] >+ [% INCLUDE 'columns_settings.inc' %] >+ [% INCLUDE 'calendar.inc' %] > <script> > // <![CDATA[ > var MSG_NO_ITEM_SELECTED = _("Expecting a specific item selection."); >@@ -489,6 +497,15 @@ > } > > $(document).ready(function() { >+ columns_settings = [% TablesSettings.GetColumns( 'opac', 'biblio-detail', 'reserves_table', 'json' ) | $raw %] >+ KohaTable(".copiesrow", { >+ "dom": 'lrt', >+ "sorting": [[ 1, "asc" ]], >+ "autoWidth": false, >+ "asColumnDefs": [ >+ { "aTargets": [ 1 ], "sType": "nsb-nse" }, >+ ] >+ }, columns_settings ); > $("#hold-request-form").preventDoubleFormSubmit(); > var copiesRowId = null; > var wasSpecific = false; >-- >2.20.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 29972
: 129960