Bug 19708

Summary: Printing code improvements in opac-basket.tt
Product: Koha Reporter: David Bourgault <david.bourgault>
Component: OPACAssignee: David Bourgault <david.bourgault>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: david.bourgault, katrin.fischer, m.de.rooy, nick, philippe.blouin, sandboxes
Version: MainKeywords: Academy
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:
Attachments: Bug 19708 - Remove useless code from opac-basket
Bug 19708 - Remove useless code from opac-basket
Bug 19708 - Remove useless code from opac-basket
Bug 19708 - Remove useless code from opac-basket
Bug 19708 - Remove useless code from opac-basket
Bug 19708: Improve code for printing the cart in OPAC

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 2018-04-23 22:41:14 UTC
Enhancement, skipping for stable