6 [%# Helper template functions %]
7 [% BLOCK error_message %]
8 [% IF messages.BadBarcode %]
9 <span>(Barcode not found on the database, please see library staff for assistance)</span>
10 [% ELSIF messages.Wrongbranch %]
11 <span>(The item cannot be returned at this library, please see library staff for assistance)</span>
12 [% ELSIF messages.withdrawn %]
13 <span>(Item is withdrawn and check-in blocked by policy, please see library staff for assistance)</span>
14 [% ELSIF messages.NotIssued %]
15 <span>(The book is not currently on loan, please see library staff for assistance)</span>
17 <span>(There was a problem returning this item, please see library staff for assistance)</span>
21 [% INCLUDE 'doc-head-open.inc' %]
23 <title>[% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha [% END %] › Self check-in</title>
25 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
26 <meta name="generator" content="Koha [% Version | html %]" /> <!-- leave this for stats -->
28 [% IF ( Koha.Preference('OpacFavicon') ) %]
29 <link rel="shortcut icon" href="[% Koha.Preference('OpacFavicon') | url %]" type="image/x-icon" />
31 <link rel="shortcut icon" href="[% interface | html %]/[% theme | html %]/images/favicon.ico" type="image/x-icon" />
33 [% Asset.css("lib/bootstrap/css/bootstrap.min.css") | $raw %]
34 [% Asset.css("lib/jquery/jquery-ui.css") | $raw %]
35 [% Asset.css("lib/font-awesome/css/font-awesome.min.css") | $raw %]
36 [% Asset.css("css/sci.css") | $raw %]
37 [% IF ( Koha.Preference('OPACUserCSS') ) %]<style>[% Koha.Preference('OPACUserCSS') | $raw %]</style>[% END %]
38 [% IF ( Koha.Preference('SelfCheckInUserCSS') ) %]<style>[% Koha.Preference('SelfCheckInUserCSS') | $raw %]</style>[% END %]
40 <script src="[% interface | html %]/[% theme | html %]/lib/respond.min.js"></script>
43 function _(s) { return s } // dummy function for gettext
45 [% Asset.js("lib/modernizr.min.js") | $raw %]
47 <body id="sci_main" class="sci" onload="dofocus();" onunload="mungeHistory();">
49 [% SET OpacLangSelectorMode = Koha.Preference('OpacLangSelectorMode') %]
51 <div class="navbar navbar-inverse navbar-static-top">
52 <div class="navbar-inner">
53 <div class="container-fluid">
54 <a class="brand" href="/cgi-bin/koha/sci/sci-main.pl"><img src="[% interface | html %]/[% theme | html %]/images/koha-green-logo.png" alt=""></a>
55 <div id="checkouthelp">
56 <ul class="nav pull-right">
57 <li><a href="/cgi-bin/koha/sci/sci-main.pl" class="helpModal-trigger" role="button" data-toggle="modal"><i class="fa fa-info-circle"></i> Help</a></li>
58 <li><a id="sci_logout" href="/cgi-bin/koha/sci/sci-main.pl?logout.x=1" class="logout">Log out</a></li>
62 [% IF Koha.Preference( 'opaclanguagesdisplay' ) %]
64 <ul class="nav pull-right">
65 [% INCLUDE 'masthead-langmenu.inc' %]
70 </div> <!-- /.container-fluid -->
71 </div> <!-- /.navbar-inner -->
72 </div> <!-- /.navbar -->
74 [% IF Koha.Preference( 'opacheader' ) %]
75 <div class="container-fluid">
76 <div class="row-fluid">
78 [% Koha.Preference( 'opacheader' ) | $raw %]
85 <div class="container-fluid">
86 <div class="row-fluid">
88 <h1>[% LibraryName | html %] Self check-in</h1>
89 [% IF ( nopermission ) %]
90 [%# This is what is displayed if user doesn't have permission %]
92 <h3>Access denied</h3>
93 <p>Sorry, this self check-in station has lost authentication. Please contact the administrator to resolve this problem.</p>
95 [% ELSIF ( different_ip ) %]
96 [%# This is what is displayed if user doesn't have permission %]
99 <p>You are accessing self check-in from a different IP address! Please log in again.</p>
101 [% ELSIF ( checkins ) %]
102 [%# We have results from a check-in attempt %]
103 <div id="checkins" class="sci_results_list">
104 [% IF ( success && success.size > 0 || errors && errors.size > 0 ) %]
106 <table id="sci_bcheckins_table" class="table table-bordered table-striped dataTable no-footer" style="font-size: initial;">
112 [% FOREACH success_line IN success %]
113 <tr><td>[% success_line.barcode | html %]</td><td>Checked in</td></tr>
115 [% FOREACH error IN errors %]
117 <td>[% error.barcode | html %]</td>
118 <td>Not checked in [% PROCESS error_message messages=error.messages %]</td>
124 <form method="post" action="#" id="finish_form">
125 <button id="sci_finish_button" type="submit" class="btn"><i class="fa fa-check"></i> Finish</button>
130 <p>Your request included no check-ins.</p>
135 [%# Prompt for barcodes %]
136 <div id="new_checkins" class="sci_entry">
137 <form id="scan_form" name="scan_form"
138 method="post" action="/cgi-bin/koha/sci/sci-main.pl">
141 <label for="barcode_input">Scan the item or enter its barcode:</label>
142 <input id="barcode_input" name="barcode_input" size="20" type="text" class="focus" autocomplete="off" />
143 <button id="sci_append_button" type="submit" class="btn btn-default btn-sm">
144 <i class="fa fa-plus" aria-hidden="true"></i> <span>Add</span>
147 <div class="sci_input_append">
148 <table id="sci_barcodes_table" class="table table-bordered table-striped dataTable no-footer" style="display: none; font-size: initial;">
150 <th class="barcodes_column">Barcode</th>
156 <input type="hidden" name="op" value="check_in" />
157 <div id="button_bar">
158 <button id="sci_checkin_button" type="submit" class="btn btn-default btn-sm" style="display: none;">
159 <i class="fa fa-check-square-o" aria-hidden="true"></i> <span>Check in</span>
161 <a href="/cgi-bin/koha/sci/sci-main.pl" class="btn btn-default btn-sm" role="button" style="display: none;" id="sci_refresh_button">
162 <i class="fa fa-refresh" aria-hidden="true"></i> <span>Cancel</span>
167 </div> <!-- / #new_checkins -->
169 </div> <!-- / #masthead -->
170 </div> <!-- / .row-fluid -->
171 </div> <!-- / .container-fluid -->
173 [% IF ( Koha.Preference('SelfCheckInMainUserBlock') ) %]
174 <div id="SelfCheckInMainUserBlock">[% Koha.Preference('SelfCheckInMainUserBlock' ) | $raw %]</div>
176 </div> <!-- / .main -->
178 <div id="helpModal" class="modal hide" tabindex="-1" role="dialog" aria-labelledby="helpModalLabel" aria-hidden="true">
180 <div class="modal-header">
181 <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button>
182 <h3 id="helpModalLabel">Self check-in help</h3>
185 <div class="modal-body">
187 <li>Scan each item or enter its barcode. A list with the entered barcodes will be displayed.</li>
188 <li>Click the 'Check in' button to confirm.</li>
189 <li>The operation results will be displayed for each entered barcode.</li>
190 <li>The 'Finish' button is presented to start over.</li>
191 <li>At any step, clicking the 'Cancel' button will erase the scanned barcodes and start over.</li>
194 </div> <!-- /#helpModal -->
197 [% INCLUDE 'opac-bottom.inc' %]
198 [% BLOCK jsinclude %]
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 style="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 | html %];
265 if (idleTime >= idleTimeout ) {
266 location.href = '/cgi-bin/koha/sci/sci-main.pl';
272 [% IF ( Koha.Preference('SelfCheckInUserJS') ) %]<script>[% Koha.Preference('SelfCheckInUserJS') | $raw %]</script>[% END %]