Bug 13388 - Add library pages to the OPAC
Summary: Add library pages to the OPAC
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Owen Leonard
QA Contact: Katrin Fischer
URL:
Keywords:
Depends on:
Blocks: 30873 27360
  Show dependency treegraph
 
Reported: 2014-12-03 14:42 UTC by Magnus Enger
Modified: 2022-06-01 02:30 UTC (History)
8 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
This adds a new link "Libraries" or "Library" to the navigation in the OPAC. The new page it links to gives information about all libraries in the Koha installation, using the data from the library configuration.
Version(s) released in:
20.05.00


Attachments
Bug 13388: Add library pages to the OPAC (10.54 KB, patch)
2020-04-29 11:53 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 13388: Add library pages to the OPAC (11.59 KB, patch)
2020-04-30 15:21 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 13388: Add library pages to the OPAC (11.63 KB, patch)
2020-04-30 20:15 UTC, Victor Grousset/tuxayo
Details | Diff | Splinter Review
Bug 13388: (follow-up) Remove display of email address (1.65 KB, patch)
2020-05-01 12:12 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 13388: Add library pages to the OPAC (11.63 KB, patch)
2020-05-01 12:26 UTC, Victor Grousset/tuxayo
Details | Diff | Splinter Review
Bug 13388: (follow-up) Remove display of email address (1.71 KB, patch)
2020-05-01 12:26 UTC, Victor Grousset/tuxayo
Details | Diff | Splinter Review
Bug 13388: Add library pages to the OPAC (11.69 KB, patch)
2020-05-01 14:14 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 13388: (follow-up) Remove display of email address (1.78 KB, patch)
2020-05-01 14:14 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 13388: (follow-up) Inlcude OpacNav (1.20 KB, patch)
2020-05-01 14:14 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 13388: Add library pages to the OPAC (11.77 KB, patch)
2020-05-01 15:08 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 13388: (follow-up) Remove display of email address (1.83 KB, patch)
2020-05-01 15:09 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 13388: (follow-up) Inlcude OpacNav (1.26 KB, patch)
2020-05-01 15:09 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 13388: (QA follow-up) Add id to nav item and use singleBranchMode (2.54 KB, patch)
2020-05-01 15:09 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Magnus Enger 2014-12-03 14:42:19 UTC
<cait> we talked also about exposing more information about the library
<cait> like opening hours, teh library's name and website
<magnuse> i have been pondering one page per library
<magnuse> and it could be linked from the library name in the items tables
<cait> i hope i got it right, but i think that was what denials mentioned  - that we should link to a separate page
<cait> link to the library on the name and tooltip with opacinfo
<denials> cait, magnuse - that (one page per library, linked from the library name in the items tables) is _exactly_ what I was suggesting! yay for convergence
Comment 1 Owen Leonard 2020-04-29 11:53:54 UTC
Created attachment 103923 [details] [review]
Bug 13388: Add library pages to the OPAC

This patch adds a script and a template for showing library information
pages in the OPAC. A "libraries" page lists all the libraries in the
system, linking to individual pages for each library showing more
information..

If there is only one library in the system the page shows all of that
library's information.

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).

 - Go to /cgi-bin/koha/opac-library.pl in the OPAC.
 - Verify that all the correct information is displayed for the
   libraries in your system.
 - Verify that page title and breadcrumbs look correct.
 - Click to view details for a library.
   - The details page should show the full contents of
     branches.opac_info
   - A menu should show links to other libraries' detail pages.

TODO: How should the page be linked in the OPAC? From the same menu with
Advanced search, Course reserves, etc?
Comment 2 Owen Leonard 2020-04-29 11:54:28 UTC
I don't know if this is really ready for sign-off or not (in particular because of the TODO question above). I'd love to get feedback!
Comment 3 Jonathan Druart 2020-04-29 14:03:37 UTC
(In reply to Owen Leonard from comment #2)
> I don't know if this is really ready for sign-off or not (in particular
> because of the TODO question above). I'd love to get feedback!

From the homepage?
Comment 4 Victor Grousset/tuxayo 2020-04-29 17:30:13 UTC
>  - Verify that page title and breadcrumbs look correct.

Issue with spaces and accents.

>     Home › Libraries › Institut%20Protestant%20de%20Th%C3%A9ologie



> TODO: How should the page be linked in the OPAC? From the same menu with
Advanced search, Course reserves, etc?

That seems a good place. At least a free one ^^ The only other one would be next to "Lists" right? The other places seems to be for custom content?
Comment 5 Owen Leonard 2020-04-30 15:21:59 UTC
Created attachment 104042 [details] [review]
Bug 13388: Add library pages to the OPAC

This patch adds a script and a template for showing library information
pages in the OPAC. A "libraries" page lists all the libraries in the
system, linking to individual pages for each library showing more
information..

If there is only one library in the system the page shows all of that
library's information.

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).

 - Go to /cgi-bin/koha/opac-library.pl in the OPAC.
 - Verify that all the correct information is displayed for the
   libraries in your system.
 - Verify that page title and breadcrumbs look correct.
 - Click to view details for a library.
   - The details page should show the full contents of
     branches.opac_info
   - A menu should show links to other libraries' detail pages.

