| Lines 1-87
          
      
      
        Link Here | 
          
            
              | 1 | [% INCLUDE 'doc-head-open.inc' %] | 1 | [% INCLUDE 'help-top.inc' %] | 
            
              | 2 | <title>Koha › Circulation › Offline circulation file upload</title> |  |  | 
            
              | 3 | [% INCLUDE 'doc-head-close.inc' %] | 
            
              | 4 | [% INCLUDE 'file-upload.inc' %] | 
            
              | 5 | [% INCLUDE 'background-job.inc' %] | 
            
              | 6 | <script type="text/javascript"> | 
            
              | 7 | //<![CDATA[ | 
            
              | 8 | $(document).ready(function(){ | 
            
              | 9 | 	$("#processfile").hide(); | 
            
              | 10 | }); | 
            
              | 11 | function CheckUpload(f){ | 
            
              | 12 | 	if(f.fileToUpload.value == ""){ | 
            
              | 13 | 		alert(_("Please choose a file to upload")); | 
            
              | 14 | 	} else { | 
            
              | 15 | 		return ajaxFileUpload() | 
            
              | 16 | 	} | 
            
              | 17 | 		return false; | 
            
              | 18 | } | 
            
              | 19 | function CheckForm(f) { | 
            
              | 20 |     if (f.uploadedfileid.value == '') { | 
            
              | 21 |         alert(_('Please upload a file first.')); | 
            
              | 22 |     } else { | 
            
              | 23 | 		$("#fileuploadstatus").hide(); | 
            
              | 24 | 		$("#fileuploadform").slideUp(); | 
            
              | 25 |         return submitBackgroundJob(f); | 
            
              | 26 |     } | 
            
              | 27 |     return false; | 
            
              | 28 | } | 
        
          | 29 |  | 2 |  | 
          
            
              | 30 | //]]> | 3 | <h1>Offline Circulation File (.koc) Uploader</h1> | 
            
              | 31 | </script> |  |  | 
            
              | 32 | <style type="text/css"> | 
            
              | 33 | 	#fileuploadstatus,#jobstatus { margin:.4em; } | 
            
              | 34 | 	#fileuploadprogress,#jobprogress{ width:200px;height:10px;border:1px solid #666;background:url('/intranet-tmpl/prog/img/progress.png') -300px 0px no-repeat; } | 
            
              | 35 | </style> | 
            
              | 36 | </head> | 
            
              | 37 | <body id="ocirc_process_koc" class="circ ocirc"> | 
            
              | 38 | [% INCLUDE 'header.inc' %] | 
            
              | 39 | [% INCLUDE 'circ-search.inc' %] | 
        
          | 40 |  | 4 |  | 
          
            
              | 41 | <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> | 5 | <p>The offline circulation tool for Windows will generate a KOC file that you can upload into Koha once your system comes back up.</p> | 
        
          | 42 |  | 6 |  | 
          
            
              | 43 | <div id="doc" class="yui-t7"> | 7 | <p>Browse your computer for the *.koc file</p> | 
        
          | 44 |  | 8 |  | 
          
            
              | 45 |    <div id="bd"> | 9 | <p>Once the file is uploaded, click the process the file</p> | 
        
          | 46 |  | 10 |  | 
          
            
              | 47 | [% IF ( transactions_loaded ) %] | 11 | <p>When this is complete you'll see the summary of actions from when you were offline (including any errors).</p> | 
            
              | 48 |   <h2>Koha offline circulation</h2> |  |  | 
            
              | 49 |   <p>Your data was processed. Here are the results:</p> | 
            
              | 50 |   [% FOREACH message IN messages %] | 
            
              | 51 |     [% IF ( message.message ) %] | 
            
              | 52 | 	<div class="dialog alert"> | 
            
              | 53 | 		[% 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 %] | 
            
              | 54 | 	</div> | 
            
              | 55 | 	[% END %] | 
            
              | 56 | 	[% IF ( message.ERROR_no_borrower_from_item ) %]<p>Warning: Unable to determine patron from item barcode ([% message.badbarcode %]). Cannot check in.</p>[% END %] | 
            
              | 57 | 	[% 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 %] | 
            
              | 58 | 	[% 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 %] | 
            
              | 59 | 	[% 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 %] | 
            
              | 60 | 	[% 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 %] | 
            
              | 61 |   [% END %] | 
            
              | 62 | [% ELSE %] | 
            
              | 63 |   <h2>Upload offline circulation data</h2> | 
            
              | 64 |    <div id="fileuploadform"> | 
            
              | 65 |      <form method="post" action="[% SCRIPT_NAME %]" enctype="multipart/form-data"> | 
            
              | 66 | 		<fieldset class="brief"> | 
            
              | 67 |        <ol><li><label for="fileToUpload">Choose .koc file: </label> | 
            
              | 68 |        <input type="file" id="fileToUpload" size="50" name="fileToUpload" /></li></ol> | 
            
              | 69 | 	   <fieldset class="action"><input type="button" class="submit" value="Upload file" onclick="CheckUpload(this.form);" /></fieldset> | 
            
              | 70 | 	   </fieldset> | 
            
              | 71 |      </form> | 
            
              | 72 |      <div id="fileuploadstatus" style="display:none">Upload progress: <div id="fileuploadprogress"></div> <span id="fileuploadpercent">0</span>%</div> | 
            
              | 73 |      <div id="fileuploadfailed" style="display:none"></div> | 
            
              | 74 |    </div> | 
            
              | 75 |    <form action="process_koc.pl" id="processfile" method="post" enctype="multipart/form-data"> | 
            
              | 76 |      <input type="hidden" name="uploadedfileid" id="uploadedfileid" value="" /> | 
            
              | 77 |      <input type="hidden" name="runinbackground" id="runinbackground" value="" /> | 
            
              | 78 |      <input type="hidden" name="completedJobID" id="completedJobID" value="" /> | 
            
              | 79 |      <input type="submit" value="Process offline circulation file" onclick="return CheckForm(this.form);" id="mainformsubmit" /> | 
            
              | 80 |      <div id="jobstatus" style="display:none">Job progress: <div id="jobprogress"></div> <span id="jobprogresspercent">0</span>%</div> | 
            
              | 81 |      <div id="jobfailed" style="display:none"></div> | 
            
              | 82 |    </form> | 
            
              | 83 | [% END %] | 
        
          | 84 |  | 12 |  | 
            
              |  |  | 13 | <p><strong>See the full documentation for the Offline Circulation File Uploader in the <a href="http://manual.koha-community.org/3.8/en/offlinecirc.html">manual</a> (online).</strong></p> | 
        
          | 85 |  | 14 |  | 
          
            
              | 86 | </div> | 15 | [% INCLUDE 'help-bottom.inc' %] | 
            
              | 87 | [% INCLUDE 'intranet-bottom.inc' %] |  |  | 
            
              | 88 | -  |  |  |