Koha/koha-tmpl/opac-tmpl/prog/en/includes
Jonathan Druart ba41b7da79 Bug 10807: Add an authority search history for the OPAC
Like biblio, this feature provides an authority search history.
This history is available for connected and disconnected user.
If the user is not logged in Koha, the history is stored in an
anonymous user sessin.

The search history feature is now factorized in a new module.

This patch adds:
- 1 new db field search_history.type. It permits to distinguish the
  search type (biblio or authority).
- 1 new module C4::Search::History. It deals with 2 different storages:
  DB or cookie
- 2 new UT files: t/Search/History.t and t/db_dependent/Search/History.t
- 1 new behavior: the 'Search history' link (on the top-right corner of
  the screen) is always displayed.

Test plan:
 1/ Switch on the 'EnableOpacSearchHistory' syspref.
 2/ Go on the opac and log out.
 3/ Launch some biblio and authority searches.
 4/ Go on your search history page.
 5/ Check that all yours searches are displayed.
 6/ Click on some links and check that results are consistent.
 7/ Delete your biblio history searches.
 8/ Delete your authority searches history searches.
 9/ Launch some biblio and authority searches
10/ Delete all your history (cross on the top-right corner)
11/ Check that all your history search is empty.
12/ Launch some biblio and authority searches.
13/ Login to your account.
14/ Check that all previous searches are displayed.
15/ Launch some biblio and authority searches.
16/ Check that these previous searches are displayed under "Current
session".
17/ Play with the 4 delete links (current / previous and biblio /
authority).

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
All patches together pass QA script and tests.
Also, new tests in t/db_dependent/ pass.

Tested in all 4 OPAC themes, being logged in and anonymous.
Anonymous search history will be appended to personal search
history after logging in.
Also verified that cleanup_database still purges search history,
now also including the authority searchs.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-05-05 02:32:27 +00:00
..
search Bug 8233 : SearchEngine: Add a Koha::SearchEngine module 2012-07-06 16:51:58 +02:00
authorities-search-results.inc Bug 7442: (follow-up) restore display of heading type for non-UNIMARC 2014-05-05 01:27:33 +00:00
calendar.inc Bug 9508: Standardize the dateformat value from C4::Auth 2013-05-20 09:05:01 -07:00
datatables.inc Bug 9916 - Use DataTables in the OPAC 2013-08-19 14:19:02 +00:00
date-format.inc Bug 10836 - New layout for placing holds in the OPAC 2013-09-27 16:41:04 +00:00
doc-head-close.inc Bug 10405: add IDs for customizable OPAC regions 2013-08-14 21:55:04 +00:00
doc-head-open.inc Bug 9265 - Switch to HTML5 doctype in OPAC and staff client 2013-01-31 11:47:04 -05:00
item-status-schema-org.inc Bug 10626: (follow-up) remove final invocation of KohaAuthorisedValues 2013-12-20 04:18:18 +00:00
item-status.inc Bug 10626: (follow-up) replace use of KohaAuthorisedValues in the Bootstrap theme 2013-12-20 04:22:20 +00:00
masthead.inc Bug 10807: Add an authority search history for the OPAC 2014-05-05 02:32:27 +00:00
navigation.inc Bug 10405: add IDs for customizable OPAC regions 2013-08-14 21:55:04 +00:00
opac-authorities.inc Bug 9132: Paging through OPAC authority search results does not work (followup 1) input with and_ora instread of and_or 2012-11-28 08:13:18 -05:00
opac-bottom.inc Bug 10405: add IDs for customizable OPAC regions 2013-08-14 21:55:04 +00:00
opac-detail-sidebar.inc Bug 8525: highlight matches on OPAC detail page 2012-09-03 09:58:28 +02:00
opac-facets.inc Bug 11117: Fix text mixup in facets where RTL text + facet count showed 2014-05-05 00:44:31 +00:00
opac-topissues.inc Bug 10588: improve selection of default branch for OPAC popular items pag 2013-09-04 17:14:22 +00:00
page-numbers.inc Bug 9134: There is no previous link on the second page of the search results page 2012-12-02 09:16:58 -05:00
patron-title.inc Bug 6303: Display Organisation and Parent Organisation names when viewing a borrower of type organisation 2011-11-24 11:30:08 +01:00
resort_form.inc Bug 2780 - Capitalize strings consistently (OPAC includes) 2012-04-10 10:03:31 +02:00
shelfbrowser.inc Bug 10856: Fix cover display in shelf browser 2013-10-04 15:58:17 +00:00
subtypes_unimarc.inc Bug 11189: Rename "Print" label in UNIMARC advanced search 2013-11-08 16:48:42 +00:00
usermenu.inc Bug 10807: Add an authority search history for the OPAC 2014-05-05 02:32:27 +00:00