EDIT: This revised patch adds a "Libraries" link to the links under the
search bar; Corrects encoding in the breadcrumb link; Makes the page
title more specific when viewing an individual library.
Comment 6 Victor Grousset/tuxayo 2020-04-30 20:15:31 UTC
Created attachment 104052 [details] [review]
Bug 13388: Add library pages to the OPAC

This patch adds a script and a template for showing library information
pages in the OPAC. A "libraries" page lists all the libraries in the
system, linking to individual pages for each library showing more
information..

If there is only one library in the system the page shows all of that
library's information.

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).

 - Go to /cgi-bin/koha/opac-library.pl in the OPAC.
 - Verify that all the correct information is displayed for the
   libraries in your system.
 - Verify that page title and breadcrumbs look correct.
 - Click to view details for a library.
   - The details page should show the full contents of
     branches.opac_info
   - A menu should show links to other libraries' detail pages.

EDIT: This revised patch adds a "Libraries" link to the links under the
search bar; Corrects encoding in the breadcrumb link; Makes the page
title more specific when viewing an individual library.

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Comment 7 Victor Grousset/tuxayo 2020-04-30 20:15:52 UTC
All working as expected :D
Comment 8 Victor Grousset/tuxayo 2020-04-30 20:28:07 UTC
QA topic:

Is it necessary to put the email of the branch in a form directly usable by a computer? Even with metadata indicating that it's an email address: the mailto link. Even without it, a clean email address is very recognizable.

Because these are publicly accessible pages and **any generic** crawler for email addresses to spam will find them. That will be a different impact than being available in the public API (the current state), since now it requires a crawler made for Koha.


The thing that made me think of it: (great and not too long resource BTW)
https://softwareengineering.stackexchange.com/questions/46716/what-technical-details-should-a-programmer-of-a-web-application-consider-before

> Don't put users' email addresses in plain text as they will get spammed to death.
Comment 9 Katrin Fischer 2020-04-30 21:04:49 UTC
I think you make a good point. Could we make showing the e-mail optional or protect it in some other way? (other than mailto even?)
Comment 10 Katrin Fischer 2020-04-30 21:06:20 UTC
Hm, I have another thing to add - for some hosted systems like ours the branch email is a noreply and the replyto is the library's email. It all has to do with mail servers being picky about what they think is spam...
Comment 11 Owen Leonard 2020-05-01 12:12:30 UTC
Created attachment 104081 [details] [review]
Bug 13388: (follow-up) Remove display of email address

Since the email address configured for a library may not be the email
address libraries want to use as a contact email address the email
should not be displayed by default.

This patch removes display of the email address. Libraries may choose to
add the information to the opac_info column, so there is already a
built-in alternative.

To test, apply the patch and view the detail page for a library in your
system which has an email address configured. The email address should
not display on the page.
Comment 12 Victor Grousset/tuxayo 2020-05-01 12:26:40 UTC
Created attachment 104083 [details] [review]
Bug 13388: Add library pages to the OPAC

This patch adds a script and a template for showing library information
pages in the OPAC. A "libraries" page lists all the libraries in the
system, linking to individual pages for each library showing more
information..

If there is only one library in the system the page shows all of that
library's information.

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).

 - Go to /cgi-bin/koha/opac-library.pl in the OPAC.
 - Verify that all the correct information is displayed for the
   libraries in your system.
 - Verify that page title and breadcrumbs look correct.
 - Click to view details for a library.
   - The details page should show the full contents of
     branches.opac_info
   - A menu should show links to other libraries' detail pages.

EDIT: This revised patch adds a "Libraries" link to the links under the
search bar; Corrects encoding in the breadcrumb link; Makes the page
title more specific when viewing an individual library.

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Comment 13 Victor Grousset/tuxayo 2020-05-01 12:26:44 UTC
Created attachment 104084 [details] [review]
Bug 13388: (follow-up) Remove display of email address

Since the email address configured for a library may not be the email
address libraries want to use as a contact email address the email
should not be displayed by default.

This patch removes display of the email address. Libraries may choose to
add the information to the opac_info column, so there is already a
built-in alternative.

To test, apply the patch and view the detail page for a library in your
system which has an email address configured. The email address should
not display on the page.

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Comment 14 Martin Renvoize 2020-05-01 13:25:19 UTC
Hmm.. I agree branchemail is probably incorrect as they may, in reality, want the reply-to address instead.

I think this is pretty good as is, but a future enhancement would be nice to have behind a system preference for displaying email or not and then that should use the new method in Koha::Library.
Comment 15 Martin Renvoize 2020-05-01 14:14:52 UTC
Created attachment 104095 [details] [review]
Bug 13388: Add library pages to the OPAC

This patch adds a script and a template for showing library information
pages in the OPAC. A "libraries" page lists all the libraries in the
system, linking to individual pages for each library showing more
information..

