Bugzilla – Attachment 49396 Details for
Bug 14582
OPAC detail shows an unuseful link to "add tag" when user is not logged in
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 14582 - OPAC detail shows an unuseful link to "add tag" when user is not logged in
Bug-14582---OPAC-detail-shows-an-unuseful-link-to-.patch (text/plain), 6.59 KB, created by
Owen Leonard
on 2016-03-21 15:44:18 UTC
(
hide
)
Description:
Bug 14582 - OPAC detail shows an unuseful link to "add tag" when user is not logged in
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2016-03-21 15:44:18 UTC
Size:
6.59 KB
patch
obsolete
>From dd67ee99ed95c798f01a334b667d59fdb677ce9c Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Mon, 21 Mar 2016 10:47:56 -0400 >Subject: [PATCH] Bug 14582 - OPAC detail shows an unuseful link to "add tag" > when user is not logged in >Content-Type: text/plain; charset="utf-8" > >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. >--- > .../opac-tmpl/bootstrap/en/modules/opac-detail.tt | 57 ++++++++++------------ > 1 file changed, 27 insertions(+), 30 deletions(-) > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt >index 6bdcc47..ac7a93c 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt >@@ -397,39 +397,36 @@ > > [% IF ( TagsShowEnabled ) %] > <div class="results_summary tags"> >- [% IF ( TagLoop ) %] >- <span class="label">Tags from this library:</span> >- <ul id="tagslist"> >- [% FOREACH TagLoo IN TagLoop %] >- <li><a href="/cgi-bin/koha/opac-search.pl?tag=[% TagLoo.term |url %]&q=[% TagLoo.term |url %]">[% TagLoo.term |html %]</a> <span class="weight">([% TagLoo.weight_total %])</span> >- [% IF ( loop.last ) %][% ELSE %], [% END %] >- </li> >- [% END %] >- </ul> >- [% ELSE %] >- <span class="label">Tags from this library:</span> <span class="notags">No tags from this library for this title.</span> >- [% END %] >- [% IF ( TagsInputEnabled ) %] <a class="tag_add" id="tag_add[% biblionumber %]" href="#">Add tag(s)</a> [% END %] >- </div> >- [% END # /IF TagsShowEnabled %] >- >- [% IF ( TagsInputEnabled ) %] >- <div class="results_summary tagsinput"> >- [% IF ( loggedinusername ) %] >- <form id="tagform[% biblionumber %]" method="post" action="/cgi-bin/koha/opac-tags.pl" style="display:none;"> >- <label for="newtag[% biblionumber %]">New tag(s), separated by a comma:</label> >- <input name="newtag[% biblionumber %]" id="newtag[% biblionumber %]" maxlength="100" type="text"/> >- <input name="tagbutton" class="btn btn-small tagbutton" title="[% biblionumber %]" type="submit" value="Add" /> >- <a class="cancel_tag_add" id="cancel[% biblionumber %]" href="#">(done)</a> >- </form> >- <span id="newtag[% biblionumber %]_status" class="tagstatus" style="display:none;"> >- Tag status here. >- </span> >+ [% IF ( TagLoop ) %] >+ <span class="label">Tags from this library:</span> >+ <ul id="tagslist"> >+ [% FOREACH TagLoo IN TagLoop %] >+ <li><a href="/cgi-bin/koha/opac-search.pl?tag=[% TagLoo.term |url %]&q=[% TagLoo.term |url %]">[% TagLoo.term |html %]</a> <span class="weight">([% TagLoo.weight_total %])</span> >+ [% IF ( loop.last ) %][% ELSE %], [% END %] >+ </li> >+ [% END %] >+ </ul> > [% ELSE %] >- <span id="login4tags">Log in to add tags.</span> >+ <span class="label">Tags from this library:</span> <span class="notags">No tags from this library for this title.</span> > [% END %] >+ [% IF ( TagsInputEnabled ) %] >+ [% IF ( loggedinusername ) %] >+ <form id="tagform[% biblionumber %]" method="post" action="/cgi-bin/koha/opac-tags.pl" style="display:none;"> >+ <label for="newtag[% biblionumber %]">New tag(s), separated by a comma:</label> >+ <input name="newtag[% biblionumber %]" id="newtag[% biblionumber %]" maxlength="100" type="text"/> >+ <input name="tagbutton" class="btn btn-small tagbutton" title="[% biblionumber %]" type="submit" value="Add" /> >+ <a class="cancel_tag_add" id="cancel[% biblionumber %]" href="#">(done)</a> >+ </form> >+ <span id="newtag[% biblionumber %]_status" class="tagstatus" style="display:none;"> >+ Tag status here. >+ </span> >+ <a class="tag_add" id="tag_add[% biblionumber %]" href="#">Add tag(s)</a> >+ [% ELSE %] >+ <span id="login4tags"><a class="loginModal-trigger" data-toggle="modal" role="button" href="/cgi-bin/koha/opac-user.pl">Log in to add tags.</a></span> >+ [% END %] >+ [% END # / IF TagsInputEnabled %] > </div> >- [% END # / IF TagsInputEnabled %] >+ [% END # /IF TagsShowEnabled %] > > [% IF ( SyndeticsEnabled ) %] > [% IF ( SyndeticsSeries && SyndeticsSERIES1Exists ) %] >-- >2.1.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 14582
:
49396
|
49431
|
49468