Bugzilla – Attachment 188576 Details for
Bug 41134
Add table settings to transfers
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 41134: Add table settings to transfers
Bug-41134-Add-table-settings-to-transfers.patch (text/plain), 11.04 KB, created by
Owen Leonard
on 2025-10-29 17:17:03 UTC
(
hide
)
Description:
Bug 41134: Add table settings to transfers
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2025-10-29 17:17:03 UTC
Size:
11.04 KB
patch
obsolete
>From ccc3650911a78578bc43462014d2197d8a2f22a7 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Wed, 29 Oct 2025 17:01:57 +0000 >Subject: [PATCH] Bug 41134: Add table settings to transfers > >This patch updates the transfers page in order to add table settings to >the table of transfered items. > >The patch also makes another minor correction: The transfer submit >button now has the standard class "btn-primary." > >To test, apply the patch and restart services. > >- Go to Circulation -> Transfer. >- Submit a barcode from a library other than your own so that the > transfer will complete successfully. > - Note that the "Transfer" button has the standard primary yellow > color. >- In the table of transferred items you should see the columns setting > menu, export option, etc. Confirm that these controls work correctly. >- Go to Administration -> Table settings -> Circulation -> Transfers >- Make some changes to the column visibility settings and return > to the transfers page to confirm that your settings are now > applied when you transfer more items. > - Because of DataTables state saving feature you might have to clear > your browser's local storage in order to see the new column > configuration. > >Sponsored-by: Athens County Public Libraries >--- > admin/columns_settings.yml | 26 +++++ > .../prog/en/modules/circ/branchtransfers.tt | 97 +++++++++++-------- > 2 files changed, 83 insertions(+), 40 deletions(-) > >diff --git a/admin/columns_settings.yml b/admin/columns_settings.yml >index 6c5624bee9b..e950b04332a 100644 >--- a/admin/columns_settings.yml >+++ b/admin/columns_settings.yml >@@ -1932,6 +1932,32 @@ modules: > - > columnname: itemnote > >+ transfers: >+ transferstable: >+ columns: >+ - >+ columnname: title >+ - >+ columnname: author >+ - >+ columnname: barcode >+ - >+ columnname: location >+ - >+ columnname: itemcallnumber >+ - >+ columnname: itype >+ - >+ columnname: ccode >+ - >+ columnname: transferfrom >+ - >+ columnname: transferto >+ - >+ columnname: action >+ cannot_be_toggled: 1 >+ cannot_be_modified: 1 >+ > view_holdsqueue: > holds-table: > default_sort_order: 3 >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/branchtransfers.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/branchtransfers.tt >index 56dd9901695..0d009b7cc12 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/branchtransfers.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/branchtransfers.tt >@@ -3,6 +3,7 @@ > [% USE Branches %] > [% USE ItemTypes %] > [% USE AuthorisedValues %] >+[% USE TablesSettings %] > [% PROCESS 'i18n.inc' %] > [% SET footerjs = 1 %] > [% PROCESS 'member-display-address-style.inc' %] >@@ -235,7 +236,7 @@ > <div class="form-control-group"> > <label class="hint" for="barcode">Enter item barcode: </label> > <input name="barcode" id="barcode" size="15" class="barcode focus" placeholder="Enter item barcode" type="text" /> >- <input class="btn btn-default" type="submit" value="Transfer" /> >+ <input class="btn btn-primary" type="submit" value="Transfer" /> > </div> > </fieldset> > [% FOREACH trsfitemloo IN trsfitemloop %] >@@ -250,42 +251,46 @@ > > [% IF ( trsfitemloop ) %] > <div class="page-section"> >- <table> >+ <table id="transferstable"> > <caption>Transferred items</caption> >- <tr> >- <th class="tf-title">Title</th> >- <th class="tf-author">Author</th> >- <th class="tf-barcode">Barcode</th> >- <th class="tf-location">Shelving location</th> >- <th class="tf-itemcallnumber">Call number</th> >- <th class="tf-itemtype">Item type</th> >- <th class="tf-ccode">Collection</th> >- <th class="tf-origin">Origin</th> >- <th class="tf-destination">Destination</th> >- <th class="tf-printslip">Actions</th> >- </tr> >- [% FOREACH trsfitemloo IN trsfitemloop %] >+ <thead> > <tr> >- <td class="tf-title"> [% INCLUDE 'biblio-title.inc' biblio=trsfitemloo.item.biblio link=1 %] </td> >- <td class="tf-author">[% trsfitemloo.item.biblio.author | html %]</td> >- <td class="tf-barcode" >- ><a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% trsfitemloo.item.biblionumber | uri %]&itemnumber=[% trsfitemloo.item.itemnumber | uri %]#item[% trsfitemloo.item.itemnumber | uri %]" >- >[% trsfitemloo.item.barcode | html %]</a >- ></td >- > >- <td class="tf-location"><span class="shelvingloc">[% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.location', authorised_value => trsfitemloo.item.location ) | html %]</span></td> >- <td class="tf-itemcallnumber">[% trsfitemloo.item.itemcallnumber | html %]</td> >- <td class="tf-itemtype">[% ItemTypes.GetDescription( trsfitemloo.item.effective_itemtype ) | html %]</td> >- <td class="tf-ccode">[% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.ccode', authorised_value => trsfitemloo.item.ccode ) | html %]</td> >- <td class="tf-origin">[% Branches.GetName( trsfitemloo.frombrcd ) | html %]</td> >- <td class="tf-destination">[% Branches.GetName( trsfitemloo.tobrcd ) | html %]</td> >- <td class="tf-printslip"> >- <button type="button" class="btn btn-default btn-sm printtransferslip" data-itemnumber="[% trsfitemloo.item.itemnumber | html %]" data-tobranch="[% trsfitemloo.tobrcd | html %]" >- ><i class="fa fa-print"></i> Print slip</button >- > >- </td> >+ <th class="tf-title">Title</th> >+ <th class="tf-author">Author</th> >+ <th class="tf-barcode">Barcode</th> >+ <th class="tf-location">Shelving location</th> >+ <th class="tf-itemcallnumber">Call number</th> >+ <th class="tf-itemtype">Item type</th> >+ <th class="tf-ccode">Collection</th> >+ <th class="tf-origin">Origin</th> >+ <th class="tf-destination">Destination</th> >+ <th class="tf-printslip">Actions</th> > </tr> >- [% END # /FOREACH trsfitemloo %] >+ </thead> >+ <tbody> >+ [% FOREACH trsfitemloo IN trsfitemloop %] >+ <tr> >+ <td class="tf-title"> [% INCLUDE 'biblio-title.inc' biblio=trsfitemloo.item.biblio link=1 %] </td> >+ <td class="tf-author">[% trsfitemloo.item.biblio.author | html %]</td> >+ <td class="tf-barcode" >+ ><a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% trsfitemloo.item.biblionumber | uri %]&itemnumber=[% trsfitemloo.item.itemnumber | uri %]#item[% trsfitemloo.item.itemnumber | uri %]" >+ >[% trsfitemloo.item.barcode | html %]</a >+ ></td >+ > >+ <td class="tf-location"><span class="shelvingloc">[% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.location', authorised_value => trsfitemloo.item.location ) | html %]</span></td> >+ <td class="tf-itemcallnumber">[% trsfitemloo.item.itemcallnumber | html %]</td> >+ <td class="tf-itemtype">[% ItemTypes.GetDescription( trsfitemloo.item.effective_itemtype ) | html %]</td> >+ <td class="tf-ccode">[% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.ccode', authorised_value => trsfitemloo.item.ccode ) | html %]</td> >+ <td class="tf-origin">[% Branches.GetName( trsfitemloo.frombrcd ) | html %]</td> >+ <td class="tf-destination">[% Branches.GetName( trsfitemloo.tobrcd ) | html %]</td> >+ <td class="tf-printslip"> >+ <button type="button" class="btn btn-default btn-sm printtransferslip" data-itemnumber="[% trsfitemloo.item.itemnumber | html %]" data-tobranch="[% trsfitemloo.tobrcd | html %]" >+ ><i class="fa fa-print"></i> Print slip</button >+ > >+ </td> >+ </tr> >+ [% END # /FOREACH trsfitemloo %] >+ </tbody> > </table> > </div> > <!-- /.page-section --> >@@ -293,18 +298,30 @@ > [% END # /IF found %] > [% END %] > [% MACRO jsinclude BLOCK %] >+ [% INCLUDE 'datatables.inc' %] > [% INCLUDE 'select2.inc' %] > <script> >- $(".printtransferslip").on("click", function(e){ >- e.preventDefault(); >- var itemnumber = $(this).attr('data-itemnumber'); >- var to_branch = $(this).attr('data-tobranch'); >- window.open("/cgi-bin/koha/circ/transfer-slip.pl?transferitem=" + itemnumber + "&branchcode=" + to_branch); >- }); >+ var table_settings = [% TablesSettings.GetTableSettings( 'circ', 'transfers', 'transferstable', 'json' ) | $raw %] > $(document).ready( function() { >+ $(".printtransferslip").on("click", function(e){ >+ e.preventDefault(); >+ var itemnumber = $(this).attr('data-itemnumber'); >+ var to_branch = $(this).attr('data-tobranch'); >+ window.open("/cgi-bin/koha/circ/transfer-slip.pl?transferitem=" + itemnumber + "&branchcode=" + to_branch); >+ }); > [% IF ( found ) %] > $("#transfer_confirm").modal('show'); > [% END %] >+ var transfers_table = $("#transferstable").kohaTable( >+ { >+ searching: false, >+ paging: false, >+ info: false, >+ ordering: false, >+ dom: '<"table_controls"B>rt', >+ }, >+ table_settings >+ ); > }); > </script> > [% END %] >-- >2.39.5
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 41134
: 188576