Bugzilla – Attachment 173004 Details for
Bug 15728
Hide component parts from search result
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 15728: Add component records facet to staff client
Bug-15728-Add-component-records-facet-to-staff-cli.patch (text/plain), 3.72 KB, created by
Lari Taskula
on 2024-10-19 13:35:22 UTC
(
hide
)
Description:
Bug 15728: Add component records facet to staff client
Filename:
MIME Type:
Creator:
Lari Taskula
Created:
2024-10-19 13:35:22 UTC
Size:
3.72 KB
patch
obsolete
>From 979307224f4efb98d204296c94353199b4295760 Mon Sep 17 00:00:00 2001 >From: Lari Taskula <lari.taskula@hypernova.fi> >Date: Fri, 18 Oct 2024 20:32:10 +0000 >Subject: [PATCH] Bug 15728: Add component records facet to staff client > >Test plan provided in "Support component records limit" commits. >--- > catalogue/search.pl | 13 ++++++++++-- > .../intranet-tmpl/prog/en/includes/facets.inc | 21 +++++++++++++++++++ > 2 files changed, 32 insertions(+), 2 deletions(-) > >diff --git a/catalogue/search.pl b/catalogue/search.pl >index ba97a75f1c..86defa9722 100755 >--- a/catalogue/search.pl >+++ b/catalogue/search.pl >@@ -400,13 +400,22 @@ if ($operands[0] && !$operands[1]) { > $basic_search=1; > } > >-my $available; >+my ( $available, $component_records, $exclude_component_records ); > foreach my $limit(@limits) { > if ($limit =~/available/) { > $available = 1; > } >+ elsif ( $limit =~ /^component_records$/ ) { >+ $component_records = 1; >+ } elsif ( $limit =~ /^exclude_component_records$/ ) { >+ $exclude_component_records = 1; >+ } > } >-$template->param(available => $available); >+$template->param( >+ available => $available, >+ limit_component_records => $component_records, >+ limit_exclude_component_records => $exclude_component_records, >+); > > # append year limits if they exist > my $limit_yr; >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/facets.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/facets.inc >index 2e54fcb523..2782faa167 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/facets.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/facets.inc >@@ -47,6 +47,27 @@ > [% END %] > </li> <!-- /#availability_facet --> > >+ [% IF Koha.Preference("ShowComponentRecordsFacet") == 'staff' || Koha.Preference("ShowComponentRecordsFacet") == 'both' %] >+ <li id="component_record_facet"> >+ Component records >+ <ul> >+ <li> >+ [% IF ( limit_exclude_component_records ) || ( limit_component_records ) %] >+ <strong>[% IF ( limit_exclude_component_records ) %]Excluding[% ELSE %]Showing only[% END %] component records</strong> >+ </li> >+ <li> >+ <a href="/cgi-bin/koha/catalogue/search.pl?[% query_cgi | $raw %][% IF ( limit_exclude_component_records ) %][% limit_cgi_not_limit_exclude_component_records %][% END %][% IF ( limit_component_records ) %][% limit_cgi_not_limit_component_records %][% END %][% IF ( sort_by ) %]&sort_by=[% sort_by | uri %][% END %]">Show all records</a> >+ [% ELSE %] >+ <a href="/cgi-bin/koha/catalogue/search.pl?[% query_cgi | $raw %][% limit_cgi | $raw %][% IF ( sort_by ) %]&sort_by=[% sort_by | uri %][% END %]&limit=exclude_component_records">Exclude component records</a> >+ </li> >+ <li> >+ <a href="/cgi-bin/koha/catalogue/search.pl?[% query_cgi | $raw %][% limit_cgi | $raw %][% IF ( sort_by ) %]&sort_by=[% sort_by | uri %][% END %]&limit=component_records">Show component records</a> >+ [% END # /IF limit_exclude_component_records %] >+ </li> >+ </ul> >+ </li> <!-- /#component_record_facet --> >+ [% END # /IF ShowComponentRecordsFacet %] >+ > [% FOREACH facets_loo IN facets_loop %] > [% IF facets_loo.facets.size > 0 %] > <li id="[% facets_loo.type_id | html %]"> >-- >2.34.1
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 15728
:
173001
|
173002
|
173003
|
173004
|
173005
|
173007
|
173008