[Koha-patches] [PATCH] BZ 4028 : OPAC search history available to non-logged-in users

matthias.meusburger at biblibre.com matthias.meusburger at biblibre.com
Wed Jan 6 16:43:52 CET 2010


From: Matthias Meusburger <matthias.meusburger at biblibre.com>

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  |   12 +++++++++++-
 .../prog/en/modules/opac-search-history.tmpl       |    1 +
 2 files changed, 12 insertions(+), 1 deletions(-)

diff --git a/koha-tmpl/opac-tmpl/prog/en/includes/masthead.inc b/koha-tmpl/opac-tmpl/prog/en/includes/masthead.inc
index 0112166..11c6f30 100644
--- a/koha-tmpl/opac-tmpl/prog/en/includes/masthead.inc
+++ b/koha-tmpl/opac-tmpl/prog/en/includes/masthead.inc
@@ -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>
diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-search-history.tmpl b/koha-tmpl/opac-tmpl/prog/en/modules/opac-search-history.tmpl
index 2823501..3323ac0 100644
--- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-search-history.tmpl
+++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-search-history.tmpl
@@ -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>
-- 
1.6.3.3




More information about the Koha-patches mailing list