From 9666a03b2688efdb1f12ac78934323ddc05e3450 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Thu, 31 Mar 2022 18:23:53 +0000 Subject: [PATCH] Bug 30424: Reindent advanced search template in the staff interface MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit This patch reindents the advanced search template. Some lines have been split to make the markup more readable. To test, apply the patch and test the advanced search page in the staff interface. Everything should work as normal. Be sure to test both the "More options" and "Fewer options" views. When viewing the diff for this change, ignore whitespace. The only visible changes should be split lines. Signed-off-by: Séverine QUEUNE Signed-off-by: Katrin Fischer Signed-off-by: Fridolin Somers --- .../prog/en/modules/catalogue/advsearch.tt | 608 +++++++++--------- 1 file changed, 316 insertions(+), 292 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/advsearch.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/advsearch.tt index 23ef320fb6..feaff08728 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/advsearch.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/advsearch.tt @@ -9,20 +9,20 @@ [%- BLOCK language_limit_select -%] - + + [% FOREACH ln_loo IN ln_loop %] + [% IF ( ln_loo.selected or selected == ln_loo.iso639_2_code ) %] + + [% ELSE %] + + [% END %] [% END %] - [% END %] - + [%- END -%] @@ -46,301 +46,325 @@
-
- + + [% IF ( outer_servers_loop ) %] + +
+ Select local databases + [% FOREACH local_servers_loo IN local_servers_loop %] + [% IF ( local_servers_loo.checked ) %] + + [% ELSE %] + + [% END %] + + [% END %] +
+ + [% END %] -[% IF ( outer_servers_loop ) %] - + [% IF ( outer_servers_loop ) %] + +
+ Select remote databases + [% FOREACH outer_servers_loo IN outer_servers_loop %] + [% IF ( outer_servers_loo.checked ) %] + + [% ELSE %] + + [% END %] + + [% END %] +
+ + [% END %] -
- Select local databases - [% FOREACH local_servers_loo IN local_servers_loop %] -[% IF ( local_servers_loo.checked ) %][% ELSE %][% END %][% END %] -
- -[% END %] + +
+ Search for + [% FOREACH query IN queries %] + [% IF ( expanded_options ) %] + [% IF loop.first %] +
+ [% ELSE %] +
+ [% SET opindex = loop.index - 1 %] + + [% END %] + [% ELSE %] +
+ [% END %] -[% IF ( outer_servers_loop ) %] - -
- Select remote databases - [% FOREACH outer_servers_loo IN outer_servers_loop %] - [% IF ( outer_servers_loo.checked ) %][% ELSE %][% END %] - - [% END %] -
- -[% END %] + [% SET preselect = 'ms_' _ indexes.${loop.index}.replace(',','comma') %] + [% INCLUDE 'search_indexes.inc' %] + + [% IF ( expanded_options ) %] + [% IF ( loop.last ) %] + [+] + [% END %] + [% IF ( loop.first ) %] + + [% END %] + [% END %] +
+ [% END %] - -
- Search for - [% FOREACH query IN queries %] - [% IF ( expanded_options ) %] - [% IF loop.first %] -
- [% ELSE %] -
- [% SET opindex = loop.index - 1 %] - - [% END %] - [% ELSE %] -
- [% END %] - [% SET preselect = 'ms_' _ indexes.${loop.index}.replace(',','comma') %] - [% INCLUDE 'search_indexes.inc' %] - - [% IF ( expanded_options ) %] - [% IF ( loop.last ) %] - [+] - [% END %] - [% IF ( loop.first ) %] - - [% END %] - [% END %] -
- [% END %] - [% IF Koha.Preference('SearchEngine') == 'Elasticsearch' %] - [% IF ( expanded_options ) %] -

- [% IF Koha.Preference('ElasticsearchMARCFormat') == 'ARRAY' %] - - [% END %] - - - -

- [% ELSE %] - - [% END %] - [% END %] -

- + [% IF Koha.Preference('SearchEngine') == 'Elasticsearch' %] + [% IF ( expanded_options ) %] +

+ [% IF Koha.Preference('ElasticsearchMARCFormat') == 'ARRAY' %] + + [% END %] + + + +

+ [% ELSE %] + + [% END %] + [% END %] +

+ +
-
- -
- - [% FOREACH advsearchloo IN advancedsearchesloop %] -
-

Limit to any of the following:

- - - [% FOREACH itemtypeloo IN advsearchloo.code_loop %] - - [% IF ( loop.last ) %] - - [% ELSE %] - [% UNLESS ( loop.count % 5 ) %] - - - [% END %] - [% END %] - [% END %] -
- [% SET limit_key = 'mc-' _ itemtypeloo.ccl _ "_" _ itemtypeloo.code %] - [% IF limits.$limit_key.defined %] - [% limits.delete( limit_key ) %] - - [% ELSE %] - - [% END %] - -
-
- [% END %] - -[% IF ( expanded_options ) %] - -
- Limits -
- -

