Koha/koha-tmpl/intranet-tmpl/prog/en/modules/tools/picture-upload.tt
Katrin Fischer 3213b34082 [SIGNED-OFF]Bug 2780 - Capitalize strings consistently (tools)
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
This patch also fixes some strings:
* itemcallnumber => item call number
* Profile marcfields=> Profile MARC fields
2012-04-10 10:18:54 +02:00

129 lines
7 KiB
Text

[% INCLUDE 'doc-head-open.inc' %]
<title>Koha &rsaquo; Tools &rsaquo; Upload patron images</title>
[% INCLUDE 'doc-head-close.inc' %]
<script type="text/javascript">
$(document).ready(function() {
$("#zipfile").click(function(){
$("#cardnum").hide();
});
$("#image").click(function(){
$("#cardnum").show();
});
});
</script>
</head>
<body id="tools_picture-upload" class="tools">
[% INCLUDE 'header.inc' %]
[% INCLUDE 'patron-search.inc' %]
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> &rsaquo; Upload patron images </div>
<div id="doc3" class="yui-t2">
<div id="bd">
<div id="yui-main">
[% IF ( TOTAL ) %]
<div class="yui-b">
<div class="yui-g">
<div class="yui-u first">
[% IF ( ERRORS ) %]
[% IF ( TCOUNTS ) %]
<div class="dialog alert">
<h3>Patron Image(s) Uploaded with some errors</h3>
[% ELSE %]
<div class="dialog alert">
<h3>Patron image failed to upload</h3>
[% END %]
[% ELSE %]
<div class="dialog message">
<h3>Patron image(s) successfully uploaded</h3>
[% END %]
<ul class="data">
<li>Unpacking completed</li>
<li>[% TOTAL %] directories scanned.</li>
<li>[% HANDLED %] directories processed.</li>
</ul>
[% FOREACH COUNT IN COUNTS %]
<ul class="data">
[% IF ( COUNT.TCOUNTS ) %]<li>[% COUNT.TCOUNTS %] image(s) moved into the database:</li>[% END %]
[% FOREACH filename IN COUNT.filenames %]
<li>[% filename.source %] - Cardnumber: [% filename.cardnumber %]
[% IF ( filename.filerrors ) %]<br /> <b>WARNING:</b> This image <i>not</i> imported because
[% FOREACH filerror IN filename.filerrors %]
[% IF ( filerror.DBERR ) %]the database returned an error. Please refer to the error log for more details.</li>
[% ELSIF ( filerror.IMGEXISTS ) %]this patron does not exist in the database.</li>
[% ELSIF ( filerror.MIMERR ) %]the image format is unrecognized.</li>
[% ELSIF ( filerror.CORERR ) %]the image file is corrupted.</li>
[% ELSIF ( filerror.OPNERR ) %]Koha was unable to open the image for reading.</li>
[% ELSIF ( filerror.OVRSIZ ) %]the image file is too big.</li>
[% ELSIF ( filerror.CRDFIL ) %]the [% filerror.CRDFIL %] is missing.</li>
[% ELSE %]of an unknown error. Please refer to the error log for more details.</li>[% END %]
[% END %]
[% ELSE %] imported successfully.</li>
[% END %]
[% END %]
</ul>
[% END %]
</div>
[% IF ( borrowernumber ) %]
<a id="member" href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber %]">Return to patron detail</a>
[% ELSE %]
<a id="uploadmore" href="/cgi-bin/koha/tools/picture-upload.pl">Upload more images</a>
<a id="doneupload" href="/cgi-bin/koha/tools/tools-home.pl">Return to tools</a>
[% END %]
</div>
[% ELSE %]
<div class="yui-b">
<div class="yui-g">
<div class="yui-u first">
<h1>Upload patron images</h1>
[% IF ( ERRORS ) %]
<div class="dialog alert">
[% FOREACH ERROR IN ERRORS %]
[% IF ( ERROR.NOTZIP ) %]<li><b>The upload file does not appear to be a zip file. The extension is not '.zip'.</b></li>
[% ELSIF ( ERROR.NOWRITETEMP ) %]<li><b>This script is not able to create/write to the necessary temporary directory.</b></li>
[% ELSIF ( ERROR.EMPTYUPLOAD ) %]<li><b>The upload file appears to be empty.</b></li>
[% ELSIF ( ERROR.OPNLINK ) %]<li><b>Cannot open [% ERROR.OPNLINK %] to read.<br />Please verify that it exists.</b></li>
[% ELSIF ( ERROR.OPNIMG ) %]<li><b>Cannot open [% ERROR.OPNIMG %] to read.<br />Please verify that it exists.</b></li>
[% ELSIF ( ERROR.DELERR ) %]<li><b>Unrecognized or missing field delimiter.<br />Please verify that you are using either a single quote or a tab.</b></li>
[% ELSIF ( ERROR.UZIPFAIL ) %]<li><b>[% ERROR.UZIPFAIL %] failed to unpack.<br />Please verify the integrity of the ZIP file and retry.</b></li>
[% ELSE %]<li><b>[% ERROR.CORERR %] An unknown error has occurred.<br />Please review the error log for more details.</b></li>[% END %]
[% END %]
</div>
[% END %]
<form method="post" action="/cgi-bin/koha/tools/picture-upload.pl" enctype="multipart/form-data">
<fieldset class="brief">
<div class="hint"><b>NOTE:</b> Only PNG, GIF, JPEG, XPM formats are supported.</div>
<ol class="radio">
<li class="radio">
<label for="zipfile"><input type="radio" id="zipfile" name="filetype" value="zip" checked="checked" /> zip file</label></li>
<li>
<label for="image">
[% IF ( filetype == 'image' ) %]<input type="radio" id="image" name="filetype" value="image" checked="checked" />[% ELSE %]<input type="radio" id="image" name="filetype" value="image" />[% END %]
image file</label>
<ol>
<li>
<label for="uploadfile">Select the file to upload: </label><input type="file" id="uploadfile" name="uploadfile" />
[% IF ( filetype == 'image' ) %]<span id="cardnum">[% ELSE %]<span id="cardnum" style="display: none">[% END %]<label for="cardnumber">Enter patron cardnumber: </label><input type="text" id="cardnumber" name="cardnumber" value="[% cardnumber %]" size="15" /></span>
</li>
</ol>
</li></ol>
</fieldset>
<fieldset class="action">
<input type="hidden" name="op" value="Upload" />
<input type="submit" value="Upload" class="submit" />
<a href="/cgi-bin/koha/tools/tools-home.pl" class="cancel">Cancel</a>
</fieldset>
</form>
</div>
[% END %]
</div>
</div>
</div>
<div class="yui-b noprint">
[% INCLUDE 'tools-menu.inc' %]
</div>
</div>
[% INCLUDE 'intranet-bottom.inc' %]