Bugzilla – Attachment 142571 Details for
Bug 31671
Add button to print transfer slips to the 'Transfer items' page
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 31671: Add print slip button to transfer page
Bug-31671-Add-print-slip-button-to-transfer-page.patch (text/plain), 4.86 KB, created by
Lucas Gass (lukeg)
on 2022-10-24 21:18:27 UTC
(
hide
)
Description:
Bug 31671: Add print slip button to transfer page
Filename:
MIME Type:
Creator:
Lucas Gass (lukeg)
Created:
2022-10-24 21:18:27 UTC
Size:
4.86 KB
patch
obsolete
>From fba1d7897373aeb43fc34feda07a287031a36caa Mon Sep 17 00:00:00 2001 >From: Lucas Gass <lucas@bywatersolutions.com> >Date: Mon, 17 Oct 2022 17:02:39 +0000 >Subject: [PATCH] Bug 31671: Add print slip button to transfer page > >To test: >1. Apply patch >2. Go to Circulation / Transfer >3. Try transfering some items and notice the 'Print transfer slip' button >4. Try clicking on it and make sure it generates correctly and with the correct information on the slip >--- > .../prog/en/modules/circ/branchtransfers.tt | 52 ++++++++++++++----- > 1 file changed, 39 insertions(+), 13 deletions(-) > >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 ca153d719b..7e621a9e9a 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/branchtransfers.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/branchtransfers.tt >@@ -2,6 +2,7 @@ > [% USE Branches %] > [% USE ItemTypes %] > [% USE AuthorisedValues %] >+[% SET footerjs = 1 %] > [% INCLUDE 'doc-head-open.inc' %] > <title>Transfers › Circulation › Koha</title> > [% INCLUDE 'doc-head-close.inc' %] >@@ -198,19 +199,35 @@ > </div> > > [% IF ( trsfitemloop ) %] >- <div class="page-section"> >- <table> >- <caption>Transferred items</caption> >+ <table> >+ <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">Print transfer slip</th> >+ </tr> >+ [% FOREACH trsfitemloo IN trsfitemloop %] > <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> >+ <td class="tf-title"> >+ [% INCLUDE 'biblio-title.inc' biblio=trsfitemloo.item.biblio link=1 %] >+ </a> >+ </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"><input class="printtransferslip" type="button" name="printtransferslip" value="Print transfer slip" data-itemnumber="[% trsfitemloo.item.itemnumber | html %]" data-tobranch="[% trsfitemloo.tobrcd | html %]"></td> > </tr> > [% FOREACH trsfitemloo IN trsfitemloop %] > <tr> >@@ -245,5 +262,14 @@ > </div> <!-- /.col-sm-2.col-sm-pull-10 --> > [% END %] > </div> <!-- /.row --> >- >+[% MACRO jsinclude BLOCK %] >+ <script> >+ $('.printtransferslip').click(function(){ >+ 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); >+ return false; >+ }) >+ </script> >+[% END %] > [% INCLUDE 'intranet-bottom.inc' %] >-- >2.30.2
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 31671
:
142000
|
142571
|
165332
|
165343
|
165369