From ced948c52d7500129aa5f14f2c9b7fbde51777f2 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Thu, 19 Dec 2013 15:22:02 +0100 Subject: [PATCH] [PASSED QA] Bug 10807: Add an authority search history for the OPAC - bootstrap Patch for the bootstrap theme Signed-off-by: Jonathan Druart Signed-off-by: Katrin Fischer --- .../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 @@
  • [% END %] - [% IF ( ShowOpacRecentSearchLink ) %] + [% IF EnableOpacSearchHistory %]
  • [% END %] @@ -284,4 +284,4 @@ - \ No newline at end of file + 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 @@ change your password [% END %] - [% IF ( ShowOpacRecentSearchLink ) %] + [% IF EnableOpacSearchHistory %] [% IF ( searchhistoryview ) %]
  • [% 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 %]
    [% END %] -

    Search history

    - [% IF ( recentSearches ) %]
    [% ELSE %][% IF ( previousSearches ) %]
    [% END %][% END %] - [% IF ( recentSearches ) %] - - [% IF ( previousSearches ) %] - + [% IF Koha.Preference( 'OpacAuthorities' ) == 1 %] +
    + + [% END %] +
    + [% IF ( current_biblio_searches ) %] +

    Current session

    +
    + + + + + +
    Current session
    + + + + + + + + + [% FOREACH s IN current_biblio_searches %] + + + + + [% END %] - - - - - [% FOREACH recentSearche IN recentSearches %] - - - - - - [% END %] - -
    DateSearchResults
    [% s.time |$KohaDates with_hours => 1 %][% s.query_desc |html %][% s.total %]
    DateSearchResults
    [% recentSearche.time |$KohaDates with_hours => 1 %][% recentSearche.query_desc |html %][% recentSearche.total %]
    + + [% END %] - [% IF ( previousSearches ) %] - - + [% IF ( previous_biblio_searches ) %] +

    Previous sessions

    + + + + + + +
    Previous sessions
    - + + + + + - [% FOREACH previousSearche IN previousSearches %] - - - - - - [% END %] + [% FOREACH s IN previous_biblio_searches %] + + + + + + [% END %] -
    DateSearchResults
    DateSearchResults
    [% previousSearche.time |$KohaDates with_hours => 1 %][% previousSearche.query_desc |html %][% previousSearche.total %]
    [% s.time |$KohaDates with_hours => 1 %][% s.query_desc |html %][% s.total %]
    + [% END %] - [% UNLESS ( recentSearches ) %] - [% UNLESS ( previousSearches ) %] -

    Your search history is empty.

    + [% IF !current_biblio_searches && !previous_biblio_searches %] +

    Your catalog search history is empty.

    + [% END %] +
    + + + [% IF Koha.Preference( 'OpacAuthorities' ) == 1 %] +
    + [% IF ( current_authority_searches ) %] +

    Current session

    +
    + + + + +
    + + + + + + + + + + [% FOREACH s IN current_authority_searches %] + + + + + [% END %] + +
    DateSearchResults
    [% s.time |$KohaDates with_hours => 1 %][% s.query_desc |html %][% s.total %]
    [% END %] -
    + + [% IF ( previous_authority_searches ) %] +

    Previous sessions

    +
    + + + + +
    + + + + + + + + + + [% FOREACH s IN previous_authority_searches %] + + + + + + [% END %] + +
    DateSearchResults
    [% s.time |$KohaDates with_hours => 1 %][% s.query_desc |html %][% s.total %]
    + [% END %] + + [% IF !current_authority_searches && !previous_authority_searches %] +

    Your authority search history is empty.

    + [% END %] +
    + + [% END %] + @@ -102,6 +191,8 @@ ] })); }); + + [% IF Koha.Preference( 'OpacAuthorities' ) == 1 %]$('#tabs').tabs();[% END %] //]]> -- 1.8.3.2