From 42cdca450fb27f2ff5e7e1ac2edb5704f2834ae3 Mon Sep 17 00:00:00 2001 From: Owen Leonard 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 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Jonathan Druart --- .../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 e9a52b6..e5db3ff 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 ) %]
- [% IF ( TagLoop ) %] - Tags from this library: -
    - [% FOREACH TagLoo IN TagLoop %] -
  • [% TagLoo.term |html %] ([% TagLoo.weight_total %]) - [% IF ( loop.last ) %][% ELSE %], [% END %] -
  • - [% END %] -
- [% ELSE %] - Tags from this library: No tags from this library for this title. - [% END %] - [% IF ( TagsInputEnabled ) %] Add tag(s) [% END %] -
- [% END # /IF TagsShowEnabled %] - - [% IF ( TagsInputEnabled ) %] -
- [% IF ( loggedinusername ) %] - - + [% IF ( TagLoop ) %] + Tags from this library: +
    + [% FOREACH TagLoo IN TagLoop %] +
  • [% TagLoo.term |html %] ([% TagLoo.weight_total %]) + [% IF ( loop.last ) %][% ELSE %], [% END %] +
  • + [% END %] +
[% ELSE %] - Log in to add tags. + Tags from this library: No tags from this library for this title. [% END %] + [% IF ( TagsInputEnabled ) %] + [% IF ( loggedinusername ) %] + + + Add tag(s) + [% ELSE %] + Log in to add tags. + [% END %] + [% END # / IF TagsInputEnabled %]
- [% END # / IF TagsInputEnabled %] + [% END # /IF TagsShowEnabled %] [% IF ( SyndeticsEnabled ) %] [% IF ( SyndeticsSeries && SyndeticsSERIES1Exists ) %] -- 2.7.0