Koha/koha-tmpl/intranet-tmpl/prog/en/modules/offline_circ/process_koc.tt
Owen Leonard fe22e14775
Bug 33917: Improve translation of title tags: Offline circulation and patron lists
This patch updates offline circulation and patron lists templates so
that title tags can be more easily translated.

To test, apply the patch and confirm that the following pages have the
correct title tags:

- Circulation -> Upload offline circulation file
  - Add to queue
  - View pending offline circulations
- Tools -> Patron lists
  - New list, edit list
  - View list

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-09-01 11:23:29 -03:00

164 lines
7.7 KiB
Text

[% USE raw %]
[% USE Asset %]
[% PROCESS 'i18n.inc' %]
[% SET footerjs = 1 %]
[% INCLUDE 'doc-head-open.inc' %]
<title>[% FILTER collapse %]
[% t("Offline circulation file upload") | html %] &rsaquo;
[% t("Circulation") | html %] &rsaquo;
[% t("Koha") | html %]
[% END %]</title>
[% INCLUDE 'doc-head-close.inc' %]
</head>
<body id="ocirc_process_koc" class="circ ocirc">
[% WRAPPER 'header.inc' %]
[% INCLUDE 'circ-search.inc' %]
[% END %]
[% WRAPPER 'sub-header.inc' %]
<nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumb">
<ol>
<li>
<a href="/cgi-bin/koha/mainpage.pl">Home</a>
</li>
<li>
<a href="/cgi-bin/koha/circ/circulation-home.pl">Circulation</a>
</li>
[% IF ( transactions_loaded ) %]
<li>
<a href="/cgi-bin/koha/offline_circ/process_koc.pl">Offline circulation file upload</a>
</li>
<li>
<a href="#" aria-current="page">
Results
</a>
</li>
[% ELSE %]
<li>
<a href="#" aria-current="page">
Offline circulation file upload
</a>
</li>
[% END %]
</ol>
</nav>
[% END %]
<div class="main container-fluid">
<div class="row">
<div class="col-md-10 col-md-offset-1 col-lg-8 col-lg-offset-2">
[% IF ( transactions_loaded ) %]
<h1>Koha offline circulation</h1>
<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 | html %], but I only know how to import version [% message.current_version | html %]. 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 | html %]). Cannot check in.</p>[% END %]
[% IF ( message.issue ) %]<p>Checked out <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% message.biblionumber | uri %]">[% message.title | html %]</a> ([% message.barcode | html %]) to <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% message.borrowernumber | html %]">[% message.firstname | html %] [% message.surname | html %]</a> ([% message.cardnumber | html %]): [% message.datetime | html %]</p>[% END %]
[% IF ( message.renew ) %]<p>Renewed <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% message.biblionumber | uri %]">[% message.title | html %]</a> ([% message.barcode | html %]) for <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% message.borrowernumber | html %]">[% message.firstname | html %] [% message.surname | html %]</a> ([% message.cardnumber | html %]): [% message.datetime | html %]</p>[% END %]
[% IF ( message.return ) %]<p>Checked in <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% message.biblionumber | uri %]">[% message.title | html %]</a> ([% message.barcode | html %]) from <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% message.borrowernumber | html %]">[% message.firstname | html %] [% message.surname | html %]</a> ([% message.cardnumber | html %]): [% message.datetime | html %]</p>[% END %]
[% IF ( message.payment ) %]<p>Accepted payment ([% message.amount | html %]) from <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% message.borrowernumber | uri %]">[% message.firstname | html %] [% message.surname | html %]</a> ([% message.cardnumber | html %]): [% message.datetime | html %]</p>[% END %]
[% END %]
[% ELSE %]
<h1>Upload offline circulation data</h1>
<div id="fileuploadform">
<form method="post" action="/cgi-bin/koha/offline_circ/process_koc.pl" enctype="multipart/form-data" class="validated">
<fieldset class="brief">
<ol><li><label for="fileToUpload">Choose .koc file: </label>
<input class="required" required="required" type="file" id="fileToUpload" size="50" name="fileToUpload" />
<span class="required">Required</span>
</li></ol>
</fieldset>
<fieldset class="action">
<input type="button" class="btn btn-primary" value="Upload file" id="upload_file" />
</fieldset>
</form>
<div id="fileuploadstatus" class="progress_panel" style="display:none">Upload progress: <progress id="fileuploadprogress" max="100" value="0"></progress> <span class="fileuploadpercent">0</span>%</div>
<div id="fileuploadfailed" style="display:none"></div>
</div>
<form action="enqueue_koc.pl" id="processfile" method="post" enctype="multipart/form-data">
<input type="hidden" name="uploadedfileid" id="uploadedfileid" value="" />
<input type="hidden" name="action" value="add_to_queue" />
<input type="submit" value="Add to offline circulation queue" id="queueformsubmit" />
</form>
<form action="process_koc.pl" id="enqueuefile" method="post" enctype="multipart/form-data">
<input type="hidden" name="uploadedfileid" id="uploadedfileid" value="" />
<!-- <input type="submit" value="Apply directly" id="mainformsubmit" /> -->
</form>
[% END %]
</div>
</div>
[% MACRO jsinclude BLOCK %]
[% Asset.js("js/file-upload.js") | $raw %]
<script>
var xhr;
$(document).ready(function(){
$("#enqueuefile").hide();
$("#processfile").hide();
$("#upload_file").on("click",function(){
StartUpload();
});
$("#queueformsubmit").on("click",function(){
var processfile = document.getElementById("processfile");
return CheckForm( processfile );
});
$("#mainformsubmit").on("click",function(){
var enqueuefile = document.getElementById("enqueuefile");
return CheckForm( enqueuefile );
});
});
function StartUpload() {
if( $('#fileToUpload').prop('files').length == 0 ) return;
$('#fileuploadform input.submit').prop('disabled',true);
$("#fileuploadfailed").hide();
$("#processfile").hide();
$("#fileuploadstatus").show();
$("form#processfile #uploadedfileid").val('');
$("form#enqueuefile #uploadedfileid").val('');
xhr = AjaxUpload( $('#fileToUpload'), $('#fileuploadprogress'), 'temp=1', cbUpload );
}
function cbUpload( status, fileid, errors ) {
if( status=='done' ) {
$("form#processfile #uploadedfileid").val( fileid );
$("form#enqueuefile #uploadedfileid").val( fileid );
$('#fileToUpload').prop('disabled',true);
$("#processfile").show();
$("#enqueuefile").show();
} else {
var errMsgs = [ _("Error code 0 not used"), _("File already exists"), _("Directory is not writeable"), _("Root directory for uploads not defined"), _("Temporary directory for uploads not defined") ];
var errCode = errors[$('#fileToUpload').prop('files')[0].name].code;
$("#fileuploadstatus").hide();
$("#fileuploadfailed").show();
$("#fileuploadfailed").text( _("Upload status: ") +
( status=='failed'? _("Failed") + " - (" + errCode + ") " + errMsgs[errCode]:
( status=='denied'? _("Denied"): status ))
);
}
}
function CheckForm(f) {
if (f.uploadedfileid.value == '') {
alert(_("Please upload a file first."));
} else {
return f.submit();
}
return false;
}
</script>
[% END %]
[% INCLUDE 'intranet-bottom.inc' %]