Koha/koha-tmpl/intranet-tmpl/prog/en/modules/tools/picture-upload.tt
Lucas Gass 3b273de577 Bug 25744: replace <b> with <strong> in the staff interface
This patch set attempts to replace all the <i> tags with <em> and all
the <b> tags with <strong> in the staff interface.
I attempted to get all the templates, includes, and xslt files.

To test:

1. Review the changes as best as possible, looking for mistakes.
2. grep for <i> and <b> in the modules, includes, and xslt folders. You should get nothing/
3. If you grep '<\/i>' you should only see instances of Font Awesome.
4. If you grep '<\/b>' you should only see instances where caret is used.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-09-18 11:08:35 +02:00

174 lines
9.8 KiB
Text

[% USE raw %]
[% USE Asset %]
[% SET footerjs = 1 %]
[% INCLUDE 'doc-head-open.inc' %]
<title>Koha &rsaquo; Tools &rsaquo; Upload patron images</title>
[% INCLUDE 'doc-head-close.inc' %]
</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; [% IF ( TOTAL ) %]<a href="/cgi-bin/koha/tools/picture-upload.pl">Upload patron images</a> &rsaquo; Results[% ELSE %]Upload patron images[% END %] </div>
[% INCLUDE 'blocking_errors.inc' %]
<div class="main container-fluid">
<div class="row">
<div class="col-sm-10 col-sm-push-2">
<main>
[% IF ( TOTAL ) %]
[% IF ( ERRORS ) %]
[% IF ( TCOUNTS ) %]
<div class="dialog alert">
<h3>Patron image(s) uploaded with some errors</h3>
</div>
[% ELSE %]
<div class="dialog alert">
<h3>Patron image failed to upload</h3>
</div>
[% END %]
[% ELSE %]
<div class="dialog message">
<h3>Patron image(s) successfully uploaded</h3>
</div>
[% END %]
<ul class="data">
<li>Unpacking completed</li>
<li>[% TOTAL | html %] directories scanned.</li>
<li>[% HANDLED | html %] directories processed.</li>
</ul>
[% FOREACH COUNT IN COUNTS %]
<div class="container">
<table>
<caption>Results</caption>
<thead>
<tr><th>File name</th><th>Card number</th><th>Result</th></tr>
</thead>
<tbody>
[% IF ( COUNT.TCOUNTS ) %]<li>[% COUNT.TCOUNTS | html %] image(s) moved into the database:</li>[% END %]
[% FOREACH filename IN COUNT.filenames %]
<tr>
<td>[% filename.source | html %]</td>
<td><a href="/cgi-bin/koha/circ/circulation.pl?findborrower=[% filename.cardnumber | url %]">[% filename.cardnumber | html %]</a></td>
<td>
[% IF ( filename.filerrors ) %]
[% FOREACH filerror IN filename.filerrors %]
[% IF ( filerror.DBERR ) %]<strong>ERROR:</strong> Image not imported because the database returned an error. Please refer to the error log for more details.
[% ELSIF ( filerror.IMGEXISTS ) %]<strong>ERROR:</strong> Image not imported because this patron does not exist in the database.
[% ELSIF ( filerror.MIMERR ) %]<strong>ERROR:</strong> Image not imported because the image format is unrecognized.
[% ELSIF ( filerror.CORERR ) %]<strong>ERROR:</strong> Image not imported because the image file is corrupted.
[% ELSIF ( filerror.OPNERR ) %]<strong>ERROR:</strong> Image not imported because Koha was unable to open the image for reading.
[% ELSIF ( filerror.OVRSIZ ) %]<strong>ERROR:</strong> Image not imported because the image file is too big (see online help for maximum size).
[% ELSIF ( filerror.CRDFIL ) %]<strong>ERROR:</strong> Image not imported ([% filerror.CRDFIL | html %] missing).
[% ELSIF ( filerror.CARDNUMBER_DOES_NOT_EXIST ) %]<strong>ERROR:</strong> Image not imported because this patron does not exist in the database.
[% ELSE %]<strong>ERROR:</strong> Image not imported because of an unknown error. Please refer to the error log for more details.
[% END %]
[% END %]
[% ELSE %] imported successfully.
[% END %]</td>
</tr>
[% END %]
</tbody>
</table>
</div>
[% END %]
<ul>
[% IF ( borrowernumber ) %]
<li><a id="member" href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber | html %]">Return to patron detail</a></li>
[% ELSE %]
<li><a id="uploadmore" href="/cgi-bin/koha/tools/picture-upload.pl">Upload more images</a></li>
<li><a id="doneupload" href="/cgi-bin/koha/tools/tools-home.pl">Return to tools</a></li>
[% END %]</ul>
[% ELSE %]
<h1>Upload patron images</h1>
[% IF ( ERRORS ) %]
<div class="dialog alert">
[% FOREACH ERROR IN ERRORS %]
[% IF ( ERROR.NOTZIP ) %]<li><strong>The upload file does not appear to be a zip file. The extension is not '.zip'.</strong></li>
[% ELSIF ( ERROR.NOWRITETEMP ) %]<li><strong>This script is not able to create/write to the necessary temporary directory.</strong></li>
[% ELSIF ( ERROR.EMPTYUPLOAD ) %]<li><strong>The upload file appears to be empty.</strong></li>
[% ELSIF ( ERROR.OPNLINK ) %]<li><strong>Cannot open [% ERROR.OPNLINK | html %] to read.<br />Please verify that it exists.</strong></li>
[% ELSIF ( ERROR.OPNIMG ) %]<li><strong>Cannot open [% ERROR.OPNIMG | html %] to read.<br />Please verify that it exists.</strong></li>
[% ELSIF ( ERROR.DELERR ) %]<li><strong>Unrecognized or missing field delimiter.<br />Please verify that you are using either a single quote or a tab.</strong></li>
[% ELSIF ( ERROR.UZIPFAIL ) %]<li><strong>[% ERROR.UZIPFAIL | html %] failed to unpack.<br />Please verify the integrity of the ZIP file and retry.</strong></li>
[% ELSE %]<li><strong>[% ERROR.CORERR | html %] An unknown error has occurred.<br />Please review the error log for more details.</strong></li>[% END %]
[% END %]
</div>
[% END %]
<form method="post" action="/cgi-bin/koha/tools/picture-upload.pl" enctype="multipart/form-data" id="upload_form">
<fieldset class="rows">
<p><strong>NOTE:</strong> Only PNG, GIF, JPEG, XPM formats are supported.</p>
<ol class="radio">
<li>
<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>
</li>
[% IF ( filetype == 'image' ) %]
<li id="cardnum">
[% ELSE %]
<li id="cardnum" style="display: none">
[% END %]
<label for="cardnumber">Enter patron cardnumber: </label>
<input type="text" id="cardnumber" name="cardnumber" value="[% cardnumber | html %]" size="15" />
<span class="required">Required</span>
</li>
<li class="required">
<label for="uploadfile">Select the file to upload: </label>
<input type="file" id="uploadfile" name="uploadfile" class="required" required="required" />
<span class="required">Required</span>
</li>
</ol>
</fieldset>
<fieldset class="action">
<input type="hidden" name="csrf_token" value="[% csrf_token | html %]" />
<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>
[% END %]
</main>
</div> <!-- /.col-sm-10.col-sm-push-2 -->
<div class="col-sm-2 col-sm-pull-10">
<aside>
[% INCLUDE 'tools-menu.inc' %]
</aside>
</div> <!-- /.col-sm-2.col-sm-pull-10 -->
</div> <!-- /.row -->
[% MACRO jsinclude BLOCK %]
[% Asset.js("js/tools-menu.js") | $raw %]
[% INCLUDE 'str/members-menu.inc' %]
[% Asset.js("js/members-menu.js") | $raw %]
<script>
$(document).ready(function() {
$("#zipfile").click(function(){
$("#cardnum").hide();
});
$("#image").click(function(){
$("#cardnum").show();
});
$( "#upload_form" ).validate({
rules: {
cardnumber: {
required: {
depends: function(element) {
return $("#image").is(":checked");
}
}
}
}
});
});
</script>
[% END %]
[% INCLUDE 'intranet-bottom.inc' %]