b9f4a8cac6
Check for div 0 when calculating percentage Signed-off-by: Liz Rea <wizzyrea@gmail.com> div0 no longer appears on 0 size jobs. Passes t xt Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
87 lines
5 KiB
Text
87 lines
5 KiB
Text
[% INCLUDE 'doc-head-open.inc' %]
|
|
<title>Koha › Circulation › Offline circulation file upload</title>
|
|
[% INCLUDE 'doc-head-close.inc' %]
|
|
[% INCLUDE 'file-upload.inc' %]
|
|
<script type="text/javascript" src="[% themelang %]/js/background-job-progressbar.js"></script>
|
|
<script type="text/javascript">
|
|
//<![CDATA[
|
|
$(document).ready(function(){
|
|
$("#processfile").hide();
|
|
});
|
|
function CheckUpload(f){
|
|
if(f.fileToUpload.value == ""){
|
|
alert(_("Please choose a file to upload"));
|
|
} else {
|
|
return ajaxFileUpload()
|
|
}
|
|
return false;
|
|
}
|
|
function CheckForm(f) {
|
|
if (f.uploadedfileid.value == '') {
|
|
alert(_('Please upload a file first.'));
|
|
} else {
|
|
$("#fileuploadstatus").hide();
|
|
$("#fileuploadform").slideUp();
|
|
return submitBackgroundJob(f);
|
|
}
|
|
return false;
|
|
}
|
|
|
|
//]]>
|
|
</script>
|
|
<style type="text/css">
|
|
#fileuploadstatus,#jobstatus { margin:.4em; }
|
|
#fileuploadprogress,#jobprogress{ width:200px;height:10px;border:1px solid #666;background:url('/intranet-tmpl/prog/img/progress.png') -300px 0px no-repeat; }
|
|
</style>
|
|
</head>
|
|
<body id="ocirc_process_koc" class="circ ocirc">
|
|
[% INCLUDE 'header.inc' %]
|
|
[% INCLUDE 'circ-search.inc' %]
|
|
|
|
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/circ/circulation-home.pl">Circulation</a> › [% IF ( transactions_loaded ) %] <a href="/cgi-bin/koha/offline_circ/process_koc.pl">Offline circulation file upload</a> › Results[% ELSE %] Offline circulation file upload[% END %]</div>
|
|
|
|
<div id="doc" class="yui-t7">
|
|
|
|
<div id="bd">
|
|
|
|
[% IF ( transactions_loaded ) %]
|
|
<h2>Koha offline circulation</h2>
|
|
<p>Your data was processed. Here are the results:</p>
|
|
[% FOREACH message IN messages %]
|
|
[% IF ( message.message ) %]
|
|
<div class="dialog alert">
|
|
[% IF ( message.ERROR_file_version ) %]<p>Warning: This file is version [% message.upload_version %], but I only know how to import version [% message.current_version %]. I'll try my best.</p>[% END %]
|
|
</div>
|
|
[% END %]
|
|
[% IF ( message.ERROR_no_borrower_from_item ) %]<p>Warning: Unable to determine patron from item barcode ([% message.badbarcode %]). Cannot check in.</p>[% END %]
|
|
[% IF ( message.issue ) %]<p>Checked out <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% message.biblionumber %]">[% message.title |html %]</a> ([% message.barcode %]) to <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% message.borrowernumber %]">[% message.firstname %] [% message.surname %]</a> ([% message.cardnumber %]): [% message.datetime %]</p>[% END %]
|
|
[% IF ( message.renew ) %]<p>Renewed <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% message.biblionumber %]">[% message.title |html %]</a> ([% message.barcode %]) for <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% message.borrowernumber %]">[% message.firstname %] [% message.surname %]</a> ([% message.cardnumber %]): [% message.datetime %]</p>[% END %]
|
|
[% IF ( message.return ) %]<p>Checked in <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% message.biblionumber %]">[% message.title |html %]</a> ([% message.barcode %]) from <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% message.borrowernumber %]">[% message.firstname %] [% message.surname %]</a> ([% message.cardnumber %]): [% message.datetime %]</p>[% END %]
|
|
[% IF ( message.payment ) %]<p>Accepted payment ([% message.amount %]) from <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% message.borrowernumber %]">[% message.firstname %] [% message.surname %]</a> ([% message.cardnumber %]): [% message.datetime %]</p>[% END %]
|
|
[% END %]
|
|
[% ELSE %]
|
|
<h2>Upload offline circulation data</h2>
|
|
<div id="fileuploadform">
|
|
<form method="post" action="[% SCRIPT_NAME %]" enctype="multipart/form-data">
|
|
<fieldset class="brief">
|
|
<ol><li><label for="fileToUpload">Choose .koc file: </label>
|
|
<input type="file" id="fileToUpload" size="50" name="fileToUpload" /></li></ol>
|
|
<fieldset class="action"><input type="button" class="submit" value="Upload file" onclick="CheckUpload(this.form);" /></fieldset>
|
|
</fieldset>
|
|
</form>
|
|
<div id="fileuploadstatus" style="display:none">Upload progress: <div id="fileuploadprogress"></div> <span id="fileuploadpercent">0</span>%</div>
|
|
<div id="fileuploadfailed" style="display:none"></div>
|
|
</div>
|
|
<form action="process_koc.pl" id="processfile" method="post" enctype="multipart/form-data">
|
|
<input type="hidden" name="uploadedfileid" id="uploadedfileid" value="" />
|
|
<input type="hidden" name="runinbackground" id="runinbackground" value="" />
|
|
<input type="hidden" name="completedJobID" id="completedJobID" value="" />
|
|
<input type="submit" value="Process offline circulation file" onclick="return CheckForm(this.form);" id="mainformsubmit" />
|
|
<div id="jobstatus" style="display:none">Job progress: <div id="jobprogress"></div> <span id="jobprogresspercent">0</span>%</div>
|
|
<div id="jobfailed" style="display:none"></div>
|
|
</form>
|
|
[% END %]
|
|
|
|
|
|
</div>
|
|
[% INCLUDE 'intranet-bottom.inc' %]
|