- [% SET year_limit_key = 'yr,st-numeric' %] -   (format: yyyy-yyyy)

- [% IF limits.$year_limit_key.defined %] - [% limits.delete(year_limit_key) %] - [% END %] - -
-
- -

- - [% PROCESS language_limit_select ln_loop=search_languages_loop ln_id='language-limit' ln_index='ln' selected = limits.${'ln,rtrn'}.0 %] - [% limits.delete( 'ln,rtrn' ) %] - - [% PROCESS language_limit_select ln_loop=search_languages_loop ln_id='language-original-limit' ln_index='language-original' selected = limits.${'language-original,rtrn'}.0 %] - [% limits.delete( 'language-original,rtrn' ) %] -

- -
-
- -[% END %] + +
+ -[% IF ( UNIMARC ) %] -[% INCLUDE 'subtypes_unimarc.inc' %] -[% ELSE %] -[% PROCESS 'subtype_limits.inc' %] - -
- Subtype limits

- [% PROCESS subtype_dropdowns %] -

Current subtype limits - [% FOREACH subtype IN ['aud','fic','bio','ctype','l-format'] %] - [% FOREACH limit IN limits.$subtype %] - - - - - - [% END %] - [% limits.delete( subtype ) %] - [% END %] -
+ [% FOREACH advsearchloo IN advancedsearchesloop %] +
+

Limit to any of the following:

+ + + [% FOREACH itemtypeloo IN advsearchloo.code_loop %] + + [% IF ( loop.last ) %] + + [% ELSE %] + [% UNLESS ( loop.count % 5 ) %] + + + [% END %] + [% END %] + [% END %] +
+ [% SET limit_key = 'mc-' _ itemtypeloo.ccl _ "_" _ itemtypeloo.code %] + [% IF limits.$limit_key.defined %] + [% limits.delete( limit_key ) %] + + [% ELSE %] + + [% END %] + +
+
+ [% END %] +
+ + [% IF ( expanded_options ) %] + +
+ Limits +
+ +

+ + [% SET year_limit_key = 'yr,st-numeric' %] +   (format: yyyy-yyyy) + [% IF limits.$year_limit_key.defined %] + [% limits.delete(year_limit_key) %] + [% END %] +

+ +
-
-[% END %] +
+ +

+ + [% PROCESS language_limit_select ln_loop=search_languages_loop ln_id='language-limit' ln_index='ln' selected = limits.${'ln,rtrn'}.0 %] + [% limits.delete( 'ln,rtrn' ) %] + + [% PROCESS language_limit_select ln_loop=search_languages_loop ln_id='language-original-limit' ln_index='language-original' selected = limits.${'language-original,rtrn'}.0 %] + [% limits.delete( 'language-original,rtrn' ) %] +

+ +
+ + + [% END %] - -
Location and availability -
- [% IF limit_available %] -

- [% ELSE %] -

- [% END %] -
+ [% IF ( UNIMARC ) %] + [% INCLUDE 'subtypes_unimarc.inc' %] + [% ELSE %] + [% PROCESS 'subtype_limits.inc' %] + +
+ Subtype limits

+ [% PROCESS subtype_dropdowns %] +

+ Current subtype limits + [% FOREACH subtype IN ['aud','fic','bio','ctype','l-format'] %] + [% FOREACH limit IN limits.$subtype %] + + + + + + [% END %] + [% limits.delete( subtype ) %] + [% END %] +
+
+ [% END %] -
-

- [% IF search_groups %] -

OR

+ +
+ Location and availability +
+ [% IF limit_available %] +

+ [% ELSE %] +

+ [% END %] +
-

- - + + [%# FIXME Should not we filter the libraries displayed? %] + [% PROCESS options_for_libraries prefix => "branch:" libraries => Branches.all( unfiltered => 1, do_not_select_my_library => 1, selected => limits.branch.0 ) %] + [% limits.delete('branch') %] + +

+ [% IF search_groups %] +

OR

+

+ + +

[% END %] - [% END %] - [% limits.delete('multibranchlimit') %] - -

- [% END %] -
-
- +
+ + - -[% IF limits.size %] -
Other limits -

- [% FOREACH key IN limits.keys %] - [% FOREACH limit IN limits.$key %] - - - - - - [% END %] - [% END %] -

-
-[% END %] - + + [% IF limits.size %] +
+ Other limits +

+ [% FOREACH key IN limits.keys %] + [% FOREACH limit IN limits.$key %] + + + + + + [% END %] + [% END %] +

+
+ [% END %] + - -
Sorting -

- -

-
-
- - - - + +
+ Sorting +

+ + +

+
+ + + + [% MACRO jsinclude BLOCK %] [% Asset.js("lib/hc-sticky.js") | $raw %] -- 2.39.5