From 2453b991b8cfdfa693a02faf33072768828e3473 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Thu, 20 Feb 2014 10:19:42 -0500 Subject: [PATCH] Bug 11802 - corrects for the patron purchase suggestions page This patch corrects some errors with the staff client's patron purchase suggestions page (members/purchase-suggestions.pl). To test, apply the patch and make sure the patronimages system preference is enabled. - View the purchase suggestions page for a patron whose record has a patron image attached. The image should appear in the left-hand sidebar. - View the page for a patron who has submitted no purchase suggestions. The message should be styled correctly. - The toolbar on the page should look correct and work correctly. Signed-off-by: Jesse Maseto Signed-off-by: Jonathan Druart Signed-off-by: Galen Charlton --- .../prog/en/modules/members/purchase-suggestions.tt | 10 ++++++---- members/purchase-suggestions.pl | 3 +++ 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/purchase-suggestions.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/purchase-suggestions.tt index 58e8e240f5..2d198a2e93 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/purchase-suggestions.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/purchase-suggestions.tt @@ -33,8 +33,8 @@

Purchase suggestions

-
- New purchase suggestion + [% IF suggestions %] @@ -55,7 +55,7 @@

[% IF ( CAN_user_catalogue ) %] - [% s.title |html %] + [% s.title |html %] [% ELSE %] [% s.title |html %] [% END %] @@ -94,7 +94,9 @@ [% ELSE %] - There is no purchase suggestion for this patron. +

+

This patron has not submitted any purchase suggestions

+
[% END %]
diff --git a/members/purchase-suggestions.pl b/members/purchase-suggestions.pl index d071425a52..a624b686d0 100755 --- a/members/purchase-suggestions.pl +++ b/members/purchase-suggestions.pl @@ -51,6 +51,9 @@ $template->param( branchname => GetBranchName( $borrower->{'branchcode'} ), ); +my ($picture, $dberror) = GetPatronImage($borrowernumber); +$template->param( picture => 1 ) if $picture; + my $suggestions = SearchSuggestion( { suggestedby => $borrowernumber } ); $template->param( suggestions => $suggestions ); -- 2.39.5