Bug 29162: Change template structure on OPAC library page so that a single library...
authorOwen Leonard <oleonard@myacpl.org>
Mon, 4 Oct 2021 19:18:04 +0000 (19:18 +0000)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Tue, 12 Oct 2021 09:15:32 +0000 (11:15 +0200)
commita7f7fba378050b42a09cba527283f01d6770d726
treeba9f6e6f71f878f3aaa0c142d12188d726ce3790
parent4ebf1788c830b378e113da1e37af424f3d85c74f
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. <div id="section_CPL">
- 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.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-library.tt