Bugzilla – Attachment 108952 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.82 KB, created by
Katrin Fischer
on 2020-08-23 10:45:57 UTC
(
hide
)
Description:
Bug 25033: (follow-up) Deal with 'Any' branch and don't show dropdown if organized by library
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2020-08-23 10:45:57 UTC
Size:
2.82 KB
patch
obsolete
>From 664cae44d40569c33e7e67b10c6e3d73d25f1bba 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 > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > .../intranet-tmpl/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 ce972056dd..ede593e118 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt >@@ -506,11 +506,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 %] >@@ -540,6 +542,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.11.0
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