Bugzilla – Attachment 157989 Details for
Bug 33809
Accessibility: OPAC results page needs more descriptive links
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 33809: Centralize duplicated code
Bug-33809-Centralize-duplicated-code.patch (text/plain), 7.72 KB, created by
Kyle M Hall (khall)
on 2023-10-27 15:31:05 UTC
(
hide
)
Description:
Bug 33809: Centralize duplicated code
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2023-10-27 15:31:05 UTC
Size:
7.72 KB
patch
obsolete
>From 1e468ea064fc5fb11af03735a95f22dcf269a2a5 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Fri, 7 Jul 2023 09:44:21 +0200 >Subject: [PATCH] Bug 33809: Centralize duplicated code > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > .../bootstrap/en/includes/opac-facets.inc | 45 +++++++++---------- > 1 file changed, 21 insertions(+), 24 deletions(-) > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-facets.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-facets.inc >index 304d9f7d4fd..e66a89b45cd 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-facets.inc >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-facets.inc >@@ -1,6 +1,7 @@ > [% USE raw %] > [% USE AuthorisedValues %] > [% USE Languages %] >+[% PROCESS 'i18n.inc' %] > [% IF ( opacfacets && facets_loop && total ) %] > <div id="search-facets"> > <h2><a href="#" class="menu-collapse-toggle">Refine your search</a></h2> >@@ -36,6 +37,18 @@ > [% IF ( related ) %] <li>(related searches: [% FOREACH relate IN related %][% relate.related_search | html %][% END %])</li>[% END %] > </li> > >+ [% SET more_less_labels = {} %] >+ [% more_less_labels.Authors = { more = t("Show more authors"), less = t("Show fewer authors") } %] >+ [% more_less_labels.Titles = { more = t("Show more titles"), less = t("Show fewer titles") } %] >+ [% more_less_labels.Topics = { more = t("Show more topics"), less = t("Show fewer topics") } %] >+ [% more_less_labels.Places = { more = t("Show more places"), less = t("Show fewer places") } %] >+ [% more_less_labels.Series = { more = t("Show more series"), less = t("Show fewer series") } %] >+ [% more_less_labels.ItemTypes = { more = t("Show more types"), less = t("Show fewer types") } %] >+ [% more_less_labels.CollectionCodes = { more = t("Show more collection codes"), less = t("Show fewer collection codes") } %] >+ [% more_less_labels.Language = { more = t("Show more languages"), less = t("Show fewer languages") } %] >+ [% more_less_labels.HomeLibrary = { more = t("Show more home libraries"), less = t("Show fewer home libraries") } %] >+ [% more_less_labels.HoldingLibrary = { more = t("Show more holding libraries"), less = t("Show fewer holding libraries") } %] >+ [% more_less_labels.Location = { more = t("Show more locations"), less = t("Show fewer locations") } %] > [% FOREACH facets_loo IN facets_loop %] > [% IF facets_loo.facets.size > 0 %] > <li id="[% facets_loo.type_id | html %]"> >@@ -86,34 +99,18 @@ > [% END %] > [% IF facets_loo.facets.size > 5 %] > <li class="moretoggle"> >- [% IF facets_loo.type_label_Authors %]<a href="#" aria-label="Show more authors"><strong>Show more</strong></a>[% END %] >- [% IF facets_loo.type_label_Titles %]<a href="#" aria-label="Show more titles"><strong>Show more</strong></a>[% END %] >- [% IF facets_loo.type_label_Topics %]<a href="#" aria-label="Show more topics"><strong>Show more</strong></a>[% END %] >- [% IF facets_loo.type_label_Places %]<a href="#" aria-label="Show more places"><strong>Show more</strong></a>[% END %] >- [% IF facets_loo.type_label_Series %]<a href="#" aria-label="Show more series"><strong>Show more</strong></a>[% END %] >- [% IF facets_loo.type_label_ItemTypes %]<a href="#" aria-label="Show more item types"><strong>Show more</strong></a>[% END %] >- [% IF facets_loo.type_label_CollectionCodes %]<a href="#" aria-label="Show more collection codes"><strong>Show more</strong></a>[% END %] >- [% IF facets_loo.type_label_Language %]<a href="#" aria-label="Show more languages"><strong>Show more</strong></a>[% END %] >- [% UNLESS singleBranchMode %] >- [% IF ( facets_loo.type_label_HomeLibrary ) %]<a href="#" aria-label="Show more home libraries"><strong>Show more</strong></a>[% END %] >- [% IF ( facets_loo.type_label_HoldingLibrary ) %]<a href="#" aria-label="Show more holding libraries"><strong>Show more</strong></a>[% END %] >+ [% FOR label IN more_less_labels.keys %] >+ [% IF facets_loo.item('type_label_' _ label) %] >+ <a href="#" aria-label="[% more_less_labels.item(label).more | uri %]"><strong>Show more</strong></a> >+ [% END %] > [% END %] >- [% IF facets_loo.type_label_Location %]<a href="#" aria-label="Show more locations"><strong>Show more</strong></a>[% END %] > </li> > <li class="moretoggle" style="display:none"> >- [% IF facets_loo.type_label_Authors %]<a href="#" aria-label="Show fewer authors"><strong>Show less</strong></a>[% END %] >- [% IF facets_loo.type_label_Titles %]<a href="#" aria-label="Show fewer titles"><strong>Show less</strong></a>[% END %] >- [% IF facets_loo.type_label_Topics %]<a href="#" aria-label="Show fewer topics"><strong>Show less</strong></a>[% END %] >- [% IF facets_loo.type_label_Places %]<a href="#" aria-label="Show fewer places"><strong>Show less</strong></a>[% END %] >- [% IF facets_loo.type_label_Series %]<a href="#" aria-label="Show fewer series"><strong>Show less</strong></a>[% END %] >- [% IF facets_loo.type_label_ItemTypes %]<a href="#" aria-label="Show fewer item types"><strong>Show less</strong></a>[% END %] >- [% IF facets_loo.type_label_CollectionCodes %]<a href="#" aria-label="Show fewer collection codes"><strong>Show less</strong></a>[% END %] >- [% IF facets_loo.type_label_Language %]<a href="#" aria-label="Show fewer languages"><strong>Show less</strong></a>[% END %] >- [% UNLESS singleBranchMode %] >- [% IF ( facets_loo.type_label_HomeLibrary ) %]<a href="#" aria-label="Show fewer home libraries"><strong>Show less</strong></a>[% END %] >- [% IF ( facets_loo.type_label_HoldingLibrary ) %]<a href="#" aria-label="Show fewer holding libraries"><strong>Show less</strong></a>[% END %] >+ [% FOR label IN more_less_labels.keys %] >+ [% IF facets_loo.item('type_label_' _ label) %] >+ <a href="#" aria-label="[% more_less_labels.item(label).less | uri %]"><strong>Show less</strong></a> >+ [% END %] > [% END %] >- [% IF facets_loo.type_label_Location %]<a href="#" aria-label="Show fewer locations"><strong>Show less</strong></a>[% END %] > </li> > [% END %] > </ul> >-- >2.30.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 33809
:
151568
|
151569
|
151576
|
151606
|
151607
|
151925
|
152050
|
153121
|
157986
|
157987
|
157988
| 157989