From 40bb7407a6fe3633952a53d64865cc1ba1c5bcdb Mon Sep 17 00:00:00 2001 From: Lucas Gass Date: Tue, 10 Sep 2024 20:32:53 +0000 Subject: [PATCH] Bug 37883: Minor fix-ups and perltidy --- installer/data/mysql/atomicupdate/bug_37883.pl | 6 ++++-- .../intranet-tmpl/prog/en/modules/catalogue/results.tt | 8 ++++---- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/installer/data/mysql/atomicupdate/bug_37883.pl b/installer/data/mysql/atomicupdate/bug_37883.pl index cc9d07e4bd5..ba14a6b278b 100755 --- a/installer/data/mysql/atomicupdate/bug_37883.pl +++ b/installer/data/mysql/atomicupdate/bug_37883.pl @@ -9,10 +9,12 @@ return { my ( $dbh, $out ) = @$args{qw(dbh out)}; # Do you stuffs here - $dbh->do(q{ + $dbh->do( + q{ INSERT IGNORE INTO systempreferences (`variable`,`value`,`options`,`explanation`,`type`) VALUES ('FilterSearchResultsByLoggedInBranch','0','','Option to filter location column on staff search results by logged in branch','YesNo') - }); + } + ); say $out "Added new system preference 'FilterSearchResultsByLoggedInBranch'"; }, diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt index 1203a0ab7cb..e5600ae6f6a 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt @@ -627,15 +627,15 @@ [% IF status_count == "onloancount" %] [% IF SEARCH_RESULT.${status_count} > 0 %]
[% SEARCH_RESULT.${status_count} | html %] checked out:
- [% IF Koha.Preference('FilterSearchResultsByLoggedInBranch') %] + [% IF ( SEARCH_RESULT.branchonloancount > 0 ) && Koha.Preference('FilterSearchResultsByLoggedInBranch') %]
[% SEARCH_RESULT.branchonloancount | html %] checked out:
[% END %] [% END %] [% ELSIF status_count == "othercount" %] [% IF SEARCH_RESULT.${status_count} > 0 %] -
[% SEARCH_RESULT.${status_count} | html %] unavailable:
- [% IF Koha.Preference('FilterSearchResultsByLoggedInBranch') %] -
[% SEARCH_RESULT.branchothercount | html %] unavailable:
+
[% SEARCH_RESULT.${status_count} | html %] unavailable:
+ [% IF ( SEARCH_RESULT.branchothercount > 0 ) && Koha.Preference('FilterSearchResultsByLoggedInBranch') %] +
[% SEARCH_RESULT.branchothercount | html %] unavailable:
[% END %] [% END %] [% END %] -- 2.39.2