Bugzilla – Attachment 165062 Details for
Bug 36610
Some improvements to OPAC print CSS
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 36610: Some improvements to OPAC print CSS
Bug-36610-Some-improvements-to-OPAC-print-CSS.patch (text/plain), 10.01 KB, created by
Matt Blenkinsop
on 2024-04-18 10:11:12 UTC
(
hide
)
Description:
Bug 36610: Some improvements to OPAC print CSS
Filename:
MIME Type:
Creator:
Matt Blenkinsop
Created:
2024-04-18 10:11:12 UTC
Size:
10.01 KB
patch
obsolete
>From 2710b993a27df438081ac47886ed946d92f9dedf Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >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 <matt.blenkinsop@ptfs-europe.com> >--- > .../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 f621e3ab9c..6f4d95ff08 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 71cea64f55..2cbc523382 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 @@ > <strong>[% message.message | html | html_line_break %]</strong><br> > <em>Written on [% message.message_date | $KohaDates %] by [% Branches.GetName(message.branchcode) | html %]</em> > </li> >- <form id="dismiss-message-form" action="/cgi-bin/koha/opac-dismiss-message.pl" method="post"> >+ <form id="dismiss-message-form" class="d-print-none" action="/cgi-bin/koha/opac-dismiss-message.pl" method="post"> > [% INCLUDE 'csrf-token.inc' %] > <input type="hidden" name="message_id" value="[% message.message_id | html %]"> > <input type="hidden" name="patron_id" value="[% message.borrowernumber | html %]"> >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 224c5441ea..d0b3686959 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 @@ > <div id="opac-user-holdsrec"> > <div id="tabs-container"> > <div class="controls"> >- <div class="resultscontrol resort"> >+ <div class="resultscontrol resort d-print-none"> > <form id="sortform" action="/cgi-bin/koha/opac-holdshistory.pl" method="get"> > [% IF ( unlimit ) %]<input type="hidden" name="unlimit" value="1" />[% END %] > <select name="sort" id="sort"> >@@ -83,11 +83,11 @@ > </div> > > [% UNLESS unlimit %] >- <p> >+ <p class="d-print-none"> > Showing 50 items. <a href="/cgi-bin/koha/opac-holdshistory.pl?unlimit=1[% IF ( sort ) %]&sort=[% sort | url %][% END %]">Show all items</a> > </p> > [% ELSE %] >- <p> >+ <p class="d-print-none"> > Showing all items. <a href="/cgi-bin/koha/opac-holdshistory.pl[% IF ( sort ) %]?sort=[% sort | url %][% END %]">Show 50 items</a> > </p> > [% END %] >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-messaging.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-messaging.tt >index 1fa2975e9f..84a5c79d27 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-messaging.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-messaging.tt >@@ -182,7 +182,7 @@ > [% END %] > > [% IF ( SMSSendDriver || Koha.Preference('TranslateNotices') ) %] >- <fieldset class="rows"> >+ <fieldset class="rows d-print-none"> > <ol> > [% IF ( SMSSendDriver ) %] > <li> >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt >index aab73c6d4c..4f89ad20de 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt >@@ -762,7 +762,7 @@ > [% END %] > </td> > <td>[% s.lastmodified | $KohaDates %]</td> >- <td> >+ <td class="d-print-none"> > [% IF s.can_be_managed( loggedinusernumber ) %] > <form action="/cgi-bin/koha/opac-shelves.pl" method="get" class="d-inline"> > <input type="hidden" name="shelfnumber" value="[% s.shelfnumber | html %]" /> >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 %] >- <form action="/cgi-bin/koha/opac-suggestions.pl" class="form-inline" id="search_suggestions_form" method="get"> >+ <form action="/cgi-bin/koha/opac-suggestions.pl" class="form-inline d-print-none" id="search_suggestions_form" method="get"> > <div class="form-row"> > <div class="col-auto my-1"> > <label for="title_filter">Search for:</label> >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 f521bedf47..19cbca555c 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 @@ > > <p>Hello, [% INCLUDE 'patron-title.inc' patron = logged_in_user %] > <br /> >- <a href="/cgi-bin/koha/opac-main.pl?logout.x=1">Click here if you're not [% INCLUDE 'patron-title.inc' patron = logged_in_user %]</a></p> >+ <a href="/cgi-bin/koha/opac-main.pl?logout.x=1" class="d-print-none">Click here if you're not [% INCLUDE 'patron-title.inc' patron = logged_in_user %]</a></p> > > [% IF ( patronupdate ) %]<div class="alert alert-info"><h2>Thank you!</h2><p>Your corrections have been submitted to the library, and a staff member will update your record as soon as possible.</p></div>[% END %] > >@@ -543,9 +543,9 @@ > </tbody> > </table> > [% IF ( canrenew && !userdebarred && OpacRenewalAllowed && !( logged_in_user.is_expired && logged_in_user.category.effective_BlockExpiredPatronOpacActions ) ) %] >- <input type="submit" class="btn btn-primary" value="Renew selected" /> >+ <input type="submit" class="btn btn-primary d-print-none" value="Renew selected" /> > <input type="hidden" name="op" value="cud-renew" /> >- <button type="button" id="renewall_js" class="btn btn-primary">Renew all</button> >+ <button type="button" id="renewall_js" class="btn btn-primary d-print-none">Renew all</button> > [% END %] > </form> > >-- >2.37.1 (Apple Git-137.1)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 36610
:
165025
|
165062
|
166748