Bug 29621 - Add link for Lists on opac-detail.pl
Summary: Add link for Lists on opac-detail.pl
Status: Failed QA
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Owen Leonard
QA Contact: Testopia
URL:
Keywords:
: 19342 (view as bug list)
Depends on: 16551
Blocks:
  Show dependency treegraph
 
Reported: 2021-12-02 14:55 UTC by Barbara Johnson
Modified: 2022-02-18 15:11 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 29621: Add link for Lists on opac-detail.pl (1.99 KB, patch)
2021-12-04 09:08 UTC, Fridolin Somers
Details | Diff | Splinter Review
Bug 29621: Add link for Lists on opac-detail.pl (1.97 KB, patch)
2021-12-04 09:12 UTC, Fridolin Somers
Details | Diff | Splinter Review
Bug 29621: Add link for Lists on opac-detail.pl (2.02 KB, patch)
2021-12-06 17:12 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 29621: (follow-up) Make all views consistent (8.61 KB, patch)
2021-12-06 17:12 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 29621: Add link for Lists on opac-detail.pl (2.07 KB, patch)
2022-02-07 14:44 UTC, Pierre Fagot
Details | Diff | Splinter Review
Bug 29621: (follow-up) Make all views consistent (8.67 KB, patch)
2022-02-07 14:44 UTC, Pierre Fagot
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Barbara Johnson 2021-12-02 14:55:21 UTC
When logged into the OPAC and viewing a results list of titles on opac-search.pl it is possible to see if a title is contained in a List.  The link allows the user to click on it to get to the contents of the List.  It would be helpful if the link for the List was also displayed on opac-detail.pl so the user could get to the results of the List from that page as well.
Comment 1 Owen Leonard 2021-12-03 17:21:08 UTC
The OPAC detail page does currently show links to lists, but only to public lists. I don't think there's any reason why we shouldn't show links to private lists if the user is logged in.
Comment 2 Fridolin Somers 2021-12-04 09:08:21 UTC Comment hidden (obsolete)
Comment 3 Fridolin Somers 2021-12-04 09:12:45 UTC Comment hidden (obsolete)
Comment 4 Owen Leonard 2021-12-06 17:12:38 UTC
Created attachment 128282 [details] [review]
Bug 29621: Add link for Lists on opac-detail.pl

When logged into the OPAC and viewing a results list of titles on
opac-search.pl it is possible to see if a title is contained in a List.
The link allows the user to click on it to get to the contents of the
List.  It would be helpful if the link for the List was also displayed
on opac-detail.pl so the user could get to the results of the List
from that page as well.

This patch uses Koha::Virtualshelves->get_shelves_containing_record()
in opac detail page like it is used in opac results page.

Test plan :
1) Connect to OPAC as user U1
2) Create a public and a private list
3) Add a record B1 to both lists
4) Go to opac detail page of record B1
5) Without patch your see only link to public list, with patch you also
   see link to private list
6) Connect to OPAC as another user U2
7) Add record B1 to a private list
8) Go to opac detail page of record B1
9) With patch, check you see only link to your private list, not to list
   of user U1

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 5 Owen Leonard 2021-12-06 17:12:41 UTC
Created attachment 128283 [details] [review]
Bug 29621: (follow-up) Make all views consistent

This follow-up makes various views more consistent: OPAC search results,
OPAC details, staff search results,  and staff details.

The patch also adds an indication to the user which lists are private.

To test, apply the patch and rebuild the OPAC and staff CSS
(https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client).

Repeat the previous test plan in the OPAC and staff client.
Comment 6 Lucas Gass 2022-01-04 22:09:21 UTC
This is all working fine but the private lists add this bit:

<span class="privateshelf">Private</span>

which creates a display like this:

Lists that include this title: list1 Private | list2 

To me, that looks a little confusing. Would something like this be better?

Lists that include this title: list1(Private) | list2  


Also, lists are pipe separated on the detail page and comma separated on  the results page. Should this be consistent?  Maybe even make them CSS pseudo elements but perhaps we need Bug 27613 to get in first.
Comment 7 Katrin Fischer 2022-01-09 11:02:08 UTC
I see that there is different styling with the Private being no link, grey and italic, but I still feel some urge to add (). Maybe this would also be nicer for screen readers?

Lists that include this title: list1 (Private) | list2
Comment 8 Caroline Cyr La Rose 2022-01-14 22:15:59 UTC
*** Bug 19342 has been marked as a duplicate of this bug. ***
Comment 9 Pierre Fagot 2022-02-07 14:44:37 UTC
Created attachment 130233 [details] [review]
Bug 29621: Add link for Lists on opac-detail.pl

When logged into the OPAC and viewing a results list of titles on
opac-search.pl it is possible to see if a title is contained in a List.
The link allows the user to click on it to get to the contents of the
List.  It would be helpful if the link for the List was also displayed
on opac-detail.pl so the user could get to the results of the List
from that page as well.

This patch uses Koha::Virtualshelves->get_shelves_containing_record()
in opac detail page like it is used in opac results page.

Test plan :
1) Connect to OPAC as user U1
2) Create a public and a private list
3) Add a record B1 to both lists
4) Go to opac detail page of record B1
5) Without patch your see only link to public list, with patch you also
   see link to private list
6) Connect to OPAC as another user U2
7) Add record B1 to a private list
8) Go to opac detail page of record B1
9) With patch, check you see only link to your private list, not to list
   of user U1

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Pierre Fagot <pierre.fagot@biblibre.com>
Comment 10 Pierre Fagot 2022-02-07 14:44:42 UTC
Created attachment 130234 [details] [review]
Bug 29621: (follow-up) Make all views consistent

This follow-up makes various views more consistent: OPAC search results,
OPAC details, staff search results,  and staff details.

The patch also adds an indication to the user which lists are private.

To test, apply the patch and rebuild the OPAC and staff CSS
(https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client).

Repeat the previous test plan in the OPAC and staff client.

Signed-off-by: Pierre Fagot <pierre.fagot@biblibre.com>
Comment 11 Pierre Fagot 2022-02-07 14:47:22 UTC
I have executed the test plan everything is working.
Comment 12 Jonathan Druart 2022-02-18 15:11:57 UTC
catalogue/results.tt has a link to opac-shelves.pl

I am not convinced by this enhancement. It is going to add extra processing for each record displayed in the search result. And this page is already too slow.

Maybe it could be driven by a syspref, off by default?