Bug 3408: Tag cloud says login when logged in - fix.
authorGarry Collum <gcollum@gmail.com>
Thu, 16 Jul 2009 16:45:29 +0000 (12:45 -0400)
committerHenri-Damien LAURENT <henridamien.laurent@biblibre.com>
Wed, 16 Sep 2009 21:19:20 +0000 (23:19 +0200)
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.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
koha-tmpl/opac-tmpl/prog/en/css/opac.css
koha-tmpl/opac-tmpl/prog/en/modules/opac-tags.tmpl

index 8148f68..6c5e963 100644 (file)
@@ -801,6 +801,10 @@ a.cancel {
        padding-left : 1em;
 }
 
+a.hidemytags {
+       padding-left : 2em;
+}
+
 .resultscontrol, .resultscontrol select {
        font-size: 90%;
 }
index 7fd20d0..2f4aa9e 100644 (file)
                <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" -->