diff --git a/catalogue/search-history.pl b/catalogue/search-history.pl
index a969701259..e60f20ba34 100755
--- a/catalogue/search-history.pl
+++ b/catalogue/search-history.pl
@@ -46,10 +46,7 @@ if ( $action eq 'delete' ) {
: q{};
C4::Search::History::delete(
{
- userid => $loggedinuser,
- sessionid => $sessionid,
- type => $type,
- previous => $previous
+ id => [ $cgi->param('id') ],
}
);
# Redirecting to this same url so the user won't see the search history link in the header
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/search-history.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/search-history.tt
index ef5b009077..dbee0ab418 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/search-history.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/search-history.tt
@@ -5,23 +5,68 @@
[% INCLUDE 'doc-head-close.inc' %]
[% INCLUDE 'datatables.inc' %]
+
@@ -50,57 +95,73 @@ $(document).ready(function() {
[% IF ( current_biblio_searches ) %]
Current session
-
-
-
- | Date |
- Search |
- Results |
-
-
-
- [% FOREACH s IN current_biblio_searches %]
-
- | [% s.time |$KohaDates with_hours => 1 %] |
- [% s.query_desc |html %] |
- [% s.total %] |
-
- [% END %]
-
-
[% END %]
[% IF ( previous_biblio_searches ) %]
Previous sessions
-
-
-
- | Date |
- Search |
- Results |
-
-
-
- [% FOREACH s IN previous_biblio_searches %]
-
- | [% s.time |$KohaDates with_hours => 1 %] |
- [% s.query_desc |html %] |
- [% s.total %] |
-
- [% END %]
-
-
[% END %]
[% IF !current_biblio_searches && !previous_biblio_searches %]
@@ -112,57 +173,73 @@ $(document).ready(function() {
[% IF ( current_authority_searches ) %]
Current session
-
-
-
- | Date |
- Search |
- Results |
-
-
-
- [% FOREACH s IN current_authority_searches %]
-
- | [% s.time |$KohaDates with_hours => 1 %] |
- [% s.query_desc |html %] |
- [% s.total %] |
-
- [% END %]
-
-
[% END %]
[% IF ( previous_authority_searches ) %]
Previous sessions
-
-
-
- | Date |
- Search |
- Results |
-
-
-
- [% FOREACH s IN previous_authority_searches %]
-
- | [% s.time |$KohaDates with_hours => 1 %] |
- [% s.query_desc |html %] |
- [% s.total %] |
-
- [% END %]
-
-
[% END %]
[% IF !current_authority_searches && !previous_authority_searches %]