Bugzilla – Attachment 104940 Details for
Bug 25033
Counts of suggestions are confusing
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 25033: (follow-up) Deal with 'Any' branch and don't show dropdown if organized by library
Bug-25033-follow-up-Deal-with-Any-branch-and-dont-.patch (text/plain), 2.75 KB, created by
Nick Clemens (kidclamp)
on 2020-05-15 12:26:32 UTC
(
hide
)
Description:
Bug 25033: (follow-up) Deal with 'Any' branch and don't show dropdown if organized by library
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2020-05-15 12:26:32 UTC
Size:
2.75 KB
patch
obsolete
>From f422de735c0783177b9d3fcacff5d813bd067623 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Fri, 15 May 2020 12:25:05 +0000 >Subject: [PATCH] Bug 25033: (follow-up) Deal with 'Any' branch and don't show > dropdown if organized by library > >--- > .../prog/en/modules/suggestion/suggestion.tt | 13 ++++++++----- > suggestion/suggestion.pl | 5 +++-- > 2 files changed, 11 insertions(+), 7 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt >index 1c7a9c015d..ee0fe75aa9 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt >@@ -500,11 +500,13 @@ > > <h1>Suggestions management</h1> > >-<label for="branchcode">Viewing suggestions for library:</label> >-<select name="branchcode" id="branchcode"> >- <option value="__ANY__">Any</option> >- [% PROCESS options_for_libraries libraries => Branches.all( selected => branchfilter || branchcode ) %] >-</select> >+[% IF ( displayby != "branchcode" ) %] >+ <label for="branchcode">Viewing suggestions for library:</label> >+ <select name="branchcode" id="branchcode"> >+ <option value="__ANY__">Any</option> >+ [% PROCESS options_for_libraries libraries => Branches.all( selected => branchfilter || branchcode ) %] >+ </select> >+[% END %] > > > [% FOR m IN messages %] >@@ -534,6 +536,7 @@ > [% ELSIF (suggestion.suggestiontypelabel == "Available") %]Available > [% ELSIF (suggestion.suggestiontypelabel == "Ordered") %]Ordered > [% ELSIF (suggestion.suggestiontypelabel == "Unknown") %]Status unknown >+ [% ELSIF (suggestion.suggestiontypelabel == "__ANY__") %]Any > [% ELSE %][% suggestion.suggestiontypelabel | html %][% END %] > [% ELSE %] > [% IF ( suggestion.suggestiontype ) %] >diff --git a/suggestion/suggestion.pl b/suggestion/suggestion.pl >index 4f5c915e53..560a524c77 100755 >--- a/suggestion/suggestion.pl >+++ b/suggestion/suggestion.pl >@@ -61,8 +61,9 @@ sub GetCriteriumDesc{ > } > return ($criteriumvalue eq 'ASKED'?"Pending":ucfirst(lc( $criteriumvalue))) if ($displayby =~/status/i); > } >- return Koha::Libraries->find($criteriumvalue)->branchname >- if $displayby =~ /branchcode/; >+ if ( $displayby =~ /branchcode/ ) { >+ return $criteriumvalue ? Koha::Libraries->find($criteriumvalue)->branchname : "__ANY__"; >+ } > if ( $displayby =~ /itemtype/ ) { > my $av = Koha::AuthorisedValues->search({ category => 'SUGGEST_FORMAT', authorised_value => $criteriumvalue }); > return $av->count ? $av->next->lib : 'Unknown'; >-- >2.20.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 25033
:
102225
|
102226
|
102227
|
102228
|
102282
|
102283
|
102284
|
102285
|
102299
|
102300
|
102301
|
102302
|
102922
|
104091
|
104092
|
104093
|
104160
|
104161
|
104162
|
104357
|
104940
|
107831
|
108948
|
108949
|
108950
|
108951
|
108952
|
108953
|
108954
|
108984