From 57ddbae230c68a985e33553f33ec14b035701da5 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Wed, 17 Apr 2024 12:55:04 +0000 Subject: [PATCH] Bug 36610: Some improvements to OPAC print CSS This patch makes a few CSS and markup changes to improve the print view. The markup changes use Bootstrap's ".d-print-none" class to hide specific elements without creating an ID or class specifically for those elements. To test, apply the patch and rebuild the OPAC CSS (https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client) - Log in to the OPAC - Test the following user pages by viewing the print preview: - Summary - Holds history - Messaging - Lists - Suggestions - The "Personal details" tab hasn't been improved for printing but it's a good page to view to confirm that the "Back to top" arrow is now hidden in the print view. Signed-off-by: Matt Blenkinsop Signed-off-by: Martin Renvoize Signed-off-by: Katrin Fischer --- .../opac-tmpl/bootstrap/css/src/print.scss | 31 ++++++++++++++++++- .../bootstrap/en/includes/opac-note.inc | 2 +- .../bootstrap/en/modules/opac-holdshistory.tt | 6 ++-- .../bootstrap/en/modules/opac-messaging.tt | 2 +- .../bootstrap/en/modules/opac-shelves.tt | 2 +- .../bootstrap/en/modules/opac-suggestions.tt | 2 +- .../bootstrap/en/modules/opac-user.tt | 6 ++-- 7 files changed, 40 insertions(+), 11 deletions(-) diff --git a/koha-tmpl/opac-tmpl/bootstrap/css/src/print.scss b/koha-tmpl/opac-tmpl/bootstrap/css/src/print.scss index 73679604c9..7ad3fd1902 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/css/src/print.scss +++ b/koha-tmpl/opac-tmpl/bootstrap/css/src/print.scss @@ -221,6 +221,7 @@ body#basket p { #action, #addshelf, +#backtotop, #consentMoreInfo, #cookieConsentFooter, #export, @@ -251,10 +252,38 @@ fieldset.action, h2 span.hint, input, td.resultscontrol, -.cart-control { +.cart-control, +.table_controls, +.dtr-control, +.dtr-hidden, +.selections-toolbar { display: none; } +.dtr-hidden { + display: table-cell !important; +} + +.nav-tabs { + border: 0; + + .nav-link { + border: 0; + display: none; + + &.active { + border: 0; + display: block; + font-size: 125%; + font-weight: bold; + } + } +} + +.tab-content { + border: 0; +} + .row-fluid { margin-top: 30px; } diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-note.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-note.inc index 4d995b49b8..513d963775 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-note.inc +++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-note.inc @@ -7,7 +7,7 @@ [% message.message | html | html_line_break %]
   Written on [% message.message_date | $KohaDates %] by [% Branches.GetName(message.branchcode) | html %] -
+ [% INCLUDE 'csrf-token.inc' %] diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-holdshistory.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-holdshistory.tt index 06d97bb793..3e39a2725b 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-holdshistory.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-holdshistory.tt @@ -71,7 +71,7 @@
-
+
[% IF ( unlimit ) %][% END %] diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-suggestions.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-suggestions.tt index 6bf1a4facb..a1956df42b 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-suggestions.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-suggestions.tt @@ -340,7 +340,7 @@ [% IF (Koha.Preference( 'OPACViewOthersSuggestions' ) || loggedinusername) && (suggestions.size > 0 OR title_filter) %] [% SET can_delete_suggestion = 0 %] - +
diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt index d9c63bebd9..b9be5c22c5 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt @@ -55,7 +55,7 @@

Hello, [% INCLUDE 'patron-title.inc' patron = logged_in_user %]
- Click here if you're not [% INCLUDE 'patron-title.inc' patron = logged_in_user %]

+ Click here if you're not [% INCLUDE 'patron-title.inc' patron = logged_in_user %]

[% IF ( patronupdate ) %]

Thank you!

Your corrections have been submitted to the library, and a staff member will update your record as soon as possible.

[% END %] @@ -551,9 +551,9 @@ [% IF ( canrenew && !userdebarred && OpacRenewalAllowed && !( logged_in_user.is_expired && logged_in_user.category.effective_BlockExpiredPatronOpacActions ) ) %] - + - + [% END %] -- 2.39.5