Bug 14753: Add the "page" parameter in the yml file
[koha.git] / members / purchase-suggestions.pl
index d071425..11e806e 100755 (executable)
 
 use Modern::Perl;
 
-use CGI;
+use CGI qw ( -utf8 );
 use C4::Auth;
 use C4::Context;
 use C4::Output;
 use C4::Branch;
 use C4::Members;
+use C4::Members::Attributes qw(GetBorrowerAttributes);
 use C4::Suggestions;
 
 my $input = new CGI;
@@ -47,10 +48,23 @@ foreach my $key ( keys %$borrower ) {
     $template->param( $key => $borrower->{$key} );
 }
 $template->param(
+    suggestionsview  => 1,
     categoryname => $borrower->{'description'},
     branchname   => GetBranchName( $borrower->{'branchcode'} ),
+    RoutingSerials => C4::Context->preference('RoutingSerials'),
 );
 
+if (C4::Context->preference('ExtendedPatronAttributes')) {
+    my $attributes = GetBorrowerAttributes($borrowernumber);
+    $template->param(
+        ExtendedPatronAttributes => 1,
+        extendedattributes => $attributes
+    );
+}
+
+my ($picture, $dberror) = GetPatronImage($borrowernumber);
+$template->param( picture => 1 ) if $picture;
+
 my $suggestions = SearchSuggestion( { suggestedby => $borrowernumber } );
 
 $template->param( suggestions => $suggestions );