BZ 4028 : OPAC search history available to non-logged-in users
authorMatthias Meusburger <matthias.meusburger@biblibre.com>
Wed, 6 Jan 2010 15:43:52 +0000 (16:43 +0100)
committerHenri-Damien LAURENT <henridamien.laurent@biblibre.com>
Thu, 7 Jan 2010 15:43:34 +0000 (16:43 +0100)
The "search history" link and the "delete history" link are now correctly displayed after the first search.
Moreover, an additional "delete history" link as been added on the "search history" page itself.

koha-tmpl/opac-tmpl/prog/en/includes/masthead.inc
koha-tmpl/opac-tmpl/prog/en/modules/opac-search-history.tmpl

index 0112166..11c6f30 100644 (file)
@@ -1,6 +1,16 @@
 <div id="header-wrapper"><div id="members">
   <!-- TMPL_IF NAME="opacuserlogin" -->
-       <ul><!-- TMPL_IF NAME="loggedinusername" --><li><span class="members">Welcome, <a href="/cgi-bin/koha/opac-user.pl"><span class="loggedinusername"><!-- TMPL_LOOP NAME="USER_INFO" --><!-- TMPL_VAR NAME="title" --> <!-- TMPL_VAR NAME="firstname" --> <!-- TMPL_VAR NAME="surname" --><!-- /TMPL_LOOP --></span></a></span></li><!-- TMPL_IF NAME="ShowOpacRecentSearchLink" --><li><a href="/cgi-bin/koha/opac-search-history.pl" title="View your search history">Search history</a> [<a href="/cgi-bin/koha/opac-search-history.pl?action=delete" title="Delete your search history" onclick="javascript:return confirm(_('Are you sure you want to delete your search history?'));">x</a>]</li> <!-- /TMPL_IF --><li><a class="logout" id="logout" href="/cgi-bin/koha/opac-main.pl?logout.x=1">Log Out</a></li><!-- TMPL_ELSE --><li><a href="/cgi-bin/koha/opac-user.pl">Log in to Your Account</a></li><!-- /TMPL_IF -->
+       <ul>
+            <!-- TMPL_IF NAME="ShowOpacRecentSearchLink" -->
+                <li><a href="/cgi-bin/koha/opac-search-history.pl" title="View your search history">Search history</a> [<a href="/cgi-bin/koha/opac-search-history.pl?action=delete" title="Delete your search history" onclick="javascript:return confirm(_('Are you sure you want to delete your search history?'));">x</a>]</li>
+            <!-- /TMPL_IF -->
+
+            <!-- TMPL_IF NAME="loggedinusername" -->
+                <li><span class="members">Welcome, <a href="/cgi-bin/koha/opac-user.pl"><span class="loggedinusername"><!-- TMPL_LOOP NAME="USER_INFO" --><!-- TMPL_VAR NAME="title" --> <!-- TMPL_VAR NAME="firstname" --> <!-- TMPL_VAR NAME="surname" --><!-- /TMPL_LOOP --></span></a></span></li>
+                <li><a class="logout" id="logout" href="/cgi-bin/koha/opac-main.pl?logout.x=1">Log Out</a></li>
+            <!-- TMPL_ELSE -->
+                <li><a href="/cgi-bin/koha/opac-user.pl">Log in to Your Account</a></li>
+            <!-- /TMPL_IF -->
        </ul>   
   <!-- /TMPL_IF -->
 </div>
index 2823501..3323ac0 100644 (file)
@@ -26,6 +26,7 @@
         <div class="container">
        <h1>Search history</h1>
        <!-- TMPL_IF EXPR="recentSearches || previousSearches" -->
+           <a href="/cgi-bin/koha/opac-search-history.pl?action=delete" title="Delete your search history" onclick="javascript:return confirm(_('Are you sure you want to delete your search history?'));">Delete your search history</a>
            <!-- TMPL_IF NAME="recentSearches" -->
            <!-- TMPL_IF NAME="previousSearches" -->
            <h2>Current session</h2>