Bugzilla – Attachment 2164 Details for
Bug 4811
suggestion.pl: display borrowers name in suggestion information filters (Suggested By, Managed by, Accepted by)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
suggestion.pl: display borrowers name in suggestion information filters (Suggested By, Managed by, Accepted by)
0001-BUG-4811-suggestion.pl-display-borrowers-name-in-sug.patch (text/plain), 5.47 KB, created by
Alex Arnaud
on 2010-05-25 12:42:45 UTC
(
hide
)
Description:
suggestion.pl: display borrowers name in suggestion information filters (Suggested By, Managed by, Accepted by)
Filename:
MIME Type:
Creator:
Alex Arnaud
Created:
2010-05-25 12:42:45 UTC
Size:
5.47 KB
patch
obsolete
>From c0c3be24bdd3656f6eb3d9bc3aa42755b8d42b40 Mon Sep 17 00:00:00 2001 >From: Alex Arnaud <alex.arnaud@biblibre.com> >Date: Tue, 25 May 2010 14:40:59 +0200 >Subject: [PATCH] (BUG #4811) suggestion.pl: display borrowers name in suggestion information filters (Suggested By, Managed by, Accepted by) > >--- > C4/Search.pm | 2 +- > .../prog/en/modules/suggestion/suggestion.tmpl | 4 ++-- > suggestion/suggestion.pl | 6 +++--- > 3 files changed, 6 insertions(+), 6 deletions(-) > >diff --git a/C4/Search.pm b/C4/Search.pm >index 2ddc268..1c7bdd6 100644 >--- a/C4/Search.pm >+++ b/C4/Search.pm >@@ -2541,7 +2541,7 @@ sub GetDistinctValues { > my $dbh = C4::Context->dbh; > warn "select DISTINCT($column) as value, count(*) as cnt from $table group by lib order by $column " if $DEBUG; > my $sth = $dbh->prepare( >- "select DISTINCT($column) as value, count(*) as cnt from $table " . ( $string ? " where $column like \"$string%\"" : "" ) . "group by value order by $column " ); >+ "select DISTINCT($column) as value, count(*) as cnt from $table " . ( $string ? " where $column like \"$string%\" and $column is not null " : " where $column is not null " ) . "group by value order by $column " ); > $sth->execute; > my $elements = $sth->fetchall_arrayref( {} ); > return $elements; >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tmpl >index 30350ac..74cc5fb 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tmpl >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tmpl >@@ -305,11 +305,11 @@ h4.collapse a { font-size : 80%; text-decoration: none; } fieldset.brief ol { di > </select></li> > <li><label for="suggesteddate"> Suggested on:</label><!--TMPL_VAR Name="suggesteddate"--></li> > <li><label for="suggestionmanagedby"> Managed by:</label><select id="suggestionmanagedby" name="suggestionmanagedby"><option value="">Any</option> >-<!-- TMPL_LOOP name="suggestionmanagedby_loop" --><!-- TMPL_IF NAME="selected" --><option value="<!-- TMPL_VAR name="code" -->" selected="selected"><!-- TMPL_VAR name="desc" --></option><!-- TMPL_ELSE --><option value="<!-- TMPL_VAR name="code" -->"><!-- TMPL_VAR name="desc" --></option><!-- /TMPL_IF --><!-- /TMPL_LOOP --> >+<!-- TMPL_LOOP name="managedby_loop" --><!-- TMPL_IF NAME="selected" --><option value="<!-- TMPL_VAR name="code" -->" selected="selected"><!-- TMPL_VAR name="desc" --></option><!-- TMPL_ELSE --><option value="<!-- TMPL_VAR name="code" -->"><!-- TMPL_VAR name="desc" --></option><!-- /TMPL_IF --><!-- /TMPL_LOOP --> > </select></li> > <li><label for="manageddate"> Management date:</label><!--TMPL_VAR Name="manageddate"--></li> > <li><label for="suggestionacceptedby"> Accepted by:</label><select id="suggestionacceptedby" name="suggestionacceptedby"><option value="">Any</option> >-<!-- TMPL_LOOP name="suggestionacceptedby_loop" --><!-- TMPL_IF NAME="selected" --> <option value="<!-- TMPL_VAR name="code" -->" selected="selected"><!-- TMPL_VAR name="desc" --></option><!-- TMPL_ELSE --><option value="<!-- TMPL_VAR name="code" -->"><!-- TMPL_VAR name="desc" --></option><!-- /TMPL_IF --><!-- /TMPL_LOOP --> >+<!-- TMPL_LOOP name="acceptedby_loop" --><!-- TMPL_IF NAME="selected" --> <option value="<!-- TMPL_VAR name="code" -->" selected="selected"><!-- TMPL_VAR name="desc" --></option><!-- TMPL_ELSE --><option value="<!-- TMPL_VAR name="code" -->"><!-- TMPL_VAR name="desc" --></option><!-- /TMPL_IF --><!-- /TMPL_LOOP --> > </select></li> > <li><label for="accepteddate"> Accepted on:</label><!--TMPL_VAR Name="accepteddate"--></li><li><input type="submit" value="Go" /></li></ol> > </fieldset> >diff --git a/suggestion/suggestion.pl b/suggestion/suggestion.pl >index ed190ac..4358811 100755 >--- a/suggestion/suggestion.pl >+++ b/suggestion/suggestion.pl >@@ -57,7 +57,7 @@ sub GetCriteriumDesc { > 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 =~ /managedby/ || $displayby =~ /acceptedby/ ) { >+ if ( $displayby =~ /managedby/ || $displayby =~ /acceptedby/ || $displayby =~ /suggestedby/) { > my $borr = C4::Members::GetMember( borrowernumber => $criteriumvalue ); > return "" unless $borr; > >@@ -125,8 +125,8 @@ if ( $op =~ /save/i ) { > } elsif ( $op eq "change" ) { > if ( $$suggestion_ref{"STATUS"} ) { > if ( my $tmpstatus = lc( $$suggestion_ref{"STATUS"} ) =~ /ACCEPTED|REJECTED/i ) { >- $$suggestion_ref{ "$tmpstatus" . "date" } = C4::Dates->today; >- $$suggestion_ref{ "$tmpstatus" . "by" } = C4::Context->userenv->{number}; >+ $$suggestion_ref{ lc( $$suggestion_ref{"STATUS"}) . "date" } = C4::Dates->today; >+ $$suggestion_ref{ lc( $$suggestion_ref{"STATUS"}) . "by" } = C4::Context->userenv->{number}; > } > $$suggestion_ref{"manageddate"} = C4::Dates->today; > $$suggestion_ref{"managedby"} = C4::Context->userenv->{number}; >-- >1.6.3.3 >
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 4811
: 2164 |
3423