From f3def0d264d321d535ebc6cef1bcddba31dc38c3 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Thu, 1 Jun 2023 13:33:38 +0000 Subject: [PATCH] Bug 33894: Restructuring: Use BLOCKs for biblio and authority sections In order to make the conversion to the tab wrapper markup easier I'm putting the biblio search history and authority search history sections into blocks. This will make it easier to include or not include the sections using template logic. To test, apply the patch and, if necessary, perform some searches for bibliographic and authority records. The OPAC search history page should be unchanged, with the correct information showing under each tab and in each section for current and previous searches. Signed-off-by: David Nind Signed-off-by: Katrin Fischer Signed-off-by: Tomas Cohen Arazi --- .../en/modules/opac-search-history.tt | 397 +++++++++--------- 1 file changed, 203 insertions(+), 194 deletions(-) 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 4a9fab692a..531cc12cde 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 @@ -49,6 +49,7 @@

Search history

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

Current session

-
- Toolbar control - - [% INCLUDE 'toolbar_controls' %] - - - - - - - - - - - - - - [% FOREACH s IN current_biblio_searches %] - - - - - - - - [% END %] - -
Current session
DateSearchResults
- - - - - - - - [% s.query_desc | html %] - [% s.total | html %]
- -
- [% END # IF ( current_biblio_searches ) %] -
-
-
- [% IF ( previous_biblio_searches ) %] -

Previous sessions

-
- Toolbar control - [% INCLUDE 'toolbar_controls' %] - - - - - - - - - - - - - - - [% FOREACH s IN previous_biblio_searches %] - - - - - - - - [% END %] - -
Previous sessions
DateSearchResults
- - - - - - - - - [% s.query_desc | html %] - - [% s.total | html %]
- -
- [% END # IF ( previous_biblio_searches ) %] -
- - [% IF !current_biblio_searches && !previous_biblio_searches %] -

Your catalog search history is empty.

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

Current session

-
- Toolbar control - [% INCLUDE 'toolbar_controls' %] - - - - - - - - - - - - - - [% FOREACH s IN current_authority_searches %] - - - - - - - - [% END %] - -
Current session
DateSearchResults
- - - - [% s.query_desc | html %][% s.total | html %]
- -
- [% END # / IF ( current_authority_searches ) %] -
-
-
- [% IF ( previous_authority_searches ) %] -

Previous sessions

-
- Toolbar control - [% INCLUDE 'toolbar_controls' %] - - - - - - - - - - - - - - [% FOREACH s IN previous_authority_searches %] - - - - - - - - [% END %] - -
Previous sessions
DateSearchResults
- - - - [% s.query_desc | html %][% s.total | html %]
- -
- [% END # / IF ( previous_authority_searches )%] -
- - [% IF !current_authority_searches && !previous_authority_searches %] -

Your authority search history is empty.

- [% END %] -
-
- [% END # / IF Koha.Preference( 'OpacAuthorities' ) %] -
+
+ [% PROCESS authority_search_history %] +
+
+
+ [% ELSE %] + [% PROCESS catalog_search_history %] + [% END %] +[% BLOCK catalog_search_history %] +
+ [% IF ( current_biblio_searches ) %] +

Current session

+
+ Toolbar control + + [% INCLUDE 'toolbar_controls' %] + + + + + + + + + + + + + + [% FOREACH s IN current_biblio_searches %] + + + + + + + + [% END %] + +
Current session
DateSearchResults
+ + + + + + + + [% s.query_desc | html %] + [% s.total | html %]
+ +
+ [% END # IF ( current_biblio_searches ) %] +
+
+
+ [% IF ( previous_biblio_searches ) %] +

Previous sessions

+
+ Toolbar control + [% INCLUDE 'toolbar_controls' %] + + + + + + + + + + + + + + + [% FOREACH s IN previous_biblio_searches %] + + + + + + + + [% END %] + +
Previous sessions
DateSearchResults
+ + + + + + + + + [% s.query_desc | html %] + + [% s.total | html %]
+ +
+ [% END # IF ( previous_biblio_searches ) %] +
+ + [% IF !current_biblio_searches && !previous_biblio_searches %] +

Your catalog search history is empty.

+ [% END %] +[% END %] + +[% BLOCK authority_search_history %] +
+ [% IF ( current_authority_searches ) %] +

Current session

+
+ Toolbar control + [% INCLUDE 'toolbar_controls' %] + + + + + + + + + + + + + + [% FOREACH s IN current_authority_searches %] + + + + + + + + [% END %] + +
Current session
DateSearchResults
+ + + + [% s.query_desc | html %][% s.total | html %]
+ +
+ [% END # / IF ( current_authority_searches ) %] +
+
+
+ [% IF ( previous_authority_searches ) %] +

Previous sessions

+
+ Toolbar control + [% INCLUDE 'toolbar_controls' %] + + + + + + + + + + + + + + [% FOREACH s IN previous_authority_searches %] + + + + + + + + [% END %] + +
Previous sessions
DateSearchResults
+ + + + [% s.query_desc | html %][% s.total | html %]
+ +
+ [% END # / IF ( previous_authority_searches )%] +
+ + [% IF !current_authority_searches && !previous_authority_searches %] +

Your authority search history is empty.

+ [% END %] +[% END %] + [% INCLUDE 'opac-bottom.inc' %] [% BLOCK toolbar_controls %] -- 2.39.5