Second installment on Patron Images fixes
authorChris Nighswonger <cnighswonger@foundations.edu>
Sat, 2 Feb 2008 05:23:45 +0000 (23:23 -0600)
committerJoshua Ferraro <jmf@liblime.com>
Sun, 3 Feb 2008 13:24:01 +0000 (07:24 -0600)
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
koha-tmpl/intranet-tmpl/prog/en/modules/help/members/moremember.tmpl
koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tmpl
members/moremember.pl

index ee153ef..5bc777f 100644 (file)
@@ -13,5 +13,5 @@
 appear, so don't worry about accidentally deleting a record. Just be absolutely sure before you delete!</p>
 <p>The change password button allows a user to either set a new password or change their current password. This is useful to patrons that wish to place reserves online from home. You cannot see a password again once you change it, but you can reset a password.</p>
 <p>Modify user flags allows an administrator to set which clerks, librarians, patrons, technical support people or trustees have access to certain parts of the database. Right now, one can either have permission to access everything on the Intranet side, or just have access to the OPAC.</p>
-
-<!-- TMPL_INCLUDE name="help-bottom.inc" -->
\ No newline at end of file
+<p>If no patron image exists for this patron, click the "Add Patron Images" link to add an image or images. You should be aware that the Details page will display the image at 25% of the original pixel dimensions. Keep this in mind when obtaining patron images as it will affect how the images appear on this page.</p>
+<!-- TMPL_INCLUDE name="help-bottom.inc" -->
index 8f23698..932c3ef 100644 (file)
@@ -193,7 +193,18 @@ for (var i=0;i<ItemsNodes.length;i++){
                        <!-- /TMPL_IF --></div>
 
 
-</div>    
+</div>
+<div id="patron-image" style="padding: 0.5em;">
+    <h3>Patron Image</h3>
+    <!-- TMPL_IF name="picture" -->
+       <img src="<!-- TMPL_VAR NAME="picture" -->" width="25%" height="25%" alt="Patron Picture">
+    <!-- TMPL_ELSE -->
+        <li>There is no picture available for this patron.</li>
+        <div class="action">
+            <a href="picture-upload.pl">Add Patron Images</a>
+        </div>
+    <!-- /TMPL_IF -->
+</div>
 </div>
  <div class="yui-u"> 
  <div id="patron-library-details">
index 94d5668..f0f3b01 100755 (executable)
@@ -326,9 +326,9 @@ foreach (@$alerts) {
 }
 my $picture;
 my $htdocs = C4::Context->config('intrahtdocs');
-$picture = "/borrowerimages/" . $borrowernumber . ".jpg";
-if ( -e $htdocs . "$picture" ) {
-    $template->param( picture => $picture );
+$picture = "patronimages/" . $data->{'cardnumber'} . ".jpg";
+if ( -e "$htdocs/$picture" ) {
+    $template->param( picture => "/intranet-tmpl/$picture" );   # FIXME: This is a real hack and should be handled better, but I'm in a hurry... -fbcit
 }
 my $branch=C4::Context->userenv->{'branch'};