Bugzilla – Attachment 24226 Details for
Bug 10807
OPAC: There is no authority search history
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 10807: Add an authority search history for the OPAC - bootstrap
Bug-10807-Add-an-authority-search-history-for-the-.patch (text/plain), 14.11 KB, created by
Jonathan Druart
on 2014-01-13 11:59:08 UTC
(
hide
)
Description:
Bug 10807: Add an authority search history for the OPAC - bootstrap
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2014-01-13 11:59:08 UTC
Size:
14.11 KB
patch
obsolete
>From 37bb47ad0184995e5e5b0695ef6649e46547bc83 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@biblibre.com> >Date: Thu, 19 Dec 2013 15:22:02 +0100 >Subject: [PATCH] Bug 10807: Add an authority search history for the OPAC - > bootstrap > >Patch for the bootstrap theme > >Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> >--- > .../opac-tmpl/bootstrap/en/includes/masthead.inc | 4 +- > .../opac-tmpl/bootstrap/en/includes/usermenu.inc | 2 +- > .../bootstrap/en/modules/opac-search-history.tt | 161 +++++++++++++++----- > 3 files changed, 129 insertions(+), 38 deletions(-) > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc >index 1edc244..07703d5 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc >@@ -77,7 +77,7 @@ > <li><p class="members navbar-text">Welcome, <a href="/cgi-bin/koha/opac-user.pl"><span class="loggedinusername">[% FOREACH USER_INF IN USER_INFO %][% USER_INF.title %] [% USER_INF.firstname %] [% USER_INF.surname %][% END %]</span></a></p></li> > <li class="divider-vertical"></li> > [% END %] >- [% IF ( ShowOpacRecentSearchLink ) %] >+ [% IF EnableOpacSearchHistory %] > <li><p class="navbar-text"><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(MSG_DELETE_SEARCH_HISTORY);">x</a>]</p></li> > <li class="divider-vertical"></li> > [% END %] >@@ -284,4 +284,4 @@ > <a href="#" data-dismiss="modal" aria-hidden="true" class="cancel">Cancel</a> > </div> > </form> <!-- /#auth --> >- </div> <!-- /#modalAuth --> >\ No newline at end of file >+ </div> <!-- /#modalAuth --> >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/usermenu.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/usermenu.inc >index f1185d3..182543b 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/usermenu.inc >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/usermenu.inc >@@ -41,7 +41,7 @@ > <a href="/cgi-bin/koha/opac-passwd.pl">change your password</a></li> > [% END %] > >- [% IF ( ShowOpacRecentSearchLink ) %] >+ [% IF EnableOpacSearchHistory %] > [% IF ( searchhistoryview ) %] > <li class="active"> > [% ELSE %] >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-search-history.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-search-history.tt >index d833346..4e44705 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-search-history.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-search-history.tt >@@ -30,55 +30,144 @@ > [% ELSE %] > <div class="span12"> > [% END %] >- > <div id="searchhistory" class="maincontent"> > <h1>Search history</h1> >- [% IF ( recentSearches ) %]<form action="/cgi-bin/koha/opac-search-history.pl" method="get"><input type="hidden" name="action" value="delete" /><input type="submit" class="btn btn-danger" value="Delete your search history" onclick="return confirm(MSG_CONFIRM_DELETE_HISTORY);" /></form>[% ELSE %][% IF ( previousSearches ) %]<form action="/cgi-bin/koha/opac-search-history.pl" method="get"><input type="hidden" name="action" value="delete" /><input type="submit" class="btn btn-danger" value="Delete your search history" onclick="return confirm(MSG_CONFIRM_DELETE_HISTORY);" /></form>[% END %][% END %] > >- [% IF ( recentSearches ) %] >- <table class="historyt table table-bordered table-condensed table-striped"> >- [% IF ( previousSearches ) %] >- <caption>Current session</caption> >+ [% IF Koha.Preference( 'OpacAuthorities' ) == 1 %] >+ <div id="tabs" class="toptabs"> >+ <ul> >+ <li><a href="#biblio_tab">Catalog</a></li> >+ <li><a href="#authority_tab">Authority</a></li> >+ </ul> >+ [% END %] >+ <div id="biblio_tab"> >+ [% IF ( current_biblio_searches ) %] >+ <h2>Current session</h2> >+ <form action="/cgi-bin/koha/opac-search-history.pl" method="get"> >+ <input type="hidden" name="action" value="delete" /> >+ <input type="hidden" name="previous" value="0" /> >+ <input type="hidden" name="type" value="biblio" /> >+ <input type="submit" class="deleteshelf" value="Delete your current catalog history" onclick="return confirm(MSG_CONFIRM_DELETE_HISTORY);" /> >+ </form> >+ <table class="historyt table table-bordered table-condensed table-striped"> >+ <thead> >+ <tr> >+ <th>Date</th> >+ <th>Search</th> >+ <th>Results</th> >+ </tr> >+ </thead> >+ <tbody> >+ [% FOREACH s IN current_biblio_searches %] >+ <tr> >+ <td><span title="[% s.time %]">[% s.time |$KohaDates with_hours => 1 %]</span></td> >+ <td><a href="/cgi-bin/koha/opac-search.pl?[% s.query_cgi |html %]">[% s.query_desc |html %]</a></td> >+ <td>[% s.total %]</td> >+ </tr> > [% END %] >- <thead> >- <tr><th>Date</th><th>Search</th><th>Results</th></tr> >- </thead> >- <tbody> >- [% FOREACH recentSearche IN recentSearches %] >- <tr> >- <td><span title="[% recentSearche.time %]">[% recentSearche.time |$KohaDates with_hours => 1 %]</span></td> >- <td><a href="/cgi-bin/koha/opac-search.pl?[% recentSearche.query_cgi |html %]">[% recentSearche.query_desc |html %]</a></td> >- <td>[% recentSearche.total %]</td> >- </tr> >- [% END %] >- </tbody> >- </table> >+ </tbody> >+ </table> > [% END %] > >- [% IF ( previousSearches ) %] >- <table class="historyt table table-bordered table-condensed table-striped"> >- <caption>Previous sessions</caption> >+ [% IF ( previous_biblio_searches ) %] >+ <h2>Previous sessions</h2> >+ <form action="/cgi-bin/koha/opac-search-history.pl" method="get"> >+ <input type="hidden" name="action" value="delete" /> >+ <input type="hidden" name="previous" value="1" /> >+ <input type="hidden" name="type" value="biblio" /> >+ <input type="submit" class="deleteshelf" value="Delete your previous catalog search history" onclick="return confirm(MSG_CONFIRM_DELETE_HISTORY);" /> >+ </form> >+ <table class="historyt table table-bordered table-condensed table-striped"> > <thead> >- <tr><th>Date</th><th>Search</th><th>Results</th></tr> >+ <tr> >+ <th>Date</th> >+ <th>Search</th> >+ <th>Results</th> >+ </tr> > </thead> > <tbody> >- [% FOREACH previousSearche IN previousSearches %] >- <tr> >- <td><span title="[% previousSearche.time %]">[% previousSearche.time |$KohaDates with_hours => 1 %]</span></td> >- <td><a href="/cgi-bin/koha/opac-search.pl?[% previousSearche.query_cgi |html %]">[% previousSearche.query_desc |html %]</a></td> >- <td>[% previousSearche.total %]</td> >- </tr> >- [% END %] >+ [% FOREACH s IN previous_biblio_searches %] >+ <tr> >+ <td><span title="[% s.time %]">[% s.time |$KohaDates with_hours => 1 %]</span></td> >+ <td><a href="/cgi-bin/koha/opac-search.pl?[% s.query_cgi |html %]">[% s.query_desc |html %]</a></td> >+ <td>[% s.total %]</td> >+ </tr> >+ [% END %] > </tbody> >- </table> >+ </table> > [% END %] > >- [% UNLESS ( recentSearches ) %] >- [% UNLESS ( previousSearches ) %] >- <p>Your search history is empty.</p> >+ [% IF !current_biblio_searches && !previous_biblio_searches %] >+ <p>Your catalog search history is empty.</p> >+ [% END %] >+ </div> >+ >+ >+ [% IF Koha.Preference( 'OpacAuthorities' ) == 1 %] >+ <div id="authority_tab"> >+ [% IF ( current_authority_searches ) %] >+ <h2>Current session</h2> >+ <form action="/cgi-bin/koha/opac-search-history.pl" method="get"> >+ <input type="hidden" name="action" value="delete" /> >+ <input type="hidden" name="previous" value="0" /> >+ <input type="hidden" name="type" value="authority" /> >+ <input type="submit" class="deleteshelf" value="Delete your current authority search history" onclick="return confirm(MSG_CONFIRM_DELETE_HISTORY);" /> >+ </form> >+ <table class="historyt table table-bordered table-condensed table-striped"> >+ <thead> >+ <tr> >+ <th>Date</th> >+ <th>Search</th> >+ <th>Results</th> >+ </tr> >+ </thead> >+ <tbody> >+ [% FOREACH s IN current_authority_searches %] >+ <tr> >+ <td><span title="[% s.time %]">[% s.time |$KohaDates with_hours => 1 %]</span></td> >+ <td><a href="/cgi-bin/koha/opac-authorities-home.pl?[% s.query_cgi |html %]">[% s.query_desc |html %]</a></td> >+ <td>[% s.total %]</td> >+ </tr> > [% END %] >+ </tbody> >+ </table> > [% END %] >- </div> >+ >+ [% IF ( previous_authority_searches ) %] >+ <h2>Previous sessions</h2> >+ <form action="/cgi-bin/koha/opac-search-history.pl" method="get"> >+ <input type="hidden" name="action" value="delete" /> >+ <input type="hidden" name="previous" value="1" /> >+ <input type="hidden" name="type" value="authority" /> >+ <input type="submit" class="deleteshelf" value="Delete your previous authority search history" onclick="return confirm(MSG_CONFIRM_DELETE_HISTORY);" /> >+ </form> >+ <table class="historyt table table-bordered table-condensed table-striped"> >+ <thead> >+ <tr> >+ <th>Date</th> >+ <th>Search</th> >+ <th>Results</th> >+ </tr> >+ </thead> >+ <tbody> >+ [% FOREACH s IN previous_authority_searches %] >+ <tr> >+ <td><span title="[% s.time %]">[% s.time |$KohaDates with_hours => 1 %]</span></td> >+ <td><a href="/cgi-bin/koha/opac-authorities-home.pl?[% s.query_cgi |html %]">[% s.query_desc |html %]</a></td> >+ <td>[% s.total %]</td> >+ </tr> >+ [% END %] >+ </tbody> >+ </table> >+ [% END %] >+ >+ [% IF !current_authority_searches && !previous_authority_searches %] >+ <p>Your authority search history is empty.</p> >+ [% END %] >+ </div> >+ </div> >+ [% END %] >+ </div> > </div> > </div> > </div> >@@ -102,6 +191,8 @@ > ] > })); > }); >+ >+ [% IF Koha.Preference( 'OpacAuthorities' ) == 1 %]$('#tabs').tabs();[% END %] > //]]> > > </script> >-- >1.7.10.4
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 10807
:
20734
|
20764
|
20951
|
20952
|
20988
|
20989
|
20990
|
21070
|
21362
|
21363
|
21403
|
22560
|
22561
|
22562
|
22563
|
22564
|
22565
|
23676
|
23677
|
23678
|
23679
|
23680
|
23681
|
23682
|
23712
|
24221
|
24222
|
24223
|
24224
|
24225
|
24226
|
27372
|
27373
|
27374
|
27375
|
27376
|
27377
|
27378