If there is only one library in the system the page shows all of that
library's information.

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).

 - Go to /cgi-bin/koha/opac-library.pl in the OPAC.
 - Verify that all the correct information is displayed for the
   libraries in your system.
 - Verify that page title and breadcrumbs look correct.
 - Click to view details for a library.
   - The details page should show the full contents of
     branches.opac_info
   - A menu should show links to other libraries' detail pages.

EDIT: This revised patch adds a "Libraries" link to the links under the
search bar; Corrects encoding in the breadcrumb link; Makes the page
title more specific when viewing an individual library.

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 16 Martin Renvoize 2020-05-01 14:14:55 UTC
Created attachment 104096 [details] [review]
Bug 13388: (follow-up) Remove display of email address

Since the email address configured for a library may not be the email
address libraries want to use as a contact email address the email
should not be displayed by default.

This patch removes display of the email address. Libraries may choose to
add the information to the opac_info column, so there is already a
built-in alternative.

To test, apply the patch and view the detail page for a library in your
system which has an email address configured. The email address should
not display on the page.

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 17 Martin Renvoize 2020-05-01 14:14:58 UTC
Created attachment 104097 [details] [review]
Bug 13388: (follow-up) Inlcude OpacNav

I believe this page should inlclude the optional OpacNav and
OpacNavBottom blocks
Comment 18 Martin Renvoize 2020-05-01 14:17:33 UTC
I felt we should include at least the left side navigation that we have elsewhere on this page and have submitted a followup to achieve this.

I'm still not entirely sure about the menu placement.. it somehow feels out of place amongst the other options.. perhaps in a footer block akin to many other websites out there.?
Comment 19 Martin Renvoize 2020-05-01 14:21:46 UTC
(In reply to Martin Renvoize from comment #18)
> I felt we should include at least the left side navigation that we have
> elsewhere on this page and have submitted a followup to achieve this.
> 
> I'm still not entirely sure about the menu placement.. it somehow feels out
> of place amongst the other options.. perhaps in a footer block akin to many
> other websites out there.?

Or right at the top next to the cart or on the right near the login?
Comment 20 Martin Renvoize 2020-05-01 14:41:07 UTC
Just asked colleagues, and we can point at example for all cases included where it currently is.. so, let's leave it where it is :)
Comment 21 Katrin Fischer 2020-05-01 15:08:56 UTC
Created attachment 104109 [details] [review]
Bug 13388: Add library pages to the OPAC

This patch adds a script and a template for showing library information
pages in the OPAC. A "libraries" page lists all the libraries in the
system, linking to individual pages for each library showing more
information..

If there is only one library in the system the page shows all of that
library's information.

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).

 - Go to /cgi-bin/koha/opac-library.pl in the OPAC.
 - Verify that all the correct information is displayed for the
   libraries in your system.
 - Verify that page title and breadcrumbs look correct.
 - Click to view details for a library.
   - The details page should show the full contents of
     branches.opac_info
   - A menu should show links to other libraries' detail pages.

EDIT: This revised patch adds a "Libraries" link to the links under the
search bar; Corrects encoding in the breadcrumb link; Makes the page
title more specific when viewing an individual library.

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 22 Katrin Fischer 2020-05-01 15:09:00 UTC
Created attachment 104110 [details] [review]
Bug 13388: (follow-up) Remove display of email address

Since the email address configured for a library may not be the email
address libraries want to use as a contact email address the email
should not be displayed by default.

This patch removes display of the email address. Libraries may choose to
add the information to the opac_info column, so there is already a
built-in alternative.

To test, apply the patch and view the detail page for a library in your
system which has an email address configured. The email address should
not display on the page.

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 23 Katrin Fischer 2020-05-01 15:09:06 UTC
Created attachment 104111 [details] [review]
Bug 13388: (follow-up) Inlcude OpacNav

I believe this page should inlclude the optional OpacNav and
OpacNavBottom blocks

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 24 Katrin Fischer 2020-05-01 15:09:10 UTC
Created attachment 104112 [details] [review]
Bug 13388: (QA follow-up) Add id to nav item and use singleBranchMode

This uses the existing singleBranchMode variable to display either
Library or Libraries depending on the number of existing libraries
in the installation.

It also adds an id to the navigation item for customization purposes.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 25 Martin Renvoize 2020-05-04 08:30:37 UTC
Nice work everyone!

Pushed to master for 20.05
Comment 26 Joy Nelson 2020-05-11 20:29:47 UTC
enhancement not backported to 19.11.x
Comment 27 Eric Phetteplace 2021-02-22 19:40:05 UTC
Is there any way to alter the order that branches are listed in on this new page or is it always alphabetically by branch name? I can open a bug for this if it's not already possible, just want to be sure I'm not missing something.
Comment 28 Owen Leonard 2021-02-22 23:35:10 UTC
(In reply to Eric Phetteplace from comment #27)
> is it always alphabetically by branch name?

It is always alphabetical.
Comment 29 Marcel de Rooy 2021-09-30 12:01:56 UTC
Actually just discovered this link on the homepage.
Heh it appears to be rather unnoticeable ;)
Nice.

My first thought here is though: Shouldnt we call it "Library info" ?
At least for a single branch.