Bug 19708 - Printing code improvements in opac-basket.tt
Summary: Printing code improvements in opac-basket.tt
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: David Bourgault
QA Contact: Testopia
URL:
Keywords: Academy
Depends on:
Blocks:
 
Reported: 2017-11-28 16:03 UTC by David Bourgault
Modified: 2018-12-03 20:03 UTC (History)
5 users (show)

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


Attachments
Bug 19708 - Remove useless code from opac-basket (9.37 KB, patch)
2017-11-28 16:28 UTC, David Bourgault
Details | Diff | Splinter Review
Bug 19708 - Remove useless code from opac-basket (9.56 KB, patch)
2017-12-01 13:27 UTC, Biblibre Sandboxes
Details | Diff | Splinter Review
Bug 19708 - Remove useless code from opac-basket (9.62 KB, patch)
2017-12-01 13:28 UTC, Biblibre Sandboxes
Details | Diff | Splinter Review
Bug 19708 - Remove useless code from opac-basket (9.77 KB, patch)
2018-03-09 15:48 UTC, Maksim Sen
Details | Diff | Splinter Review
Bug 19708 - Remove useless code from opac-basket (9.82 KB, patch)
2018-03-12 10:43 UTC, Biblibre Sandboxes
Details | Diff | Splinter Review
Bug 19708: Improve code for printing the cart in OPAC (9.77 KB, patch)
2018-03-25 20:56 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description David Bourgault 2017-11-28 16:03:43 UTC
The code for the printing function in opac-basket.tt contains a lot of useless branching.

Additionally when printing a short basket (e.g.: 1 notice only), it will still print on two pages.

To reproduce:
0) Add an item to your basket
1) Print basket: there will be an extra blank page after the basket.
(This happens on Chrome and Firefox, I have not tested on other browsers)

Patch will follow shortly.
Comment 1 David Bourgault 2017-11-28 16:28:15 UTC
Created attachment 69417 [details] [review]
Bug 19708 - Remove useless code from opac-basket

This removes a lot of useless code relating to the print function from opac-basket.tt, opac-basket.pl and opac/basket.js.

It also fixes the CSS so that no extra blank page is printed.

To test:
0) Add an item to your cart
1) Print your basket
    Note the appearance of the page. There will be an extra blank page.
2) Apply patch
3) Reload basket
4) Print your basket
    The appearce should be identical. The extra blank page is gone.

This only affects the OPAC.
Comment 2 Biblibre Sandboxes 2017-12-01 13:27:10 UTC
Patch tested with a sandbox, by Tomás Cohen Arazi <tomascohen@theke.io>
Comment 3 Biblibre Sandboxes 2017-12-01 13:27:32 UTC
Created attachment 69432 [details] [review]
Bug 19708 - Remove useless code from opac-basket

This removes a lot of useless code relating to the print function from opac-basket.tt, opac-basket.pl and opac/basket.js.

It also fixes the CSS so that no extra blank page is printed.

To test:
0) Add an item to your cart
1) Print your basket
    Note the appearance of the page. There will be an extra blank page.
2) Apply patch
3) Reload basket
4) Print your basket
    The appearce should be identical. The extra blank page is gone.

This only affects the OPAC.

Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Comment 4 Biblibre Sandboxes 2017-12-01 13:28:10 UTC
Patch tested with a sandbox, by Tomas Cohen Arazi <tomascohen@theke.io>
Comment 5 Biblibre Sandboxes 2017-12-01 13:28:31 UTC
Created attachment 69433 [details] [review]
Bug 19708 - Remove useless code from opac-basket

This removes a lot of useless code relating to the print function from opac-basket.tt, opac-basket.pl and opac/basket.js.

It also fixes the CSS so that no extra blank page is printed.

To test:
0) Add an item to your cart
1) Print your basket
    Note the appearance of the page. There will be an extra blank page.
2) Apply patch
3) Reload basket
4) Print your basket
    The appearce should be identical. The extra blank page is gone.

This only affects the OPAC.

Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 6 Maksim Sen 2018-03-09 15:48:26 UTC
Created attachment 72613 [details] [review]
Bug 19708 - Remove useless code from opac-basket

This removes a lot of useless code relating to the print function from opac-basket.tt, opac-basket.pl and opac/basket.js.

It also fixes the CSS so that no extra blank page is printed.

To test:
0) Add an item to your cart
1) Print your basket
    Note the appearance of the page. There will be an extra blank page.
2) Apply patch
3) Reload basket
4) Print your basket
    The appearce should be identical. The extra blank page is gone.

This only affects the OPAC.

Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 7 Biblibre Sandboxes 2018-03-12 10:43:12 UTC
Patch tested with a sandbox, by claude <claude.brayer@cea.fr>
Comment 8 Biblibre Sandboxes 2018-03-12 10:43:37 UTC
Created attachment 72640 [details] [review]
Bug 19708 - Remove useless code from opac-basket

This removes a lot of useless code relating to the print function from opac-basket.tt, opac-basket.pl and opac/basket.js.

It also fixes the CSS so that no extra blank page is printed.

To test:
0) Add an item to your cart
1) Print your basket
    Note the appearance of the page. There will be an extra blank page.
2) Apply patch
3) Reload basket
4) Print your basket
    The appearce should be identical. The extra blank page is gone.

This only affects the OPAC.

Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: claude <claude.brayer@cea.fr>
Comment 9 Katrin Fischer 2018-03-25 20:56:21 UTC
Created attachment 73270 [details] [review]
Bug 19708: Improve code for printing the cart in OPAC

This removes a lot of useless code relating to the print function from opac-basket.tt, opac-basket.pl and opac/basket.js.

It also fixes the CSS so that no extra blank page is printed.

To test:
0) Add an item to your cart
1) Print your basket
    Note the appearance of the page. There will be an extra blank page.
2) Apply patch
3) Reload basket
4) Print your basket
    The appearce should be identical. The extra blank page is gone.

This only affects the OPAC.

Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: claude <claude.brayer@cea.fr>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 10 Jonathan Druart 2018-03-26 20:35:39 UTC
Pushed to master for 18.05, thanks to everybody involved!
Comment 11 Nick Clemens (kidclamp) 2018-04-23 22:41:14 UTC
Enhancement, skipping for stable