Bugzilla – Attachment 156430 Details for
Bug 34940
Highlight logged-in library in facets
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 34940: Highlight logged-in library in facets
Bug-34940-Highlight-logged-in-library-in-facets.patch (text/plain), 2.59 KB, created by
David Nind
on 2023-09-30 05:00:19 UTC
(
hide
)
Description:
Bug 34940: Highlight logged-in library in facets
Filename:
MIME Type:
Creator:
David Nind
Created:
2023-09-30 05:00:19 UTC
Size:
2.59 KB
patch
obsolete
>From 152fb44d4ac11a4cf81bedff3bf8102387e85487 Mon Sep 17 00:00:00 2001 >From: Fridolin Somers <fridolin.somers@biblibre.com> >Date: Wed, 27 Sep 2023 11:26:15 -1000 >Subject: [PATCH] Bug 34940: Highlight logged-in library in facets > >Like in patron searches Bug 10902, use class 'currentlibrary' to highlight logged-in library in facets > >Test plan : >1) Set system preference 'DisplayLibraryFacets' to 'both home and holding libraries' >2) Perform a seach that will find items of your logged-in library. > In KTD, search for 'branch:CPL' >3) Check the facet (home and holding libraries) of your logged-in library is highlighted > >Signed-off-by: David Nind <david@davidnind.com> >--- > koha-tmpl/intranet-tmpl/prog/en/includes/facets.inc | 7 +++++-- > 1 file changed, 5 insertions(+), 2 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..addc25ee9c 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/facets.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/facets.inc >@@ -1,5 +1,6 @@ > [% USE raw %] > [% USE AuthorisedValues %] >+[% USE Branches %] > [% USE Languages %] > > [% IF ( opacfacets ) %] >@@ -60,13 +61,15 @@ > [% ELSE %] > <li> > [% END %] >+ [% SET facet_is_current_library = ( facets_loo.type_label_HomeLibrary || facets_loo.type_label_HoldingLibrary ) && !singleBranchMode && facet.facet_title_value == Branches.GetLoggedInBranchcode %] >+ [% SET facet_label_class = facet_is_current_library ? 'facet-label currentlibrary' : 'facet-label' %] > [% IF facet.active %] > [% local_url = BLOCK %][% url | $raw %][% "&nolimit=" _ facet.type_link_value _ ":" _ facet.facet_link_value | url %][% END %] >- <span class="facet-label">[% facet.facet_label_value | html %]</span> >+ <span class="[% facet_label_class | html %]">[% facet.facet_label_value | html %]</span> > [<a href="[% local_url | $raw %]" title="Remove facet [% facet.facet_label_value | html %]">x</a>] > [% ELSE %] > [% local_url = BLOCK %][% url | $raw %][% "&limit=" _ facet.type_link_value _ ":" _ facet.facet_link_value | url %][% END %] >- <span class="facet-label"><a href="[% local_url | $raw %]" title="[% facet.facet_title_value | html %]">[% facet.facet_label_value | html %]</a></span> >+ <span class="[% facet_label_class | html %]"><a href="[% local_url | $raw %]" title="[% facet.facet_title_value | html %]">[% facet.facet_label_value | html %]</a></span> > [% IF ( displayFacetCount ) %] > <span class="facet-count"> ([% facet.facet_count | html %])</span> > [% END %] >-- >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 34940
:
156310
|
156430
|
157238
|
157803