From cc5e1f08918fb1717d1e530ea7262e9bbaeecb50 Mon Sep 17 00:00:00 2001 From: Nicole Engard <nengard@gmail.com> Date: Wed, 12 Aug 2009 19:38:35 -0500 Subject: [PATCH] ENH 3561: Show Patron Image in OPAC Content-Type: text/plain; charset="utf-8" This patch requires that the staffClientBaseURL system preference is set in order to show the patron image in the OPAC. --- .../opac-tmpl/prog/en/modules/opac-userupdate.tmpl | 16 ++++++++++++++++ opac/opac-userupdate.pl | 6 ++++++ 2 files changed, 22 insertions(+), 0 deletions(-) diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-userupdate.tmpl b/koha-tmpl/opac-tmpl/prog/en/modules/opac-userupdate.tmpl index ad638e8..0433622 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-userupdate.tmpl +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-userupdate.tmpl @@ -87,6 +87,22 @@ </div> <div class="yui-u"> + +<!-- TMPL_IF NAME="intraneturl" --> +<!-- TMPL_IF NAME="patronimages" --> +<fieldset class="brief"> +<legend>Patron Photo</legend> +<ol> +<!-- TMPL_IF NAME="picture" --> +<li><img src="http://<!-- TMPL_VAR NAME="intraneturl" -->/cgi-bin/koha/members/patronimage.pl?crdnum=<!-- TMPL_VAR NAME="cardnumber" -->" id="patronimage" alt="<!-- TMPL_VAR name="firstname" --> <!-- TMPL_VAR name="surname" --> (<!-- TMPL_VAR NAME="cardnumber" -->)" border="0" style="max-width : 140px; margin: .3em 0 .3em .3em; padding: .2em; border: 1px solid #CCCCCC; width:auto !important; width:130px;" /></li> +<!-- TMPL_ELSE --> +<li><img src="http://<!-- TMPL_VAR NAME="intraneturl" -->/intranet-tmpl/prog/img/patron-blank.png" alt="<!-- TMPL_VAR name="firstname" --> <!-- TMPL_VAR name="surname" --> (<!-- TMPL_VAR NAME="cardnumber" -->)" border="0" style="margin: .3em 0 .3em .3em; padding: .2em; border: 1px solid #CCCCCC;" /></li> +<!-- /TMPL_IF --> +</ol> +</fieldset> +<!-- /TMPL_IF --> +<!-- /TMPL_IF --> + <fieldset class="brief"> <legend>Permanent Address</legend> <ol> diff --git a/opac/opac-userupdate.pl b/opac/opac-userupdate.pl index 8664316..06a15d6 100755 --- a/opac/opac-userupdate.pl +++ b/opac/opac-userupdate.pl @@ -174,4 +174,10 @@ $template->param( userupdateview => 1, ); +if (C4::Context->preference('staffClientBaseURL')){ + $template->param( intraneturl => C4::Context->preference('staffClientBaseURL') ); + my ($picture, $dberror) = GetPatronImage($borr->{'cardnumber'}); + $template->param( picture => 1 ) if $picture; +} + output_html_with_http_headers $query, $cookie, $template->output; -- 1.5.6.5