From cb88fb939e4c0287247562d2e3b921e3ea912e94 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Tue, 17 Oct 2023 16:46:39 +0000 Subject: [PATCH] Bug 34422: Reindent factets.inc This patch reindents the staff interface catalog search results facets template so that it has consistent indentation. These changes should have no visible effect on the page. To test, apply the patch and perform a catalog search in the staff interface.The facets should look the same as always. Viewing the diff while ignoring whitespace changes should show only places where a line break was added. Signed-off-by: Matt Blenkinsop --- .../intranet-tmpl/prog/en/includes/facets.inc | 209 +++++++++++------- 1 file changed, 126 insertions(+), 83 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/facets.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/facets.inc index 0dc74bbe9f..170961c3e2 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/facets.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/facets.inc @@ -3,88 +3,131 @@ [% USE Languages %] [% IF ( opacfacets ) %] -[% IF ( facets_loop ) %] -
-

Refine your search

-
    -[% IF Koha.Preference("SavedSearchFilters") && search_filters.count > 0 %] -
  • -Custom search filters -
      - [% SET base_url = "/cgi-bin/koha/catalogue/search.pl?" _ query_cgi _ limit_cgi %] - [% FOREACH search_filter IN search_filters %] - [% SET search_filter_id = search_filter.id | uri %] -
    • - [% IF active_filters.${search_filter.id} %] - [% search_filter.name | html %][x] - [% ELSE %] - [% search_filter.name | html %] - [% END %] -
    • - [% END %] -
    -
  • -[% END %] -
  • Availability - [% IF ( related ) %]
  • (related searches: [% FOREACH relate IN related %][% relate.related_search | html %][% END %])
  • [% END %] - + [% IF ( facets_loop ) %] +
    +

    Refine your search

    +
      + [% IF Koha.Preference("SavedSearchFilters") && search_filters.count > 0 %] +
    • + Custom search filters +
        + [% SET base_url = "/cgi-bin/koha/catalogue/search.pl?" _ query_cgi _ limit_cgi %] + [% FOREACH search_filter IN search_filters %] + [% SET search_filter_id = search_filter.id | uri %] +
      • + [% IF active_filters.${search_filter.id} %] + [% search_filter.name | html %][x] + [% ELSE %] + [% search_filter.name | html %] + [% END %] +
      • + [% END %] +
      +
    • + [% END %] +
    • + Availability + + [% IF ( related ) %] +
    • + (related searches: [% FOREACH relate IN related %][% relate.related_search | html %][% END %]) +
    • + [% END %] + - [% FOREACH facets_loo IN facets_loop %] -[% IF facets_loo.facets.size > 0 %] -
    • -[% facets_loo.type_label | html %] -[% IF facets_loo.type_label_Authors %]Authors[% END %] -[% IF facets_loo.type_label_Titles %]Titles[% END %] -[% IF facets_loo.type_label_Topics %]Topics[% END %] -[% IF facets_loo.type_label_Places %]Places[% END %] -[% IF facets_loo.type_label_Series %]Series[% END %] -[% IF facets_loo.type_label_ItemTypes %]Item types[% END %] -[% IF ( facets_loo.type_label_HomeLibrary ) %]Home libraries[% END %] -[% IF ( facets_loo.type_label_HoldingLibrary ) %]Holding libraries[% END %] -[% IF facets_loo.type_label_Location %]Locations[% END %] -[% IF facets_loo.type_label_CollectionCodes %]Collections[% END %] -[% IF facets_loo.type_label_Language %]Languages[% END %] -
        - [% SET url = "/cgi-bin/koha/catalogue/search.pl?" _ query_cgi _ limit_cgi %] - [% IF ( sort_by ) %] - [% url = BLOCK %][% url | $raw %][% "&sort_by=" _ sort_by | url %][% END %] - [% END %] - [% IF ( results_per_page ) %] - [% url = BLOCK %][% url | $raw %][% "&count=" _ results_per_page | url %][% END %] - [% END %] - [% FOREACH facet IN facets_loo.facets %] - [% IF facets_loo.type_label_CollectionCodes %][% SET facet.facet_label_value = AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.ccode', authorised_value => facet.facet_label_value ) || facet.facet_label_value %][% END %] - [% IF facets_loo.type_label_Language %][% SET facet.facet_label_value = Languages.GetByISOCode(lang,facet.facet_label_value) || facet.facet_label_value %][% END %] - [% IF loop.count > 5 && !facet.active %] -
      • - [% END %] - [% IF facet.active %] - [% local_url = BLOCK %][% url | $raw %][% "&nolimit=" _ facet.type_link_value _ ":" _ facet.facet_link_value | url %][% END %] - [% facet.facet_label_value | html %] - [x] - [% ELSE %] - [% local_url = BLOCK %][% url | $raw %][% "&limit=" _ facet.type_link_value _ ":" _ facet.facet_link_value | url %][% END %] - [% facet.facet_label_value | html %] - [% IF ( displayFacetCount ) %] - ([% facet.facet_count | html %]) - [% END %] - [% END %] -
      • - [% END %] - [% IF facets_loo.facets.size > 5 %] -
      • - Show more -
      • - - [% END %] -
    • -[% END %] -[% END %] -
    -
    -[% END %] + [% FOREACH facets_loo IN facets_loop %] + [% IF facets_loo.facets.size > 0 %] +
  • + [% facets_loo.type_label | html %] + [% IF facets_loo.type_label_Authors %] + Authors + [% END %] + [% IF facets_loo.type_label_Titles %] + Titles + [% END %] + [% IF facets_loo.type_label_Topics %] + Topics + [% END %] + [% IF facets_loo.type_label_Places %] + Places + [% END %] + [% IF facets_loo.type_label_Series %] + Series + [% END %] + [% IF facets_loo.type_label_ItemTypes %] + Item types + [% END %] + [% IF ( facets_loo.type_label_HomeLibrary ) %] + Home libraries + [% END %] + [% IF ( facets_loo.type_label_HoldingLibrary ) %] + Holding libraries + [% END %] + [% IF facets_loo.type_label_Location %] + Locations + [% END %] + [% IF facets_loo.type_label_CollectionCodes %] + Collections + [% END %] + [% IF facets_loo.type_label_Language %] + Languages + [% END %] +
      + [% SET url = "/cgi-bin/koha/catalogue/search.pl?" _ query_cgi _ limit_cgi %] + [% IF ( sort_by ) %] + [% url = BLOCK %][% url | $raw %][% "&sort_by=" _ sort_by | url %][% END %] + [% END %] + [% IF ( results_per_page ) %] + [% url = BLOCK %][% url | $raw %][% "&count=" _ results_per_page | url %][% END %] + [% END %] + [% FOREACH facet IN facets_loo.facets %] + [% IF facets_loo.type_label_CollectionCodes %] + [% SET facet.facet_label_value = AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.ccode', authorised_value => facet.facet_label_value ) || facet.facet_label_value %] + [% END %] + [% IF facets_loo.type_label_Language %] + [% SET facet.facet_label_value = Languages.GetByISOCode(lang,facet.facet_label_value) || facet.facet_label_value %] + [% END %] + [% IF loop.count > 5 && !facet.active %] +
    • + [% END %] + [% IF facet.active %] + [% local_url = BLOCK %][% url | $raw %][% "&nolimit=" _ facet.type_link_value _ ":" _ facet.facet_link_value | url %][% END %] + [% facet.facet_label_value | html %] + [x] + [% ELSE %] + [% local_url = BLOCK %][% url | $raw %][% "&limit=" _ facet.type_link_value _ ":" _ facet.facet_link_value | url %][% END %] + [% facet.facet_label_value | html %] + [% IF ( displayFacetCount ) %] + ([% facet.facet_count | html %]) + [% END %] + [% END %] +
    • + [% END %] + [% IF facets_loo.facets.size > 5 %] +
    • + Show more +
    • + + [% END %] +
    +
  • + [% END %] + [% END %] +
+
+ [% END %] [% END %] -- 2.30.2