INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('OPACFinesTab','1','If OFF the patron fines tab in the OPAC is disabled.','','YesNo');
INSERT INTO systempreferences (variable,value,options,explanation,type)VALUES('DisplayOPACiconsXSLT', '1', '', 'If ON, displays the format, audience, type icons in XSLT MARC21 results and display pages.', 'YesNo');
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('AllowAllMessageDeletion','0','Allow any Library to delete any message','','YesNo');
+INSERT INTO systempreferences (variable,value,explanation,options,type)VALUES('ShowPatronImageInWebBasedSelfCheck', '0', 'If ON, displays patron image when a patron uses web-based self-checkout', '', 'YesNo');
INSERT INTO systempreferences (variable,value,options,explanation,type)VALUES('HidePatronName', '0', '', 'Active l''affichage du numéro des adhérents à la place de leur nom dans les pages de réservation et du catalogue.', 'YesNo');
INSERT INTO systempreferences (variable,value,options,explanation,type)VALUES('DisplayOPACiconsXSLT', '1', '', 'Si activé, affiche le format, le type de public et les icônes de type en XSLT (MARC21)).', 'YesNo');
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('AllowAllMessageDeletion','0','Allow any Library to delete any message','','YesNo');
+INSERT INTO systempreferences (variable,value,explanation,options,type)VALUES('ShowPatronImageInWebBasedSelfCheck', '0', 'Si activé, affiche la photo de l''adhérent lors de l''utilisation de la console de prêt auto-contrôlé', '', 'YesNo');
<!-- TMPL_IF NAME="patronid" -->
<!-- TMPL_IF NAME="validuser" -->
<h3 class="warning">You are logged in as <!-- TMPL_VAR NAME="borrowername" -->.</h3>
+ <!-- TMPL_IF NAME="display_patron_image" -->
+ <img src="/cgi-bin/koha/sco/sco-patron-image.pl?cardnumber=<!-- TMPL_VAR NAME="cardnumber" -->" alt="" />
+ <!-- /TMPL_IF -->
<!-- /TMPL_IF -->
</div>
<!-- TMPL_IF NAME="nouser" -->
inputfocus => $inputfocus,
nofines => 1,
);
+ if (C4::Context->preference('ShowPatronImageInWebBasedSelfCheck')) {
+ my ($image, $dberror) = GetPatronImage($borrower->{cardnumber});
+ if ($image) {
+ $template->param(
+ display_patron_image => 1,
+ cardnumber => $borrower->{cardnumber},
+ );
+ }
+ }
} else {
$template->param(
patronid => $patronid,
--- /dev/null
+#!/usr/bin/perl
+#
+# Copyright 2009 LibLime
+#
+# This file is part of Koha.
+#
+# Koha is free software; you can redistribute it and/or modify it under the
+# terms of the GNU General Public License as published by the Free Software
+# Foundation; either version 2 of the License, or (at your option) any later
+# version.
+#
+# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+# A PARTICULAR PURPOSE. See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
+# Suite 330, Boston, MA 02111-1307 USA
+
+use strict;
+use warnings;
+use C4::Service;
+use C4::Members;
+
+my ($query, $response) = C4::Service->init(circulate => 'circulate_remaining_permissions');
+my ($cardnumber) = C4::Service->require_params('cardnumber');
+
+my ($imagedata, $dberror) = GetPatronImage($cardnumber);
+
+if ($dberror) {
+ print $query->header(status => '500 internal error');
+}
+
+if ($imagedata) {
+ print $query->header(-type => $imagedata->{'mimetype'},
+ -'Cache-Control' => 'no-store',
+ -Content_Length => length ($imagedata->{'imagefile'})),
+ $imagedata->{'imagefile'};
+} else {
+ print $query->header(status => '404 patron image not found');
+}