From de5d55633e3a970315b0947e0167690e796e53ee Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Mon, 4 Oct 2021 19:18:04 +0000 Subject: [PATCH] Bug 29162: Change template structure on OPAC library page so that a single library can easily be hidden This patch adds markup to the OPAC library page so that CSS or JS can more easily target elements of the page: - Each library is wrapped in a div, e.g.
- Classes are added to the paragraphs containing phone, fax, URL, and library description. - An ID has been added to the menu of libraries in the sidebar so that they can be targetted individually. To test, apply the patch and go to Administration -> System prefernces. - Add some testing CSS to the OPACUserCSS system preference, if necessary replacing "CPL" with a branchcode in your system: div#section_CPL, li#menu_CPL { font-size: 80%; } - In the OPAC, view the "Libraries" page. - In the view of all libraries you should see your CSS reflected in the section for that library. - In the individual library view you should see the menu item for that library affected by your custom CSS. --- .../bootstrap/en/modules/opac-library.tt | 50 ++++++++++++------- 1 file changed, 32 insertions(+), 18 deletions(-) diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-library.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-library.tt index 2c3add4825..8fc5f3d5f7 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-library.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-library.tt @@ -16,7 +16,16 @@ [% END %] catalog [% INCLUDE 'doc-head-close.inc' %] -[% BLOCK cssinclude %][% END %] +[% BLOCK cssinclude %] + +[% END %] [% INCLUDE 'bodytag.inc' bodyid='opac-library' bodyclass='scrollto' %] @@ -33,13 +42,13 @@ [% PROCESS 'display-library-address' %]
[% IF ( library.branchphone ) %] -

Phone: [% library.branchphone | html %]

+

Phone: [% library.branchphone | html %]

[% END %] [% IF ( library.branchfax ) %] -

Fax: [% library.branchfax | html %]

+

Fax: [% library.branchfax | html %]

[% END %] [% IF ( library.branchurl ) %] -

[% library.branchurl | html %]

+

[% library.branchurl | html %]

[% END %] [% END %] @@ -86,8 +95,10 @@
[% PROCESS library_info %] [% IF ( library.opac_info ) %] -
- [% PROCESS library_description %] +
+
+ [% PROCESS library_description %] +
[% END %]
@@ -96,13 +107,13 @@
-- 2.20.1