Line 0
Link Here
|
|
|
1 |
[%# Includes %] |
2 |
[% USE Koha %] |
3 |
[% USE KohaDates %] |
4 |
[%# Helper template functions %] |
5 |
[% BLOCK error_message %] |
6 |
[% IF messages.BadBarcode %] |
7 |
<span>(Barcode not found on the database)</span> |
8 |
[% ELSIF messages.DataCorrupted %] |
9 |
<span>(Data corruption detected. Contact your librarian)</span> |
10 |
[% ELSIF messages.Wrongbranch %] |
11 |
<span>(The item cannot be returned at this library)</span> |
12 |
[% ELSIF messages.withdrawn %] |
13 |
<span>(Item is withdrawn and check-in blocked by policy. Contact your librarian)</span> |
14 |
[% ELSIF messages.NotIssued %] |
15 |
<span>(The book is not currently on loan. Contact your librarian)</span> |
16 |
[% END %] |
17 |
[% END %] |
18 |
|
19 |
[% INCLUDE 'doc-head-open.inc' %] |
20 |
|
21 |
<title>[% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha [% END %] › Self check-in</title> |
22 |
|
23 |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
24 |
<meta name="generator" content="Koha [% Version %]" /> <!-- leave this for stats --> |
25 |
|
26 |
[% IF ( Koha.Preference('OpacFavicon') ) %] |
27 |
<link rel="shortcut icon" href="[% Koha.Preference('OpacFavicon') %]" type="image/x-icon" /> |
28 |
[% ELSE %] |
29 |
<link rel="shortcut icon" href="[% interface %]/[% theme %]/images/favicon.ico" type="image/x-icon" /> |
30 |
[% END %] |
31 |
<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/lib/bootstrap/css/bootstrap.min.css" /> |
32 |
<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/lib/jquery/jquery-ui.css" /> |
33 |
<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/lib/font-awesome/css/font-awesome.min.css" /> |
34 |
<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/sco.css" /> |
35 |
[% IF ( Koha.Preference('OPACUserCSS') ) %]<style type="text/css">[% Koha.Preference('OPACUserCSS') %]</style>[% END %] |
36 |
[% IF ( Koha.Preference('SCOUserCSS') ) %]<style type="text/css">[% Koha.Preference('SCOUserCSS') %]</style>[% END %] |
37 |
<!--[if lt IE 9]> |
38 |
<script src="[% interface %]/[% theme %]/lib/respond.min.js"></script> |
39 |
<![endif]--> |
40 |
<script type="text/javascript"> |
41 |
function _(s) { return s } // dummy function for gettext |
42 |
</script> |
43 |
<script type="text/javascript" src="[% interface %]/[% theme %]/lib/modernizr.min.js"></script> |
44 |
</head> |
45 |
<body id="sci_main" class="sci" onload="dofocus();" onunload="mungeHistory();"> |
46 |
|
47 |
[% SET OpacLangSelectorMode = Koha.Preference('OpacLangSelectorMode') %] |
48 |
<div id="wrap"> |
49 |
<div class="navbar navbar-inverse navbar-static-top"> |
50 |
<div class="navbar-inner"> |
51 |
<div class="container-fluid"> |
52 |
<a class="brand" href="/cgi-bin/koha/sci/sci-main.pl"><img src="[% interface %]/[% theme %]/images/koha-logo-navbar.png" alt=""></a> |
53 |
<div id="checkouthelp"> |
54 |
<ul class="nav pull-right"> |
55 |
<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> |
56 |
<li><a id="sci_logout" href="/cgi-bin/koha/sci/sci-main.pl?logout.x=1" class="logout">Logout</a></li> |
57 |
</ul> |
58 |
</div> |
59 |
|
60 |
[% IF Koha.Preference( 'opaclanguagesdisplay' ) %] |
61 |
<div id="members"> |
62 |
<ul class="nav pull-right"> |
63 |
[% INCLUDE 'masthead-langmenu.inc' %] |
64 |
</ul> |
65 |
</div> |
66 |
[% END %] |
67 |
|
68 |
</div> <!-- /.container-fluid --> |
69 |
</div> <!-- /.navbar-inner --> |
70 |
</div> <!-- /.navbar --> |
71 |
|
72 |
[% IF Koha.Preference( 'opacheader' ) %] |
73 |
<div class="container-fluid"> |
74 |
<div class="row-fluid"> |
75 |
<div id="opacheader"> |
76 |
[% Koha.Preference( 'opacheader' ) %] |
77 |
</div> |
78 |
</div> |
79 |
</div> |
80 |
[% END %] |
81 |
|
82 |
<div class="main"> |
83 |
<div class="container-fluid"> |
84 |
<div class="row-fluid"> |
85 |
<div id="masthead"> |
86 |
<h1>[% LibraryName %] Self check-in</h1> |
87 |
[% IF ( nopermission ) %] |
88 |
[%# This is what is displayed if user doesn't have permission %] |
89 |
<div class="alert"> |
90 |
<h3>Access denied</h3> |
91 |
<p>Sorry, this self check-in station has lost authentication. Please contact the administrator to resolve this problem.</p> |
92 |
</div> |
93 |
[% ELSIF ( different_ip ) %] |
94 |
[%# This is what is displayed if user doesn't have permission %] |
95 |
<div class="alert"> |
96 |
<h3>Session lost</h3> |
97 |
<p>You are accessing self check-in from a different IP address! Please log in again.</p> |
98 |
</div> |
99 |
[% ELSIF ( checkins ) %] |
100 |
[%# We have results from a check-in attempt %] |
101 |
<div id="checkins" class="sci_results_list"> |
102 |
[% IF ( success && success.size > 0 || errors && errors.size > 0 ) %] |
103 |
<h3>Results</h3> |
104 |
<table id="sci_bcheckins_table" class="table table-bordered table-striped dataTable no-footer" style="font-size: initial;"> |
105 |
<thead> |
106 |
<th>Barcode</th> |
107 |
<th>Status</th> |
108 |
</thead> |
109 |
<tbody> |
110 |
[% FOREACH success_line IN success %] |
111 |
<tr><td>[% success_line.barcode %]</td><td>Checked in</td></tr> |
112 |
[% END %] |
113 |
[% FOREACH error IN errors %] |
114 |
<tr> |
115 |
<td>[% error.barcode %]</td> |
116 |
<td>Not checked in [% PROCESS error_message messages=error.messages %]</td> |
117 |
</tr> |
118 |
[% END %] |
119 |
</tbody> |
120 |
</table> |
121 |
<div> |
122 |
<form method="post" action="#" id="finish_form"> |
123 |
<button type="submit" class="btn"><i class="icon finish"></i> Finish</button> |
124 |
</form> |
125 |
</div> |
126 |
[% ELSE %] |
127 |
<div class="alert"> |
128 |
<p>Your request included no check-ins.</p> |
129 |
</div> |
130 |
[% END %] |
131 |
</div> |
132 |
[% ELSE %] |
133 |
[%# Prompt for barcodes %] |
134 |
<div id="new_checkins" class="sci_entry"> |
135 |
<form id="scan_form" name="scan_form" |
136 |
method="post" action="/cgi-bin/koha/sci/sci-main.pl"> |
137 |
<fieldset> |
138 |
<div> |
139 |
<label for="barcode_input">Scan the item or enter its barcode:</label> |
140 |
<input id="barcode_input" name="barcode_input" size="20" type="text" class="focus" autocomplete="off" /> |
141 |
<button id="sci_append_button" type="submit" class="btn btn-default btn-sm"> |
142 |
<i class="fa fa-plus" aria-hidden="true"></i> <span>Add</span> |
143 |
</button> |
144 |
</div> |
145 |
<div class="sci_input_append"> |
146 |
<table id="sci_barcodes_table" class="table table-bordered table-striped dataTable no-footer" style="display: none; font-size: initial;"> |
147 |
<thead> |
148 |
<th class="barcodes_column">Barcode</th> |
149 |
</thead> |
150 |
<tbody> |
151 |
</tbody> |
152 |
</table> |
153 |
</div> |
154 |
<input type="hidden" name="op" value="check_in" /> |
155 |
<div id="button_bar"> |
156 |
<button id="sci_checkin_button" type="submit" class="btn btn-default btn-sm" style="display: none;"> |
157 |
<i class="fa fa-check-square-o" aria-hidden="true"></i><span> Check in</span> |
158 |
</button> |
159 |
<a href="/cgi-bin/koha/sci/sci-main.pl" class="btn btn-default btn-sm" role="button" style="display: none;" id="sci_refresh_button"> |
160 |
<i class="fa fa-refresh" aria-hidden="true"></i> <span>Reset</span> |
161 |
</a> |
162 |
</div> |
163 |
</fieldset> |
164 |
</form> |
165 |
</div> <!-- / #new_checkins --> |
166 |
[% END %] |
167 |
</div> <!-- / #masthead --> |
168 |
</div> <!-- / .row-fluid --> |
169 |
</div> <!-- / .container-fluid --> |
170 |
|
171 |
[% IF ( Koha.Preference('SCOMainUserBlock' ) ) %] |
172 |
<div id="scomainuserblock">[% Koha.Preference('SCOMainUserBlock' ) %]</div> |
173 |
[% END %] |
174 |
</div> <!-- / .main --> |
175 |
|
176 |
<div id="helpModal" class="modal hide" tabindex="-1" role="dialog" aria-labelledby="helpModalLabel" aria-hidden="true"> |
177 |
|
178 |
<div class="modal-header"> |
179 |
<button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button> |
180 |
<h3 id="helpModalLabel">Self check-in help</h3> |
181 |
</div> |
182 |
|
183 |
<div class="modal-body"> |
184 |
<ul> |
185 |
<li>Scan each item or enter its barcode. A list with the entered barcodes will be displayed.</li> |
186 |
<li>Click the 'Check in' button to confirm.</li> |
187 |
<li>The operation results will be displayed for each entered barcode.</li> |
188 |
<li>The 'Finish' button is presented to start over.</li> |
189 |
<li>At any step, clicking the 'Refresh' button will erase the scanned barcodes and start over.</li> |
190 |
</ul> |
191 |
</div> |
192 |
</div> <!-- /#helpModal --> |
193 |
</body> |
194 |
|
195 |
[% INCLUDE 'opac-bottom.inc' %] |
196 |
[% BLOCK jsinclude %] |
197 |
[% INCLUDE 'datatables.inc' %] |
198 |
<script type="text/javascript"> |
199 |
|
200 |
function mungeHistory() { |
201 |
// prevent back button from allowing form resubmission |
202 |
if (history && history.pushState) { |
203 |
history.replaceState(null, document.title, window.location.href); |
204 |
} |
205 |
} |
206 |
|
207 |
function dofocus() { |
208 |
$(".focus:last").select(); |
209 |
} |
210 |
|
211 |
var barcodes = []; |
212 |
|
213 |
$(document).ready(function() { |
214 |
// Barcodes scanning table initially hidden |
215 |
$("#sci_barcodes_table").hide(); |
216 |
// Control de 'append' button behaviour |
217 |
$("#sci_append_button").on('click',function( e ){ |
218 |
// Make sure the form is not submitted by the button |
219 |
e.preventDefault(); |
220 |
var barcode = $('#barcode_input').val(); |
221 |
//var result = validate_barcode( barcode ); |
222 |
$('#sci_barcodes_table tbody').append( |
223 |
'<tr stype="font-size: initial;"><td>' + |
224 |
barcode + |
225 |
'<input type="hidden" name="barcode" value="' + barcode + '" />' + |
226 |
'</td></tr>' ); |
227 |
// Make sure the table is now displayed |
228 |
$("#sci_barcodes_table").show(); |
229 |
$('#sci_checkin_button').show(); |
230 |
$('#sci_refresh_button').show(); |
231 |
barcodes.push(barcode); |
232 |
// clean the input, reset the focus |
233 |
$('#barcode_input').val(''); |
234 |
dofocus(); |
235 |
}); |
236 |
|
237 |
$(".helpModal-trigger").on("click",function(e){ |
238 |
e.preventDefault(); |
239 |
$("#helpModal").modal("show"); |
240 |
}); |
241 |
|
242 |
// set focus at the beginning |
243 |
dofocus(); |
244 |
}); |
245 |
</script> |
246 |
|
247 |
[% IF ( Koha.Preference('SCOUserJS') ) %]<script type="text/javascript">[% Koha.Preference('SCOUserJS') %]</script>[% END %] |
248 |
[% END %] |