Bugzilla – Attachment 92459 Details for
Bug 23464
Update the process of quick spine label printing
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 23464: Update the process of quick spine label printing
Bug-23464-Update-the-process-of-quick-spine-label-.patch (text/plain), 8.45 KB, created by
Maryse Simard
on 2019-08-23 18:04:41 UTC
(
hide
)
Description:
Bug 23464: Update the process of quick spine label printing
Filename:
MIME Type:
Creator:
Maryse Simard
Created:
2019-08-23 18:04:41 UTC
Size:
8.45 KB
patch
obsolete
>From 3cf0a2693ce5ea8bceab5d78c935453a8919ae2d Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Wed, 14 Aug 2019 21:50:00 +0000 >Subject: [PATCH] Bug 23464: Update the process of quick spine label printing > >This patch makes changes to the way quick spine label printing works, >either from the bibliographic details page or the Quick spine label >creator page. > >To test, apply the patch and go to Tools -> Quick spine label creator. > > - Type or scan a barcode. Submitting the form should trigger a popup > window with the spine label print page. The "print" button should > be centered at the bottom of the window in a footer-like container. > - If you have SpineLabelAutoPrint enabled, the print dialog should > appear automatically. > - After printing, the pop-up window should close and and focus should > be returned to the barcode field. > >Enable the SpineLabelShowPrintOnBibDetails system preference. View the >bibliographic details page for a record in the catalog. > > - In the holdings table, a "Spine label" column should appear as the > second-to-last column. The column should contain "Print label" > Bootstrap-style buttons. > - Clicking a "Print label" button should trigger a pop-up window with > the spine label print page. The behavior of the window should be the > same as above. > >Signed-off-by: Maryse Simard <maryse.simard@inlibro.com> >--- > koha-tmpl/intranet-tmpl/prog/css/spinelabel.css | 14 +++++++--- > .../prog/en/modules/catalogue/detail.tt | 16 ++++++++---- > .../prog/en/modules/labels/spinelabel-home.tt | 12 ++++++++- > .../prog/en/modules/labels/spinelabel-print.tt | 30 ++++++++++++---------- > 4 files changed, 50 insertions(+), 22 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/css/spinelabel.css b/koha-tmpl/intranet-tmpl/prog/css/spinelabel.css >index f0e3ead..b62e8de 100644 >--- a/koha-tmpl/intranet-tmpl/prog/css/spinelabel.css >+++ b/koha-tmpl/intranet-tmpl/prog/css/spinelabel.css >@@ -20,8 +20,16 @@ body { > top: 75px; > } > >+#spinelabel { >+ >+} >+ > #print_button { >- position: absolute; >- top: 25px; >- left: 500px; >+ bottom: 0; >+ padding: 1em; >+ position: absolute; >+ text-align: center; >+ width: 100%; >+ border-top: 1px solid #b9d8d9; >+ background-color: #e6f0f2; > } >\ No newline at end of file >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt >index 3819628..05f6ba3 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt >@@ -209,10 +209,10 @@ > [% IF materials %]<th>Materials specified</th>[% END %] > [% IF ( itemdata_itemnotes ) %]<th>Public notes</th>[% END %] > [% IF ( itemdata_nonpublicnotes ) %]<th>Non-public notes</th>[% END %] >- [% IF ( SpineLabelShowPrintOnBibDetails ) %]<th>Spine label</th>[% END %] > [% IF ( hostrecords ) %]<th>Host records</th>[% END %] > [% IF ( analyze ) %]<th>Used in</th><th></th>[% END %] > [% IF ( ShowCourseReserves ) %]<th>Course Reserves</th>[% END %] >+ [% IF ( SpineLabelShowPrintOnBibDetails ) %]<th class="NoSort">Spine label</th>[% END %] > [% IF ( CAN_user_editcatalogue_edit_items ) %]<th class="NoSort"> </th>[% END %] > </tr> > </thead> >@@ -365,9 +365,6 @@ > [% IF itemdata_nonpublicnotes %] > <td class="nonpublicnote">[% item.itemnotes_nonpublic | html %]</td> > [% END %] >- [% IF ( SpineLabelShowPrintOnBibDetails ) %] >- <td><a href="/cgi-bin/koha/labels/spinelabel-print.pl?barcode=[% item.barcode | uri %]" >Print label</a></td> >- [% END %] > [% IF ( hostrecords ) %] > <td>[% IF ( item.hostbiblionumber) %]<a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% item.hostbiblionumber | uri %]" >[% item.hosttitle | html %]</a>[% END %]</td> > [% END %] >@@ -400,6 +397,11 @@ > [% END %] > </td> > [% END %] >+ >+ [% IF ( SpineLabelShowPrintOnBibDetails ) %] >+ <td><a class="btn btn-default btn-xs print-label" href="/cgi-bin/koha/labels/spinelabel-print.pl?barcode=[% item.barcode | uri %]"><i class="fa fa-print"></i> Print label</a></td> >+ [% END %] >+ > [% IF CAN_user_editcatalogue_edit_items %] > <td class="actions"> > [% UNLESS item.cannot_be_edited %] >@@ -937,7 +939,11 @@ > } > }); > [% END %] >- >+ $(".print-label").on("click", function(e){ >+ e.preventDefault(); >+ link = $(this).attr("href"); >+ openWindow(link,"Print spine label",400,400); >+ }); > }); > > [% IF ( AmazonCoverImages || LocalCoverImages ) %]$(window).load(function() { >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/labels/spinelabel-home.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/labels/spinelabel-home.tt >index 1e277c5..78a6a66 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/labels/spinelabel-home.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/labels/spinelabel-home.tt >@@ -17,7 +17,7 @@ > <main> > > <h2>Quick spine label creator</h2> >- <form action="/cgi-bin/koha/labels/spinelabel-print.pl" method="post"> >+ <form action="/cgi-bin/koha/labels/spinelabel-print.pl" method="post" id="spinelabelprint"> > <fieldset class="brief"> > <ol> > <li><label for="barcode">Barcode: </label> >@@ -40,6 +40,16 @@ > > [% MACRO jsinclude BLOCK %] > [% Asset.js("js/tools-menu.js") | $raw %] >+ <script> >+ $(document).ready(function(){ >+ $("#spinelabelprint").on("submit", function(e){ >+ e.preventDefault(); >+ var params = $(this).serialize(); >+ openWindow("/cgi-bin/koha/labels/spinelabel-print.pl?" + params,"Print spine label",400,400); >+ $("#barcode").val("").focus(); >+ }); >+ }); >+ </script> > [% END %] > > [% INCLUDE 'intranet-bottom.inc' %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/labels/spinelabel-print.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/labels/spinelabel-print.tt >index 3de990d..089a94d 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/labels/spinelabel-print.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/labels/spinelabel-print.tt >@@ -1,11 +1,9 @@ > [% USE raw %] > [% USE Asset %] > [% SET footerjs = 1 %] >-<!DOCTYPE html> >-[% IF ( bidi ) %]<html lang="[% lang | html %]" dir="[% bidi | html %]">[% ELSE %]<html lang="[% lang | html %]">[% END %] >-<head> >+[% INCLUDE 'doc-head-open.inc' %] > <title>Koha › Tools › Spine labels</title> >-<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> >+[% INCLUDE 'doc-head-close.inc' popup => 1 %] > [% Asset.css("css/spinelabel.css") | $raw %] > <style> > @media print { >@@ -20,24 +18,30 @@ > <p>The barcode [% Barcode | html %] was not found.</p> > <p><a href="spinelabel-home.pl">Return to spine label printer</a></p> > [% ELSE %] >- [% IF ( autoprint ) %] >- <body id="labels_spinelabel-print" class="tools labels" onload="window.print()"> >- [% ELSE %] > <body id="labels_spinelabel-print" class="tools labels"> >- [% END %] >- <span id="spinelabel" class="label"> >+ <div id="spinelabel"> > [% content | $raw %] >- </span> >- <span id="print_button" class="noprint"> >- <button onclick="window.print()">Print this label</button> >- </span> >+ </div> >+ <div id="print_button" class="noprint"> >+ <button class="btn btn-default print-label" onclick="window.print()"><i class="fa fa-print"></i> Print this label</button> >+ </div> > [% END %] > > [% IF ( IntranetUserJS ) %] > [% Asset.js( "lib/jquery/jquery-2.2.3.min.js" ) | $raw %] > [% Asset.js( "lib/jquery/jquery-migrate-1.3.0.min.js" ) | $raw %] >+ [% IF ( autoprint ) %] >+ [% INCLUDE 'slip-print.inc' #printThenClose %] >+ [% END %] > <script> > [% IntranetUserJS | $raw %] >+ $(document).ready(function(){ >+ $(".print-label").on("click", function(e){ >+ e.preventDefault(); >+ window.print(); >+ window.close(); >+ }); >+ }); > </script> > [% END %] > >-- >2.7.4
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 23464
:
92241
|
92445
|
92459
|
92460
|
92531
|
92532