Bugzilla – Attachment 19356 Details for
Bug 10519
Suggestions: 'Organize by' and correct display of tab descriptions broken
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 10519: Suggestions: 'Organize by' and correct display of tab descriptions broken
Bug-10519-Suggestions-Organize-by-and-correct-disp.patch (text/plain), 6.13 KB, created by
Katrin Fischer
on 2013-07-03 06:44:48 UTC
(
hide
)
Description:
Bug 10519: Suggestions: 'Organize by' and correct display of tab descriptions broken
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2013-07-03 06:44:48 UTC
Size:
6.13 KB
patch
obsolete
>From 029cd8817c03bc6dcd0eb6ad673572b00668bb3b Mon Sep 17 00:00:00 2001 >From: Katrin Fischer <Katrin.Fischer.83@web.de> >Date: Wed, 3 Jul 2013 08:26:06 +0200 >Subject: [PATCH] Bug 10519: Suggestions: 'Organize by' and correct display of > tab descriptions broken > >The tabbed display in suggestions offers different options to organize >the tabs. The descriptions on the tabs and some of the search options were >not working correctly. > >To test: >- Add several suggestions to your installation, make sure you have: > - suggestions from various libraries and at least one for > 'Any library' that has been created from the intranet > - suggestions from different users > - suggestions with different status > - suggestions with different selected itypes > >Test all the 'organize by' options, make sure that the tabs >have correct descriptions. > >- Add 1 or 2 custom status to SUGGEST_STATUS authorized value. > - Verify display is still correct and your new status are displayed. > >Test setting the library option in the acquisition section of >the filters keeps "Any" when you select it, so you can make >use of the 'organize by libraries'. Before this patch >the pull down would always jump back to your own branch. > >Note: Patch best tested in combination with bug 4907. > >Conflicts: > > suggestion/suggestion.pl >--- > .../prog/en/modules/suggestion/suggestion.tt | 28 ++++++++++++-------- > suggestion/suggestion.pl | 15 ++++++++--- > 2 files changed, 28 insertions(+), 15 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 c1f54e3..b622a2a 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt >@@ -422,19 +422,25 @@ $(document).ready(function() { calcNewsuggTotal(); }); > > <a href="#[% suggestion.suggestiontype %]"> > [% IF ( suggestion.suggestiontypelabel ) %] >- [% IF (suggestion.suggestiontypelabel == "Pending") %]Pending >- [% ELSIF (suggestion.suggestiontypelabel == "Accepted") %]Accepted >- [% ELSIF (suggestion.suggestiontypelabel == "Checked") %]Checked >- [% ELSIF (suggestion.suggestiontypelabel == "Rejected") %]Rejected >- [% ELSIF (suggestion.suggestiontypelabel == "Available") %]Available >- [% ELSIF (suggestion.suggestiontypelabel == "Ordered") %]Ordered >- [% ELSE %][% suggestion.suggestiontypelabel %][% END %] >- [% ELSE %] >- [% IF ( suggestion.suggestiontype ) %] >- [% KohaAuthorisedValues.GetByCode( 'SUGGEST_STATUS', suggestion.suggestiontype ) %] >+ [% IF (displayby == "STATUS") %] >+ [% IF (suggestion.suggestiontypelabel == "Pending") %]Pending >+ [% ELSIF (suggestion.suggestiontypelabel == "Accepted") %]Accepted >+ [% ELSIF (suggestion.suggestiontypelabel == "Checked") %]Checked >+ [% ELSIF (suggestion.suggestiontypelabel == "Rejected") %]Rejected >+ [% ELSIF (suggestion.suggestiontypelabel == "Available") %]Available >+ [% ELSIF (suggestion.suggestiontypelabel == "Ordered") %]Ordered >+ [% ELSIF (suggestion.suggestiontypelabel == "Unknown") %]Unknown >+ [% ELSIF ( suggestion.suggestiontype ) %] >+ [% KohaAuthorisedValues.GetByCode( 'SUGGEST_STATUS', suggestion.suggestiontype ) %] >+ [% ELSE %] >+ Unknown >+ [% END %] > [% ELSE %] >- No name >+ [% IF (suggestion.suggestiontypelabel == "Any") %]Any library >+ [% ELSE %][% suggestion.suggestiontypelabel %][% END %] > [% END %] >+ [% ELSE %] >+ Unknown > [% END %] > ([% suggestion.suggestions_loop.size %])</a></li> > >diff --git a/suggestion/suggestion.pl b/suggestion/suggestion.pl >index 6d8350f..d0b0965 100755 >--- a/suggestion/suggestion.pl >+++ b/suggestion/suggestion.pl >@@ -58,11 +58,17 @@ sub Init{ > > sub GetCriteriumDesc{ > my ($criteriumvalue,$displayby)=@_; >- unless ( grep { /$criteriumvalue/ } qw(ASKED ACCEPTED REJECTED CHECKED ORDERED AVAILABLE) ) { >+ if ($displayby =~ /status/i ) { >+ if ( grep { /$criteriumvalue/ } qw(ASKED ACCEPTED REJECTED CHECKED ORDERED AVAILABLE) ) { >+ return ($criteriumvalue eq 'ASKED'?"Pending":ucfirst(lc( $criteriumvalue))) >+ } >+ else { > return GetAuthorisedValueByCode('SUGGEST_STATUS', $criteriumvalue ) || $criteriumvalue; >+ } >+ } >+ if ($displayby =~/branchcode/) { >+ return (GetBranchName($criteriumvalue)) || "Any"; > } >- return ($criteriumvalue eq 'ASKED'?"Pending":ucfirst(lc( $criteriumvalue))) if ($displayby =~/status/i); >- return (GetBranchName($criteriumvalue)) if ($displayby =~/branchcode/); > return (GetSupportName($criteriumvalue)) if ($displayby =~/itemtype/); > if ($displayby =~/suggestedby/||$displayby =~/managedby/||$displayby =~/acceptedby/){ > my $borr=C4::Members::GetMember(borrowernumber=>$criteriumvalue); >@@ -86,6 +92,7 @@ my $returnsuggested = $input->param('returnsuggested'); > my $managedby = $input->param('managedby'); > my $displayby = $input->param('displayby') || ''; > my $tabcode = $input->param('tabcode'); >+my $branchcodesel = $input->param('branchcode'); > > # filter informations which are not suggestion related. > my $suggestion_ref = $input->Vars; >@@ -209,7 +216,7 @@ if ($op=~/else/) { > my $reasonsloop = GetAuthorisedValues("SUGGEST"); > foreach my $criteriumvalue ( @criteria_dv ) { > # By default, display suggestions from current working branch >- unless ( exists $$suggestion_ref{'branchcode'} ) { >+ unless ( exists $$suggestion_ref{'branchcode'} || $branchcodesel eq "__ANY__" ) { > $$suggestion_ref{'branchcode'} = C4::Context->userenv->{'branch'}; > } > my $definedvalue = defined $$suggestion_ref{$displayby} && $$suggestion_ref{$displayby} ne ""; >-- >1.7.9.5
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 10519
:
19300
|
19327
|
19340
|
19341
|
19355
|
19356
|
19364
|
28763
|
28850
|
28851
|
28852
|
29598
|
29599
|
29686