From 00261f1902dfd990b8429e34bb041c1579c3bb71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Delaune?= Date: Fri, 9 Mar 2012 12:00:09 +0100 Subject: [PATCH] Bug 7689 : add possibility to hide my tags in opac --- koha-tmpl/opac-tmpl/prog/en/modules/opac-tags.tt | 15 +++++++++++---- opac/opac-tags.pl | 1 + 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-tags.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-tags.tt index e93e00a..d0a300d 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-tags.tt +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-tags.tt @@ -79,10 +79,16 @@
Show up to tags[% IF ( opacuserlogin ) %] from other users[% END %]. - - [% IF ( opacuserlogin ) %][% UNLESS ( loggedinusername ) %] + [% IF ( hidemytags ) %][% END %] + + [% UNLESS ( loggedinusername ) %] Log in to see your own saved tags. - [% END %][% END %]
+ [% ELSE %] + [% IF ( hidemytags ) %]Show my tags + [% ELSE %] + Hide my tags + [% END %] + [% END %]
[% IF ( TAGLOOP ) %] @@ -104,7 +110,7 @@
[% deleted_count %][% IF ( deleted_count ==1 ) %] tag[% ELSE %]tags[% END %] successfully deleted.
[% END %] [% END %] - + [% UNLESS ( hidemytags ) %] [% IF ( MY_TAGS ) %]

My Tags

@@ -124,6 +130,7 @@
[% END %] + [% END %] diff --git a/opac/opac-tags.pl b/opac/opac-tags.pl index b5ce340..ad3afa0 100755 --- a/opac/opac-tags.pl +++ b/opac/opac-tags.pl @@ -292,6 +292,7 @@ if ($add_op) { $previous = $current; } } +$query->param('hidemytags') and $template->param(hidemytags => 1); (scalar @errors ) and $template->param(ERRORS => \@errors); my @orderedresult = sort { uc($a->{'term'}) cmp uc($b->{'term'}) } @$results; (scalar @$results) and $template->param(TAGLOOP => \@orderedresult ); -- 1.7.5.4