From f704201dde1425901bb96e092eaddd53f606c01d Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Mon, 26 Nov 2012 08:41:57 -0500 Subject: [PATCH] Bug 9310 - Patron image upload template corrections This patch fixes some template structure problems and makes some improvements: - Correct grid structure so that page isn't narrower than it needs to be. - Move image upload messages out of message/error dialog and into table so that lines are distinct and legible. - Expand breadcrumbs specificity - Capitalization corrections To test: Upload patron images using both single images and zip files. Test zip file upload with a file which contains valid and invalid contents (non-existant patron numbers, invalid image files, etc). In all cases image uploads should work correctly and errors should be legibly displayed. Signed-off-by: Marc Veron With patch, error messages are displayed in a nice table. Signed-off-by: Jonathan Druart Tested with zip and png files. Works great. Signed-off-by: Jared Camins-Esakov Signed-off-by: Chris Cormack --- .../prog/en/modules/tools/picture-upload.tt | 67 ++++++++++--------- 1 file changed, 37 insertions(+), 30 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/picture-upload.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/picture-upload.tt index 51a78c56e5..ef22fe121d 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/picture-upload.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/picture-upload.tt @@ -17,26 +17,27 @@ [% INCLUDE 'header.inc' %] [% INCLUDE 'patron-search.inc' %] - +
[% IF ( TOTAL ) %]
-
-
[% IF ( ERRORS ) %] [% IF ( TCOUNTS ) %]
-

Patron Image(s) Uploaded with some errors

+

Patron image(s) uploaded with some errors

+
[% ELSE %]

Patron image failed to upload

+
[% END %] [% ELSE %]

Patron image(s) successfully uploaded

+
[% END %]
  • Unpacking completed
  • @@ -45,41 +46,49 @@
[% FOREACH COUNT IN COUNTS %] -
    +
    + + + + + + [% IF ( COUNT.TCOUNTS ) %]
  • [% COUNT.TCOUNTS %] image(s) moved into the database:
  • [% END %] [% FOREACH filename IN COUNT.filenames %] -
  • [% filename.source %] - Cardnumber: [% filename.cardnumber %] - [% IF ( filename.filerrors ) %] +
  • + + + + [% END %] - + +
    Results
    File nameCard numberResult
    [% filename.source %][% filename.cardnumber %] + [% IF ( filename.filerrors ) %] [% FOREACH filerror IN filename.filerrors %] - [% IF ( filerror.DBERR ) %]
    ERROR: Image not imported because the database returned an error. Please refer to the error log for more details. - [% ELSIF ( filerror.IMGEXISTS ) %]
    ERROR: Image not imported because this patron does not exist in the database. - [% ELSIF ( filerror.MIMERR ) %]
    ERROR: Image not imported because the image format is unrecognized. - [% ELSIF ( filerror.CORERR ) %]
    ERROR: Image not imported because the image file is corrupted. - [% ELSIF ( filerror.OPNERR ) %]
    ERROR: Image not imported because Koha was unable to open the image for reading. - [% ELSIF ( filerror.OVRSIZ ) %]
    ERROR: Image not imported because the image file is too big (see online help for maximum size). - [% ELSIF ( filerror.CRDFIL ) %]
    ERROR: Image not imported ([% filerror.CRDFIL %] missing). - [% ELSE %]
    ERROR: Image not imported because of an unknown error. Please refer to the error log for more details. + [% IF ( filerror.DBERR ) %]ERROR: Image not imported because the database returned an error. Please refer to the error log for more details. + [% ELSIF ( filerror.IMGEXISTS ) %]ERROR: Image not imported because this patron does not exist in the database. + [% ELSIF ( filerror.MIMERR ) %]ERROR: Image not imported because the image format is unrecognized. + [% ELSIF ( filerror.CORERR ) %]ERROR: Image not imported because the image file is corrupted. + [% ELSIF ( filerror.OPNERR ) %]ERROR: Image not imported because Koha was unable to open the image for reading. + [% ELSIF ( filerror.OVRSIZ ) %]ERROR: Image not imported because the image file is too big (see online help for maximum size). + [% ELSIF ( filerror.CRDFIL ) %]ERROR: Image not imported ([% filerror.CRDFIL %] missing). + [% ELSE %]ERROR: Image not imported because of an unknown error. Please refer to the error log for more details. [% END %] [% END %] [% ELSE %] imported successfully. - [% END %] - + [% END %]
    +
    [% END %] - -
- [% IF ( borrowernumber ) %] - Return to patron detail - [% ELSE %] - Upload more images - Return to tools - [% END %] +
[% ELSE %]
-
-

Upload patron images

[% IF ( ERRORS ) %]
@@ -122,8 +131,6 @@
[% END %] -
-
[% INCLUDE 'tools-menu.inc' %] -- 2.39.5