From 9b9205e326eae5c50015342ae6f23035b6e0300f 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. --- .../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 f621e3ab9cb..6f4d95ff089 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, #export, #facetcontainer, #members, @@ -248,10 +249,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 71cea64f556..2cbc523382e 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 224c5441ead..d0b36869597 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-holdshistory.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-holdshistory.tt @@ -70,7 +70,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 6bf1a4facbb..a1956df42b3 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 f521bedf47e..19cbca555ca 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 %] @@ -543,9 +543,9 @@ [% IF ( canrenew && !userdebarred && OpacRenewalAllowed && !( logged_in_user.is_expired && logged_in_user.category.effective_BlockExpiredPatronOpacActions ) ) %] - + - + [% END %] -- 2.39.2