Bug 7547 - Printing a sorted cart
Summary: Printing a sorted cart
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Templates (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Owen Leonard
QA Contact: Josef Moravec
URL:
Keywords:
Depends on:
Blocks: 21145 25274
  Show dependency treegraph
 
Reported: 2012-02-15 20:26 UTC by Nicole C. Engard
Modified: 2020-04-24 11:47 UTC (History)
8 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Medium patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Cart, sorted by "Items" then printed using the browser's "Print" option (Control-P) (95.48 KB, application/pdf)
2014-08-19 21:10 UTC, Barton Chittenden
Details
Same cart, sorted identically, but printed using the koha print button. (27.51 KB, application/pdf)
2014-08-19 21:12 UTC, Barton Chittenden
Details
Bug 7547: printing a sorted cart (319.75 KB, patch)
2018-06-21 18:13 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 7547: printing a sorted cart (319.80 KB, patch)
2018-06-25 20:18 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 7547: printing a sorted cart (319.86 KB, patch)
2018-06-27 13:20 UTC, Josef Moravec
Details | Diff | Splinter Review
Bug 7547: (QA follow-up) Make button background transparent for consistency (90.65 KB, patch)
2018-06-27 13:20 UTC, Josef Moravec
Details | Diff | Splinter Review
Bug 7547: printing a sorted cart (318.30 KB, patch)
2018-07-02 11:58 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 7547: (QA follow-up) Make button background transparent for consistency (1.07 KB, patch)
2018-07-02 11:58 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 7547: (RM follow-up) Compiled css (88.27 KB, patch)
2018-07-02 11:58 UTC, Nick Clemens
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Nicole C. Engard 2012-02-15 20:26:21 UTC
It would be nice if in the OPAC cart you could sort the contents before printing (and print the sorted contents).

Even if someone tries to sort results by call number before putting them into
the cart, the cart is often the product of multiple searches so the patron ends
up with a mixed-up list of call numbers.
Comment 1 Barton Chittenden 2014-08-19 21:06:23 UTC
I had one of our partners report this as an issue today.
Comment 2 Barton Chittenden 2014-08-19 21:10:43 UTC
Created attachment 31000 [details]
Cart, sorted by "Items" then printed using the browser's "Print" option (Control-P)
Comment 3 Barton Chittenden 2014-08-19 21:12:28 UTC
Created attachment 31001 [details]
Same cart, sorted identically, but printed using the koha print button.
Comment 4 Barton Chittenden 2014-08-19 21:15:52 UTC
Note that the issue occurs in both OPAC and Staff Client.
Comment 5 Patrick Robitaille 2018-04-27 19:25:14 UTC
Hi, 

I wonder if someone is working on the problem. It still persists in version 17.05 of Koha.

Thanks, Patrick.
Comment 6 Katrin Fischer 2018-04-29 22:14:56 UTC
Updating to be a bug.
Comment 7 Owen Leonard 2018-06-21 18:13:24 UTC Comment hidden (obsolete)
Comment 8 Katrin Fischer 2018-06-25 06:39:00 UTC
This seems to work well, but I want to check the other changed pages still. 

Something I notices on the printout is that the printing runs into the footers/headers in Firefox and there is only very little to no margin on the left and right. Not sure if we can do something about this, seems similar with the existing print feature.
Comment 9 Katrin Fischer 2018-06-25 20:18:54 UTC Comment hidden (obsolete)
Comment 10 Josef Moravec 2018-06-27 13:20:35 UTC Comment hidden (obsolete)
Comment 11 Josef Moravec 2018-06-27 13:20:40 UTC Comment hidden (obsolete)
Comment 12 Nick Clemens 2018-07-02 11:58:05 UTC
Created attachment 76623 [details] [review]
Bug 7547: printing a sorted cart

This patch adds a DataTables-generated print button to the OPAC cart. To
make that process easier, the DataTables plugin has been upgraded to the
latest version (1.10.18) with the Buttons plugin included.

Changes to the OPAC LESS file style the DataTables button to look like
the static version.

Other templates in the OPAC which use the DataTables plugin have been
modified to use up-to-date option names.

To test, apply the patch and add several titles to the cart.

 - Open the cart
 - Re-sort the cart using something other than the default sort
 - Click the 'Print' button.
   - A print view should open in a separate window, sorted correctly,
     and automatically show the print dialog.
 - Click the cart's 'More details' button and click the print button.
   - This should trigger the print dialog directly.

 - Test DataTables sorting on other modified pages:
    - Bibliographic detail page (holdings table)
    - Course reserves (table of courses)
      - Course details (table of titles)
    - Full subscription history
      - Detail page for a subscription -> More details -> Full history
    - Most popular
    - Purchase suggestions
    - Self checkouts
    - Tag cloud
    - Your fines
    - Your interlibrary loan requests
    - Your reading history
    - Your search history
    - Your search IDREF for ppn (I don't know how to test this)

The DataTables plugin is removed from "Your routing lists" and Self
check-in because it is unused.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 13 Nick Clemens 2018-07-02 11:58:08 UTC
Created attachment 76624 [details] [review]
Bug 7547: (QA follow-up) Make button background transparent for consistency

Test plan:
Add some records to cart in opac and show the cart, look at the print button/link
--> without patch it has darker background than other buttons
--> with this patch it has the same background

Note: tested wir firefox 45, firefox 60 and chromium 66

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 14 Nick Clemens 2018-07-02 11:58:12 UTC
Created attachment 76625 [details] [review]
Bug 7547: (RM follow-up) Compiled css
Comment 15 Nick Clemens 2018-07-02 13:16:17 UTC
Awesome work all!

Pushed to master for 18.11
Comment 16 Martin Renvoize 2018-07-02 17:11:35 UTC
Enhancement, not porting to 18.05.x series.
Comment 17 Jonathan Druart 2018-08-01 19:53:02 UTC
Since these patches the "Column visibility" button is displayed at the OPAC: https://screenshots.firefox.com/OEOzq6a0aEozv8rU/catalogue.kohadev.org

It should not.
Comment 18 Josef Moravec 2018-08-02 06:49:41 UTC
(In reply to Jonathan Druart from comment #17)
> Since these patches the "Column visibility" button is displayed at the OPAC:
> https://screenshots.firefox.com/OEOzq6a0aEozv8rU/catalogue.kohadev.org
> 
> It should not.

True, I filled a new Bug 21145 for this