[Koha-patches] [PATCH] Bug 3408: Tag cloud says login when logged in - fix.

Garry Collum gcollum at gmail.com
Thu Jul 16 18:45:29 CEST 2009


Changed the logic in the html form to have the login prompt only appear if a user is not logged in.  Separated the hidemylist functionality from the "show tags from other users" option.  Created a link for "hide my tags" or "show my tags" depending on context.

The user can now choose how many tags of other users to show, and can also choose whether to show their own tags or not.
---
 koha-tmpl/opac-tmpl/prog/en/css/opac.css           |    4 ++++
 koha-tmpl/opac-tmpl/prog/en/modules/opac-tags.tmpl |   11 ++++++++++-
 2 files changed, 14 insertions(+), 1 deletions(-)

diff --git a/koha-tmpl/opac-tmpl/prog/en/css/opac.css b/koha-tmpl/opac-tmpl/prog/en/css/opac.css
index a87dc1f..7c03aed 100644
--- a/koha-tmpl/opac-tmpl/prog/en/css/opac.css
+++ b/koha-tmpl/opac-tmpl/prog/en/css/opac.css
@@ -831,6 +831,10 @@ a.cancel {
 	padding-left : 1em;
 }
 
+a.hidemytags {
+	padding-left : 2em;
+}
+
 .resultscontrol, .resultscontrol select {
 	font-size: 90%;
 }
diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-tags.tmpl b/koha-tmpl/opac-tmpl/prog/en/modules/opac-tags.tmpl
index 7fd20d0..2f4aa9e 100644
--- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-tags.tmpl
+++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-tags.tmpl
@@ -79,8 +79,17 @@
 		<form method="get" action="opac-tags.pl">
 		<fieldset>Show up to <input name="limit" style="text-align: right;" maxlength="4" size="4" value="<!-- TMPL_VAR NAME="limit" DEFAULT="100" -->" />
 			tags from other users.
+                        <!-- TMPL_IF NAME="hidemytags" -->
 			<input type="hidden" name="hidemytags" value="1" />
-			<input type="submit" value="OK" /> <!-- TMPL_UNLESS NAME="MY_TAGS" --><a href="/cgi-bin/koha/opac-user.pl">Log in</a> to see your own saved tags.<!-- /TMPL_UNLESS --></fieldset>
+                        <!-- /TMPL_IF -->
+			<input type="submit" value="OK" />
+                        <!-- TMPL_UNLESS NAME="loggedinusername" -->
+                          <a href="/cgi-bin/koha/opac-user.pl">Log in</a> to see your own saved tags.
+                        <!-- TMPL_ELSE -->
+                          <!-- TMPL_IF NAME="hidemytags" --><a class="hidemytags" href="/cgi-bin/koha/opac-tags.pl?limit=<!-- TMPL_VAR NAME="limit" DEFAULT="100" -->">Show my tags</a>
+                          <!-- TMPL_ELSE --><a class="hidemytags" href="/cgi-bin/koha/opac-tags.pl?limit=<!-- TMPL_VAR NAME="limit" DEFAULT="100" -->&amp;hidemytags=1">Hide my tags</a>
+                          <!-- /TMPL_IF -->
+                        <!-- /TMPL_UNLESS --></fieldset>
 		</form>
 	
 	<!-- TMPL_IF NAME="TAGLOOP" -->
-- 
1.5.6.5




More information about the Koha-patches mailing list