5 [%# Helper template functions %]
6 [% BLOCK error_message %]
7 [% IF messages.BadBarcode %]
8 <span>(Barcode not found on the database, please see library staff for assistance)</span>
9 [% ELSIF messages.Wrongbranch %]
10 <span>(The item cannot be returned at this library, please see library staff for assistance)</span>
11 [% ELSIF messages.withdrawn %]
12 <span>(Item is withdrawn and check-in blocked by policy, please see library staff for assistance)</span>
13 [% ELSIF messages.NotIssued %]
14 <span>(The book is not currently on loan, please see library staff for assistance)</span>
16 <span>(There was a problem returning this item, please see library staff for assistance)</span>
20 [% INCLUDE 'doc-head-open.inc' %]
22 <title>[% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha [% END %] › Self check-in</title>
24 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
25 <meta name="generator" content="Koha [% Version %]" /> <!-- leave this for stats -->
27 [% IF ( Koha.Preference('OpacFavicon') ) %]
28 <link rel="shortcut icon" href="[% Koha.Preference('OpacFavicon') %]" type="image/x-icon" />
30 <link rel="shortcut icon" href="[% interface %]/[% theme %]/images/favicon.ico" type="image/x-icon" />
32 [% Asset.css("lib/bootstrap/css/bootstrap.min.css") %]
33 [% Asset.css("lib/jquery/jquery-ui.css") %]
34 [% Asset.css("lib/font-awesome/css/font-awesome.min.css") %]
35 [% Asset.css("css/sci.css") %]
36 [% IF ( Koha.Preference('OPACUserCSS') ) %]<style type="text/css">[% Koha.Preference('OPACUserCSS') %]</style>[% END %]
37 [% IF ( Koha.Preference('SelfCheckInUserCSS') ) %]<style type="text/css">[% Koha.Preference('SelfCheckInUserCSS') %]</style>[% END %]
39 <script src="[% interface %]/[% theme %]/lib/respond.min.js"></script>
42 function _(s) { return s } // dummy function for gettext
44 [% Asset.js("lib/modernizr.min.js") %]
46 <body id="sci_main" class="sci" onload="dofocus();" onunload="mungeHistory();">
48 [% SET OpacLangSelectorMode = Koha.Preference('OpacLangSelectorMode') %]
50 <div class="navbar navbar-inverse navbar-static-top">
51 <div class="navbar-inner">
52 <div class="container-fluid">
53 <a class="brand" href="/cgi-bin/koha/sci/sci-main.pl"><img src="[% interface %]/[% theme %]/images/koha-logo-navbar.png" alt=""></a>
54 <div id="checkouthelp">
55 <ul class="nav pull-right">
56 <li><a href="/cgi-bin/koha/sci/sci-main.pl" class="helpModal-trigger" role="button" data-toggle="modal"><i class="icon help"></i> Help</a></li>
57 <li><a id="sci_logout" href="/cgi-bin/koha/sci/sci-main.pl?logout.x=1" class="logout">Logout</a></li>
61 [% IF Koha.Preference( 'opaclanguagesdisplay' ) %]
63 <ul class="nav pull-right">
64 [% INCLUDE 'masthead-langmenu.inc' %]
69 </div> <!-- /.container-fluid -->
70 </div> <!-- /.navbar-inner -->
71 </div> <!-- /.navbar -->
73 [% IF Koha.Preference( 'opacheader' ) %]
74 <div class="container-fluid">
75 <div class="row-fluid">
77 [% Koha.Preference( 'opacheader' ) %]
84 <div class="container-fluid">
85 <div class="row-fluid">
87 <h1>[% LibraryName %] Self check-in</h1>
88 [% IF ( nopermission ) %]
89 [%# This is what is displayed if user doesn't have permission %]
91 <h3>Access denied</h3>
92 <p>Sorry, this self check-in station has lost authentication. Please contact the administrator to resolve this problem.</p>
94 [% ELSIF ( different_ip ) %]
95 [%# This is what is displayed if user doesn't have permission %]
98 <p>You are accessing self check-in from a different IP address! Please log in again.</p>
100 [% ELSIF ( checkins ) %]
101 [%# We have results from a check-in attempt %]
102 <div id="checkins" class="sci_results_list">
103 [% IF ( success && success.size > 0 || errors && errors.size > 0 ) %]
105 <table id="sci_bcheckins_table" class="table table-bordered table-striped dataTable no-footer" style="font-size: initial;">
111 [% FOREACH success_line IN success %]
112 <tr><td>[% success_line.barcode %]</td><td>Checked in</td></tr>
114 [% FOREACH error IN errors %]
116 <td>[% error.barcode %]</td>
117 <td>Not checked in [% PROCESS error_message messages=error.messages %]</td>
123 <form method="post" action="#" id="finish_form">
124 <button id="sci_finish_button" type="submit" class="btn"><i class="icon finish"></i> Finish</button>
129 <p>Your request included no check-ins.</p>
134 [%# Prompt for barcodes %]
135 <div id="new_checkins" class="sci_entry">
136 <form id="scan_form" name="scan_form"
137 method="post" action="/cgi-bin/koha/sci/sci-main.pl">
140 <label for="barcode_input">Scan the item or enter its barcode:</label>
141 <input id="barcode_input" name="barcode_input" size="20" type="text" class="focus" autocomplete="off" />
142 <button id="sci_append_button" type="submit" class="btn btn-default btn-sm">
143 <i class="fa fa-plus" aria-hidden="true"></i> <span>Add</span>
146 <div class="sci_input_append">
147 <table id="sci_barcodes_table" class="table table-bordered table-striped dataTable no-footer" style="display: none; font-size: initial;">
149 <th class="barcodes_column">Barcode</th>
155 <input type="hidden" name="op" value="check_in" />
156 <div id="button_bar">
157 <button id="sci_checkin_button" type="submit" class="btn btn-default btn-sm" style="display: none;">
158 <i class="fa fa-check-square-o" aria-hidden="true"></i> <span>Check in</span>
160 <a href="/cgi-bin/koha/sci/sci-main.pl" class="btn btn-default btn-sm" role="button" style="display: none;" id="sci_refresh_button">
161 <i class="fa fa-refresh" aria-hidden="true"></i> <span>Cancel</span>
166 </div> <!-- / #new_checkins -->
168 </div> <!-- / #masthead -->
169 </div> <!-- / .row-fluid -->
170 </div> <!-- / .container-fluid -->
172 [% IF ( Koha.Preference('SelfCheckInMainUserBlock') ) %]
173 <div id="SelfCheckInMainUserBlock">[% Koha.Preference('SelfCheckInMainUserBlock' ) %]</div>
175 </div> <!-- / .main -->
177 <div id="helpModal" class="modal hide" tabindex="-1" role="dialog" aria-labelledby="helpModalLabel" aria-hidden="true">
179 <div class="modal-header">
180 <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button>
181 <h3 id="helpModalLabel">Self check-in help</h3>
184 <div class="modal-body">
186 <li>Scan each item or enter its barcode. A list with the entered barcodes will be displayed.</li>
187 <li>Click the 'Check in' button to confirm.</li>
188 <li>The operation results will be displayed for each entered barcode.</li>
189 <li>The 'Finish' button is presented to start over.</li>
190 <li>At any step, clicking the 'Cancel' button will erase the scanned barcodes and start over.</li>
193 </div> <!-- /#helpModal -->
196 [% INCLUDE 'opac-bottom.inc' %]
197 [% BLOCK jsinclude %]
198 [% INCLUDE 'datatables.inc' %]
201 function mungeHistory() {
202 // prevent back button from allowing form resubmission
203 if (history && history.pushState) {
204 history.replaceState(null, document.title, window.location.href);
209 $(".focus:last").select();
214 $(document).ready(function() {
215 // Barcodes scanning table initially hidden
216 $("#sci_barcodes_table").hide();
217 // Control de 'append' button behaviour
218 $("#sci_append_button").on('click',function( e ){
219 // Make sure the form is not submitted by the button
221 var barcode = $('#barcode_input').val();
222 //var result = validate_barcode( barcode );
223 $('#sci_barcodes_table tbody').append(
224 '<tr stype="font-size: initial;"><td>' +
226 '<input type="hidden" name="barcode" value="' + barcode + '" />' +
228 // Make sure the table is now displayed
229 $("#sci_barcodes_table").show();
230 $('#sci_checkin_button').show();
231 $('#sci_refresh_button').show();
232 barcodes.push(barcode);
233 // clean the input, reset the focus
234 $('#barcode_input').val('');
238 $(".helpModal-trigger").on("click",function(e){
240 $("#helpModal").modal("show");
243 // set focus at the beginning
248 $(document).ready(function () {
249 //Increment the idle time counter every second
250 var idleInterval = setInterval(timerIncrement, 1000);
252 //Zero the idle timer on mouse movement.
253 $(this).mousemove(function (e) {
256 $(this).keypress(function (e) {
261 function timerIncrement() {
262 if ( $("#sci_finish_button").is(":visible") || $("#sci_refresh_button").is(":visible") ) {
263 idleTime = idleTime + 1;
264 idleTimeout = [% refresh_timeout %];
265 if (idleTime >= idleTimeout ) {
266 location.href = '/cgi-bin/koha/sci/sci-main.pl';
272 [% IF ( Koha.Preference('SelfCheckInUserJS') ) %]<script>[% Koha.Preference('SelfCheckInUserJS') %]</script>[% END %]