Bug 14582 - OPAC detail shows an unuseful link to "add tag" when user is not logged in
Summary: OPAC detail shows an unuseful link to "add tag" when user is not logged in
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: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-07-21 14:53 UTC by Sophie MEYNIEUX
Modified: 2016-12-05 21:27 UTC (History)
4 users (show)

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


Attachments
Bug 14582 - OPAC detail shows an unuseful link to "add tag" when user is not logged in (6.59 KB, patch)
2016-03-21 15:44 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 14582 - OPAC detail shows an unuseful link to "add tag" when user is not logged in (6.73 KB, patch)
2016-03-23 08:53 UTC, Marc Véron
Details | Diff | Splinter Review
Bug 14582 - OPAC detail shows an unuseful link to "add tag" when user is not logged in (6.80 KB, patch)
2016-03-23 21:42 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Sophie MEYNIEUX 2015-07-21 14:53:57 UTC
On opac-detail, when a user is not logged in, with Tags enabled, you've got both :
- a link "Add tag(s)" that does nothing
- a comment "Log in to add tags."
We would expect only the comment in this case, and the link when the user is logged-in
Comment 1 Viktor Sarge 2015-08-19 08:21:26 UTC
That is silly. I think "Add tag(s)" is good to have visible in the same place as when it's actually usable. What about "Add tag(s) - requires login"? Ideally that would give a login dialog and then do the normal behavior without leaving the page. Then we keep the same workflow while logged in/not logged in. 

I'll see if anyone in my team can have a look.
Comment 2 Owen Leonard 2016-03-21 15:44:18 UTC Comment hidden (obsolete)
Comment 3 Marc Véron 2016-03-23 08:53:26 UTC Comment hidden (obsolete)
Comment 4 Jonathan Druart 2016-03-23 21:42:55 UTC
Created attachment 49468 [details] [review]
Bug 14582 - OPAC detail shows an unuseful link to "add tag" when user is not logged in

This patch rearranges some parts of the OPAC detail page template so
that the "add tag" link does not appear if the user is not logged in.

This patch also includes some whitespace changes, so please diff
accordingly.

To test, apply the patch and set "TagsEnabled" to "Allow."

- With "TagsInputOnDetail" set to "Allow," view the detail page for a
  bibliographic record in the OPAC when /not/ logged in. You should see
  a "Log in to add tags" link which triggers the login modal when
  clicked.

- Log in and view the same page. Confirm that there is now an "Add
  tag(s)" link which triggers the add tags form. Confirm that the
  behavior of the add tags form is still correct.

- With "TagsInputOnDetail" set to "Don't allow" view the detail page
  again and verify that the "Log in to add tags" link doesn't appear
  when not logged in, and the "Add tags" link doesn't appear when logged
  in.

Followed test plan, works as expected.
Signed-off-by: Marc Véron <veron@veron.ch>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 5 Brendan Gallagher 2016-03-23 23:03:19 UTC
Pushed to Master - Should be in the May 2016 release.  Thanks!