Bug 23464

Summary: Update the process of quick spine label printing
Product: Koha Reporter: Owen Leonard <oleonard>
Component: Label/patron card printingAssignee: Owen Leonard <oleonard>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: cbrannon, fridolin.somers, katrin.fischer, martin.renvoize, maryse.simard
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
19.11.00
Attachments: Bug 23464: Update the process of quick spine label printing
Bug 23464: (follow-up) QA fixes
Bug 23464: Update the process of quick spine label printing
Bug 23464: (follow-up) QA fixes
Bug 23464: Update the process of quick spine label printing
Bug 23464: (follow-up) QA fixes

Description Owen Leonard 2019-08-14 21:38:17 UTC
While updating the spine label print link on the bibliographic detail page I found some things that might make spine label printing better:

From both the detail page and the Quick spine label creator page, the button should trigger a small popup window instead of navigating to a big blank page. The window should have a footer with the "print" button which, when clicked, closes the window at the same time it triggers the print function.
Comment 1 Owen Leonard 2019-08-15 15:16:22 UTC Comment hidden (obsolete)
Comment 2 Maryse Simard 2019-08-16 19:38:37 UTC
For me, even with SpineLabelAutoPrint enabled, the print dialog doesn't show automatically. It seems to be because the test for the syspref is inside an [% IF ( IntranetUserJS ) %] block. As a matter of fact, when I try putting some code in IntranetUserJS, the SpineLabelAutoPrint syspref then works as expected.

Also, when I search for a barcode that doesn't exist, the pop-up tells me the barcode is not found with a link to go back to the previous page. I think it would be nicer and make more sense if the link would be replaced by a close button (or even removed altogether) since we don't want to go back to the page in the popup window. Maybe a close button looking just like the one for printing when the barcode is found? (I like that button, I think it looks really good)

Everything else works perfectly!
Comment 3 Owen Leonard 2019-08-23 11:39:28 UTC Comment hidden (obsolete)
Comment 4 Maryse Simard 2019-08-23 18:04:41 UTC Comment hidden (obsolete)
Comment 5 Maryse Simard 2019-08-23 18:04:43 UTC Comment hidden (obsolete)
Comment 6 Katrin Fischer 2019-09-02 05:53:33 UTC
I am testing this with the sample data and the callnumber is not showing up for me in the print preview:

3999900000018
005.13/3

Can someone confirm?
Comment 7 Katrin Fischer 2019-09-02 05:56:53 UTC
(In reply to Katrin Fischer from comment #6)
> I am testing this with the sample data and the callnumber is not showing up
> for me in the print preview:
> 
> 3999900000018
> 005.13/3
> 
> Can someone confirm?

Fixed... the item didn't have a callnumber saved. What I saw was the unsafed suggestion from the itemcallnumber syspref in the edit form...
Comment 8 Katrin Fischer 2019-09-02 05:58:29 UTC
Created attachment 92531 [details] [review]
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>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 9 Katrin Fischer 2019-09-02 05:58:33 UTC
Created attachment 92532 [details] [review]
Bug 23464: (follow-up) QA fixes

This patch corrects two issues raised during testing:

 - Move JavaScript out of template check for IntranetUserJS so that
   SpineLabelAutoPrint behavior works correctly.
 - Add "close" button to pop-up window for cases when the barcode was
   not found.

Also changed:

- Added "required" attribute to barcode input on quick spine
  label printing page so that submitting an empty form will not work.

- Tweaked CSS slightly to fix alignment of spine label form and submit
  button. (You must rebuild the staff client CSS:
 https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client)

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 10 Martin Renvoize 2019-09-09 10:34:11 UTC
Nice work!

Pushed to master for 19.11.00
Comment 11 Fridolin Somers 2019-09-13 12:43:27 UTC
Enhancement not pushed to 19.05.x