BZ 4028 : OPAC search history available to non-logged-in users

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.
This commit is contained in:
Matthias Meusburger 2010-01-06 16:43:52 +01:00 committed by Henri-Damien LAURENT
parent f5de454caa
commit bcfbe391c7
2 changed files with 12 additions and 1 deletions

View 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>

View 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>