Bugzilla – Attachment 165369 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), 3.32 KB, created by
Martin Renvoize (ashimema)
on 2024-04-23 10:18:08 UTC
(
hide
)
Description:
Bug 31671: Add print slip button to transfer page
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2024-04-23 10:18:08 UTC
Size:
3.32 KB
patch
obsolete
>From 391f18c93fac7fb6646cd7de414267f677134d55 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Mon, 22 Apr 2024 16:10:46 +0000 >Subject: [PATCH] Bug 31671: Add print slip button to transfer page > >This patch reimplements/rebases Lucas' patch and adds a style >modification to the button. > >To test: >1. Apply patch >2. Go to Circulation / Transfer >3. Try transfering some items and notice the 'Print slip' > button >4. Try clicking on it and make sure it generates correctly and with the > correct information on the slip > >Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > .../prog/en/modules/circ/branchtransfers.tt | 16 ++++++++++++++++ > 1 file changed, 16 insertions(+) > >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 ae6ab4ad29d..aef70324444 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/branchtransfers.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/branchtransfers.tt >@@ -4,6 +4,7 @@ > [% USE ItemTypes %] > [% USE AuthorisedValues %] > [% PROCESS 'i18n.inc' %] >+[% SET footerjs = 1 %] > [% INCLUDE 'doc-head-open.inc' %] > <title>[% FILTER collapse %] > [% t("Transfers") | html %] › >@@ -217,6 +218,7 @@ > <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 %] > <tr> >@@ -231,6 +233,9 @@ > <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 %] > </table> >@@ -249,4 +254,15 @@ > [% END %] > </div> <!-- /.row --> > >+[% MACRO jsinclude BLOCK %] >+ <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); >+ }); >+ </script> >+[% END %] >+ > [% INCLUDE 'intranet-bottom.inc' %] >-- >2.44.0
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