Bug 23210

Summary: login4tags should be a link
Product: Koha Reporter: Lucas Gass (lukeg) <lucas>
Component: OPACAssignee: Owen Leonard <oleonard>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: minor    
Priority: P5 - low CC: fridolin.somers, jonathan.druart, martin.renvoize
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
19.11.00,19.05.04, 18.11.10
Circulation function:
Bug Depends on:    
Bug Blocks: 23528    
Attachments: Bug 23210: login4tags should be a link and included in every search result
Bug 23210: login4tags should be a link and included in every search result
Bug 23210: (follow-up) Log in for tags link should trigger modal
Bug 23210: login4tags should be a link and included in every search result
Bug 23210: (follow-up) Log in for tags link should trigger modal
Bug 23210: login4tags should be a link
Bug 23210: (follow-up) Log in for tags link should trigger modal
Bug 23210: login4tags should be a link and included in every search result
Bug 23210: (follow-up) Log in for tags link should trigger modal

Description Lucas Gass (lukeg) 2019-06-25 21:01:15 UTC
If a non-authenticated user goes to the search results page they will only see the login4tags (Log in to add tags ) text included with the first result. This should be included with every result. 

Furthermore this seems like it should be a link and it is not. This text should link to /cgi-bin/koha/opac-user.pl
Comment 1 Jonathan Druart 2019-06-29 15:42:50 UTC
It's the expected behavior:

 565 [% ELSIF ( loop.first ) %]
 566     <span class="actions"><span id="login4tags">Log in to add tags.</span></span>
 567 [% END # IF loggedinusername %]


From commit 4073b27c503f8192a144b4762e6ff5d40576627f

    Wrap up Tags integration - add sysprefs for new installs.

    Note that when the user is not logged in, the Tags input box/button will not display.
    The user will see a message telling them to log in to add tags.  However, in order to
    keep the results display clean, the message will display only once, utilizing the loop
    context variable "__first__".  Useful stuff!
Comment 2 Lucas Gass (lukeg) 2019-08-02 22:22:53 UTC Comment hidden (obsolete)
Comment 3 Lucas Gass (lukeg) 2019-08-02 22:24:09 UTC Comment hidden (obsolete)
Comment 4 Lucas Gass (lukeg) 2019-08-02 22:25:58 UTC
this patch adds a link but does not attempt to add the button to every search results. As Jonathon noted that would keep the results page very clean.
Comment 5 Owen Leonard 2019-08-05 14:31:44 UTC
Created attachment 91998 [details] [review]
Bug 23210: login4tags should be a link and included in every search result

TEST PLAN:

1. Make sure TagsEnabled and TagsInputOnList are set to allow.
2. Don't be logged into the OPAC.
3. Make a search and notice the 'Log in to add tags' text is not a link
   on the results page.
4. Apply patch
5. Refresh OPAC results page
6. 'Log in to add tags' takes you to the login page.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 6 Owen Leonard 2019-08-05 14:31:47 UTC
Created attachment 91999 [details] [review]
Bug 23210: (follow-up) Log in for tags link should trigger modal

This patch modifies the "Log in to add tags" link on the OPAC search
results page, adding the class which is used elsewhere in the OPAC
templates for triggering the login modal.

Also: Removed an unnecessary period.

To test, apply the patch and follow the original test plan. Clicking the
"Log in to add tags" link should trigger the login modal. After logging
in you should be returned to the page you were on.
Comment 7 Michal Denar 2019-08-30 19:45:48 UTC
Created attachment 92512 [details] [review]
Bug 23210: login4tags should be a link and included in every search result

TEST PLAN:

1. Make sure TagsEnabled and TagsInputOnList are set to allow.
2. Don't be logged into the OPAC.
3. Make a search and notice the 'Log in to add tags' text is not a link
   on the results page.
4. Apply patch
5. Refresh OPAC results page
6. 'Log in to add tags' takes you to the login page.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Michal Denar <black23@gmail.com>
Comment 8 Michal Denar 2019-08-30 19:45:52 UTC
Created attachment 92513 [details] [review]
Bug 23210: (follow-up) Log in for tags link should trigger modal

This patch modifies the "Log in to add tags" link on the OPAC search
results page, adding the class which is used elsewhere in the OPAC
templates for triggering the login modal.

Also: Removed an unnecessary period.

To test, apply the patch and follow the original test plan. Clicking the
"Log in to add tags" link should trigger the login modal. After logging
in you should be returned to the page you were on.

Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Michal Denar <black23@gmail.com>
Comment 9 Jonathan Druart 2019-09-01 18:34:28 UTC
Created attachment 92518 [details] [review]
Bug 23210: login4tags should be a link

TEST PLAN:

1. Make sure TagsEnabled and TagsInputOnList are set to allow.
2. Don't be logged into the OPAC.
3. Make a search and notice the 'Log in to add tags' text is not a link
   on the results page.
4. Apply patch
5. Refresh OPAC results page
6. 'Log in to add tags' takes you to the login page.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 10 Jonathan Druart 2019-09-01 18:34:32 UTC
Created attachment 92519 [details] [review]
Bug 23210: (follow-up) Log in for tags link should trigger modal

This patch modifies the "Log in to add tags" link on the OPAC search
results page, adding the class which is used elsewhere in the OPAC
templates for triggering the login modal.

Also: Removed an unnecessary period.

To test, apply the patch and follow the original test plan. Clicking the
"Log in to add tags" link should trigger the login modal. After logging
in you should be returned to the page you were on.

Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 11 Katrin Fischer 2019-09-01 20:14:25 UTC
Created attachment 92522 [details] [review]
Bug 23210: login4tags should be a link and included in every search result

TEST PLAN:

1. Make sure TagsEnabled and TagsInputOnList are set to allow.
2. Don't be logged into the OPAC.
3. Make a search and notice the 'Log in to add tags' text is not a link
   on the results page.
4. Apply patch
5. Refresh OPAC results page
6. 'Log in to add tags' takes you to the login page.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 12 Katrin Fischer 2019-09-01 20:14:32 UTC
Created attachment 92523 [details] [review]
Bug 23210: (follow-up) Log in for tags link should trigger modal

This patch modifies the "Log in to add tags" link on the OPAC search
results page, adding the class which is used elsewhere in the OPAC
templates for triggering the login modal.

Also: Removed an unnecessary period.

To test, apply the patch and follow the original test plan. Clicking the
"Log in to add tags" link should trigger the login modal. After logging
in you should be returned to the page you were on.

Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 13 Katrin Fischer 2019-09-01 20:19:34 UTC
(In reply to Lucas Gass from comment #0)
> If a non-authenticated user goes to the search results page they will only
> see the login4tags (Log in to add tags ) text included with the first
> result. This should be included with every result. 

This part is still not fixed - I've filed a new bug.

Bug 23528 - Show 'log in to add tags' link on all search result entries
Comment 14 Martin Renvoize (ashimema) 2019-09-06 12:12:22 UTC
Nice work!

Pushed to master for 19.11.00
Comment 15 Fridolin Somers 2019-09-09 07:18:52 UTC
Pushed to 19.05.x for 19.05.04
Comment 16 Lucas Gass (lukeg) 2019-09-24 20:31:13 UTC
backported to 18.11.x for 18.11.10