From babecc0087a54c33f657e8eda4a65cab6170a606 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. --- .../en/modules/opac-search-history.tt | 381 +++++++++--------- 1 file changed, 195 insertions(+), 186 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 7bfb0e11ee..10fe6208cd 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.30.2