Bugzilla – Attachment 1785 Details for
Bug 4024
Search history template problems
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Proposed fix
0001-Fix-for-Bug-4024-Search-history-template-problems-an.patch (text/plain), 9.54 KB, created by
Chris Cormack
on 2010-01-07 15:03:00 UTC
(
hide
)
Description:
Proposed fix
Filename:
MIME Type:
Creator:
Chris Cormack
Created:
2010-01-07 15:03:00 UTC
Size:
9.54 KB
patch
obsolete
>From 81ff33a8bf4e7f8955fac530330e87fd607f4cff Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Thu, 7 Jan 2010 09:47:22 -0500 >Subject: [PATCH] Fix for Bug 4024, Search history template problems, and other fixes. > >- Markup corrections >- Removing TMPL EXPR >- Converting delete link to FORM ("destructive" actions shouldn't be links) >- Adding "search history" link to logged-in user's sidebar menu >--- > koha-tmpl/opac-tmpl/prog/en/css/opac.css | 5 +-- > koha-tmpl/opac-tmpl/prog/en/includes/masthead.inc | 12 +++++- > koha-tmpl/opac-tmpl/prog/en/includes/usermenu.inc | 3 + > .../prog/en/modules/opac-search-history.tmpl | 47 +++++++++++++------ > opac/opac-search-history.pl | 3 + > 5 files changed, 50 insertions(+), 20 deletions(-) > >diff --git a/koha-tmpl/opac-tmpl/prog/en/css/opac.css b/koha-tmpl/opac-tmpl/prog/en/css/opac.css >index 9e30270..17093e7 100644 >--- a/koha-tmpl/opac-tmpl/prog/en/css/opac.css >+++ b/koha-tmpl/opac-tmpl/prog/en/css/opac.css >@@ -611,15 +611,12 @@ body#advsearch #listsmenulink { > text-decoration : none; > } > >-#members li:first-child { >- border-right : 1px solid black; >-} >- > #members li:last-child { > border-right : 0; > } > > #members li { >+ border-right : 1px solid black; > display : inline; > list-style : none; > margin : 0; >diff --git a/koha-tmpl/opac-tmpl/prog/en/includes/masthead.inc b/koha-tmpl/opac-tmpl/prog/en/includes/masthead.inc >index 0112166..f3916e6 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_UNLESS NAME="loggedinusername" --> >+ <li><a href="/cgi-bin/koha/opac-user.pl">Log in to Your Account</a></li><!-- /TMPL_UNLESS --> >+ <!-- 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 --> >+ <!-- TMPL_IF NAME="ShowOpacRecentSearchLink" --> >+ <li><a href="/cgi-bin/koha/opac-search-history.pl" title="View your search history">Search history</a> [<a class="logout" href="/cgi-bin/koha/opac-search-history.pl?action=delete" title="Delete your search history" onclick="return confirm(_('Are you sure you want to delete your search history?'));">x</a>]</li> >+ <!-- /TMPL_IF --> >+ <!-- TMPL_IF NAME="loggedinusername" --><li><a class="logout" id="logout" href="/cgi-bin/koha/opac-main.pl?logout.x=1">Log Out</a></li><!-- /TMPL_IF --> > </ul> > <!-- /TMPL_IF --> > </div> >diff --git a/koha-tmpl/opac-tmpl/prog/en/includes/usermenu.inc b/koha-tmpl/opac-tmpl/prog/en/includes/usermenu.inc >index 5d1c50f..26bf502 100644 >--- a/koha-tmpl/opac-tmpl/prog/en/includes/usermenu.inc >+++ b/koha-tmpl/opac-tmpl/prog/en/includes/usermenu.inc >@@ -12,6 +12,9 @@ > <!-- TMPL_IF NAME="OpacPasswordChange" --> > <!-- TMPL_IF NAME="passwdview" --><li class="active"><!-- TMPL_ELSE --><li><!-- /TMPL_IF --><a href="/cgi-bin/koha/opac-passwd.pl">change my password</a></li> > <!-- /TMPL_IF --> >+ <!-- TMPL_IF NAME="ShowOpacRecentSearchLink" --> >+ <!-- TMPL_IF NAME="searchhistoryview" --><li class="active"><!-- TMPL_ELSE --><li><!-- /TMPL_IF --><a href="/cgi-bin/koha/opac-search-history.pl">my search history</a></li> >+ <!-- /TMPL_IF --> > <!-- TMPL_IF NAME="opacreadinghistory" --> > <!-- TMPL_IF NAME="readingrecview" --><li class="active"><!-- TMPL_ELSE --><li><!-- /TMPL_IF --><a href="/cgi-bin/koha/opac-readingrecord.pl">my reading history</a></li> > <!-- /TMPL_IF --> >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..90fc569 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 >@@ -8,7 +8,8 @@ > // We show table ordered by descending dates by default > // (so that the more recent query is shown first) > $.tablesorter.defaults.sortList = [[0,1]]; >- $("#historyt").tablesorter({<!-- TMPL_IF EXPR="dateformat eq 'metric'" --> >+ $(".historyt").tablesorter({ >+ widgets : ['zebra'],<!-- TMPL_IF EXPR="dateformat eq 'metric'" --> > dateFormat: 'uk'<!-- /TMPL_IF --> > }); > }); >@@ -17,20 +18,27 @@ > </script> > </head> > <body> >-<!-- TMPL_IF NAME="OpacNav" --><div id="doc3" class="yui-t1"><!-- TMPL_ELSE --><div id="doc3" class="yui-t7"><!-- /TMPL_IF --> >+<!-- TMPL_IF NAME="OpacNav" --> >+<div id="doc3" class="yui-t1"> >+<!-- TMPL_ELSIF NAME="loggedinusername" --> >+<div id="doc3" class="yui-t1"> >+<!-- TMPL_ELSE --> >+<div id="doc3" class="yui-t7"> >+<!-- /TMPL_IF --> > <div id="bd"> > <!--TMPL_INCLUDE NAME="masthead.inc" --> > > <div id="yui-main"> > <div class="yui-b"><div class="yui-g"> >- <div class="container"> >+ <div id="searchhistory" class="container"> > <h1>Search history</h1> >- <!-- TMPL_IF EXPR="recentSearches || previousSearches" --> >+ <!-- TMPL_IF NAME="recentSearches" --><form action="/cgi-bin/koha/opac-search-history.pl" method="get"><input type="hidden" name="action" value="delete" /><input type="submit" class="deleteshelf" value="Delete your search history" onclick="return confirm(_('Are you sure you want to delete your search history?'));" /></form><!-- TMPL_ELSE --><!-- TMPL_IF NAME="previousSearches" --><form action="/cgi-bin/koha/opac-search-history.pl" method="get"><input type="hidden" name="action" value="delete" /><input type="submit" class="deleteshelf" value="Delete your search history" onclick="return confirm(_('Are you sure you want to delete your search history?'));" /></form><!-- /TMPL_IF --><!-- /TMPL_IF --> >+ > <!-- TMPL_IF NAME="recentSearches" --> >+ <table class="historyt"> > <!-- TMPL_IF NAME="previousSearches" --> >- <h2>Current session</h2> >+ <caption>Current session</caption> > <!-- /TMPL_IF --> >- <table id="historyt"> > <thead> > <tr><th>Date</th><th>Search</th><th>Results</th></tr> > </thead> >@@ -38,7 +46,7 @@ > <!-- TMPL_LOOP NAME="recentSearches" --> > <tr> > <td><!-- TMPL_VAR NAME="time" --></td> >- <td><a href="/cgi-bin/koha/opac-search.pl?<!-- TMPL_VAR NAME="query_cgi" -->"><!-- TMPL_VAR NAME="query_desc" --></a></td> >+ <td><a href="/cgi-bin/koha/opac-search.pl?<!-- TMPL_VAR NAME="query_cgi" -->"><!-- TMPL_VAR NAME="query_desc" --></a></td> > <td><!-- TMPL_VAR NAME="total" --></td> > </tr> > <!-- /TMPL_LOOP --> >@@ -47,8 +55,8 @@ > <!-- /TMPL_IF --> > > <!-- TMPL_IF NAME="previousSearches" --> >- <h2>Previous sessions</h2> >- <table id="historyt"> >+ <table class="historyt"> >+ <caption>Previous sessions</caption> > <thead> > <tr><th>Date</th><th>Search</th><th>Results</th></tr> > </thead> >@@ -56,25 +64,34 @@ > <!-- TMPL_LOOP NAME="previousSearches" --> > <tr> > <td><!-- TMPL_VAR NAME="time" --></td> >- <td><a href="/cgi-bin/koha/opac-search.pl?<!-- TMPL_VAR NAME="query_cgi" -->"><!-- TMPL_VAR NAME="query_desc" --></a></td> >+ <td><a href="/cgi-bin/koha/opac-search.pl?<!-- TMPL_VAR NAME="query_cgi" -->"><!-- TMPL_VAR NAME="query_desc" --></a></td> > <td><!-- TMPL_VAR NAME="total" --></td> > </tr> > <!-- /TMPL_LOOP --> > </tbody> > </table> > <!-- /TMPL_IF --> >- <!-- TMPL_ELSE --> >- <p>Your search history is now empty.</p> >- <!-- /TMPL_IF --> >+ >+<!-- TMPL_IF NAME="recentSearches" --><!-- TMPL_ELSE --><!-- TMPL_IF NAME="previousSearches" --><!-- TMPL_ELSE --><p>Your search history is empty.</p><!-- /TMPL_IF --><!-- /TMPL_IF --> >+ > </div> > </div> > </div> > </div> >-<!-- TMPL_IF EXPR="OpacNav||loggedinusername" --> >+ >+<!-- TMPL_IF NAME="OpacNav" --> > <div class="yui-b"><div class="container"> > <!--TMPL_INCLUDE NAME="navigation.inc" --> > <!--TMPL_INCLUDE NAME="usermenu.inc" --> >-</div></div></div> >+</div></div> >+<!-- TMPL_ELSIF NAME="loggedinusername" --> >+<div class="yui-b"><div class="container"> >+<!--TMPL_INCLUDE NAME="navigation.inc" --> >+<!--TMPL_INCLUDE NAME="usermenu.inc" --> >+</div></div> >+<!-- TMPL_ELSE --> > <!-- /TMPL_IF --> > >+ >+</div> > <!-- TMPL_INCLUDE NAME="opac-bottom.inc" --> >diff --git a/opac/opac-search-history.pl b/opac/opac-search-history.pl >index fdf0701..97db2d5 100755 >--- a/opac/opac-search-history.pl >+++ b/opac/opac-search-history.pl >@@ -142,6 +142,9 @@ if ($loggedinuser == '') { > } > > } >+ >+$template->param(searchhistoryview => 1); >+ > output_html_with_http_headers $cgi, $cookie, $template->output; > > >-- >1.6.3.3 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 4024
: 1785