The tables present on the 'Print summary' option are incredibly wide and unwieldy. This leads to prints getting truncated or defaulting to landscape and a tiny zoom level. We should be able to make these tables fit more manageable onto the print page.
It looks to me like the table gets a fixed width when the page is rendered, and that width is kept both when you resize the browser window, and when the page is printed. When the browser window is at full width, I see this in the "developer tools" view of the page: <table id="print-summary-checkouts" class="dataTable" role="grid" style="width: 1923px;"> <thead> <tr role="row"> <th class="sorting_asc" tabindex="0" aria-controls="print-summary-checkouts" rowspan="1" colspan="1" aria-sort="ascending" aria-label="Title: activate to sort column descending" style="width: 740.5px;">Title</th> <th class="sorting" tabindex="0" aria-controls="print-summary-checkouts" rowspan="1" colspan="1" aria-label="Author: activate to sort column ascending" style="width: 211.5px;">Author</th> <th class="sorting" tabindex="0" aria-controls="print-summary-checkouts" rowspan="1" colspan="1" aria-label="Call number: activate to sort column ascending" style="width: 192.5px;">Call number</th> <th class="sorting" tabindex="0" aria-controls="print-summary-checkouts" rowspan="1" colspan="1" aria-label="Item type: activate to sort column ascending" style="width: 280.5px;">Item type</th> <th class="sorting" tabindex="0" aria-controls="print-summary-checkouts" rowspan="1" colspan="1" aria-label="Date due: activate to sort column ascending" style="width: 148.5px;">Date due</th> <th class="sorting" tabindex="0" aria-controls="print-summary-checkouts" rowspan="1" colspan="1" aria-label="Barcode: activate to sort column ascending" style="width: 190.5px;">Barcode</th> </tr> If i resize the window, the numbers are different: <table id="print-summary-checkouts" class="dataTable" role="grid" style="width: 1152px;"> <thead> <tr role="row"><th class="sorting_asc" tabindex="0" aria-controls="print-summary-checkouts" rowspan="1" colspan="1" aria-sort="ascending" aria-label="Title: activate to sort column descending" style="width: 432.5px;">Title</th> <th class="sorting" tabindex="0" aria-controls="print-summary-checkouts" rowspan="1" colspan="1" aria-label="Author: activate to sort column ascending" style="width: 116.5px;">Author</th> <th class="sorting" tabindex="0" aria-controls="print-summary-checkouts" rowspan="1" colspan="1" aria-label="Call number: activate to sort column ascending" style="width: 104.5px;">Call number</th> <th class="sorting" tabindex="0" aria-controls="print-summary-checkouts" rowspan="1" colspan="1" aria-label="Item type: activate to sort column ascending" style="width: 157.5px;">Item type</th> <th class="sorting" tabindex="0" aria-controls="print-summary-checkouts" rowspan="1" colspan="1" aria-label="Date due: activate to sort column ascending" style="width: 78.5px;">Date due</th> <th class="sorting" tabindex="0" aria-controls="print-summary-checkouts" rowspan="1" colspan="1" aria-label="Barcode: activate to sort column ascending" style="width: 103.5px;">Barcode</th> </tr> I checked a site running 21.05.05 and it looks better there. The table looks like a "regular" table, without the "Columns" link next to the title, and without sortable columns. Maybe related to bug 28450?
Created attachment 135300 [details] [review] Bug 30837 - Fix table width on 'Print summary' To reproduce: - Make sure you have a patron with at least one checkout, one hold and one fine - On the detail page for that patron, go to Print > Print summary - Observe the tables are too wide to fit on a printed page To test: - Apply this patch - Repeat the steps above - Observe the table now fits on the page
Thanks to Owen for suggesting the fix!
Created attachment 135301 [details] [review] Bug 30837 - Fix table width on 'Print summary' To reproduce: - Make sure you have a patron with at least one checkout, one hold and one fine - On the detail page for that patron, go to Print > Print summary - Observe the tables are too wide to fit on a printed page To test: - Apply this patch - Repeat the steps above - Observe the table now fits on the page Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Wow, I was trying to get way too clever with this.. nice one Magnus! Straight PQA, trivial and effective fix.
Pushed to master for 22.11, thanks!
Dont forget to format commit message not like Bug report : https://wiki.koha-community.org/wiki/Commit_messages#Subject_line Should be : Bug 30837: Fix table width on 'Print summary'
Magnus, If you'd like this one in 22.05.x I'm happy to backport it. Could you fix the commit title first?
Please backport until 21.11.x
Created attachment 139044 [details] [review] Bug 30837: Fix table width on 'Print summary' To reproduce: - Make sure you have a patron with at least one checkout, one hold and one fine - On the detail page for that patron, go to Print > Print summary - Observe the tables are too wide to fit on a printed page To test: - Apply this patch - Repeat the steps above - Observe the table now fits on the page Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Lucas, the title should be fixed now.
Backported to 22.05.x for 22.05.04
pushed to 21.11.x for 21.11.11
Not backported to oldoldstable (21.05.x). Feel free to ask if it's needed. Nothing to document, marking resolved.
(In reply to Arthur Suzuki from comment #13) > pushed to 21.11.x for 21.11.11 Great thanks Arthur. It will make happy librarians ^^