Lines 1-12
Link Here
|
|
|
1 |
[% USE raw %] |
1 |
[% USE Koha %] |
2 |
[% USE Koha %] |
2 |
[% USE Branches %] |
3 |
[% USE Branches %] |
3 |
[% USE KohaDates %] |
4 |
[% USE KohaDates %] |
4 |
[% INCLUDE 'doc-head-open.inc' %] |
5 |
[% INCLUDE 'doc-head-open.inc' %] |
5 |
<title>Koha › Stock rotation</title> |
6 |
<title>Koha › Stock rotation</title> |
6 |
[% INCLUDE 'doc-head-close.inc' %] |
7 |
[% INCLUDE 'doc-head-close.inc' %] |
7 |
[% Asset.css("css/datatables.css") %] |
8 |
[% Asset.css("css/datatables.css") | $raw %] |
8 |
[% INCLUDE 'datatables.inc' %] |
9 |
[% INCLUDE 'datatables.inc' %] |
9 |
[% Asset.js("js/pages/stockrotation.js") %] |
10 |
[% Asset.js("js/pages/stockrotation.js") | $raw %] |
10 |
<script type="text/javascript"> |
11 |
<script type="text/javascript"> |
11 |
//<![CDATA[ |
12 |
//<![CDATA[ |
12 |
$(document).ready(function() { |
13 |
$(document).ready(function() { |
Lines 23-29
Link Here
|
23 |
</script> |
24 |
</script> |
24 |
</head> |
25 |
</head> |
25 |
|
26 |
|
26 |
<body> |
27 |
<body id="tools_stockrotation" class="tools"> |
27 |
[% INCLUDE 'header.inc' %] |
28 |
[% INCLUDE 'header.inc' %] |
28 |
[% INCLUDE 'patron-search.inc' %] |
29 |
[% INCLUDE 'patron-search.inc' %] |
29 |
|
30 |
|
Lines 44-53
Link Here
|
44 |
[% ELSIF (op == 'manage_stages') %] |
45 |
[% ELSIF (op == 'manage_stages') %] |
45 |
› Manage stages |
46 |
› Manage stages |
46 |
[% ELSIF (op == 'create_edit_stage' && stage.id) %] |
47 |
[% ELSIF (op == 'create_edit_stage' && stage.id) %] |
47 |
<a href="?op=manage_stages&rota_id=[% rota_id %]">› Manage stages</a> |
48 |
<a href="?op=manage_stages&rota_id=[% rota_id | uri %]">› Manage stages</a> |
48 |
› Edit stage |
49 |
› Edit stage |
49 |
[% ELSIF (op == 'create_edit_stage' && !stage.id) %] |
50 |
[% ELSIF (op == 'create_edit_stage' && !stage.id) %] |
50 |
<a href="?op=manage_stages&rota_id=[% rota_id %]">› Manage stages</a> |
51 |
<a href="?op=manage_stages&rota_id=[% rota_id | uri %]">› Manage stages</a> |
51 |
› Create stage |
52 |
› Create stage |
52 |
[% ELSIF (op == 'manage_items') %] |
53 |
[% ELSIF (op == 'manage_items') %] |
53 |
› Manage items |
54 |
› Manage items |
Lines 79-91
Link Here
|
79 |
<tbody> |
80 |
<tbody> |
80 |
[% FOREACH rota IN existing_rotas %] |
81 |
[% FOREACH rota IN existing_rotas %] |
81 |
<tr> |
82 |
<tr> |
82 |
<td>[% rota.title %]</td> |
83 |
<td>[% rota.title | html %]</td> |
83 |
<td>[% rota.cyclical ? 'Yes' : 'No'%]</td> |
84 |
<td>[% rota.cyclical ? 'Yes' : 'No' | html %]</td> |
84 |
<td>[% rota.active ? 'Yes' : 'No'%]</td> |
85 |
<td>[% rota.active ? 'Yes' : 'No' | html %]</td> |
85 |
<td>[% rota.description %]</td> |
86 |
<td>[% rota.description | html %]</td> |
86 |
<td>[% rota.stockrotationitems.count %]</td> |
87 |
<td>[% rota.stockrotationitems.count | html %]</td> |
87 |
<td class="actions"> |
88 |
<td class="actions"> |
88 |
<a class="btn btn-default btn-xs" href="?op=create_edit_rota&rota_id=[% rota.rota_id %]"> |
89 |
<a class="btn btn-default btn-xs" href="?op=create_edit_rota&rota_id=[% rota.rota_id | uri %]"> |
89 |
<i class="fa fa-pencil"></i> |
90 |
<i class="fa fa-pencil"></i> |
90 |
Edit |
91 |
Edit |
91 |
</a> |
92 |
</a> |
Lines 95-107
Link Here
|
95 |
<i class="fa fa-caret-down"></i> |
96 |
<i class="fa fa-caret-down"></i> |
96 |
</button> |
97 |
</button> |
97 |
<ul class="dropdown-menu"> |
98 |
<ul class="dropdown-menu"> |
98 |
<li><a href="?op=manage_stages&rota_id=[% rota.rota_id %]">Stages</a></li> |
99 |
<li><a href="?op=manage_stages&rota_id=[% rota.rota_id | uri %]">Stages</a></li> |
99 |
[% IF CAN_user_stockrotation_manage_rota_items && rota.stockrotationstages.count > 0 %] |
100 |
[% IF CAN_user_stockrotation_manage_rota_items && rota.stockrotationstages.count > 0 %] |
100 |
<li><a href="?op=manage_items&rota_id=[% rota.rota_id %]">Items</a></li> |
101 |
<li><a href="?op=manage_items&rota_id=[% rota.rota_id | uri %]">Items</a></li> |
101 |
[% END %] |
102 |
[% END %] |
102 |
</ul> |
103 |
</ul> |
103 |
</div> |
104 |
</div> |
104 |
<a class="btn btn-default btn-xs" href="?op=toggle_rota&rota_id=[% rota.rota_id %]"> |
105 |
<a class="btn btn-default btn-xs" href="?op=toggle_rota&rota_id=[% rota.rota_id | uri %]"> |
105 |
<i class="fa fa-power-off"></i> |
106 |
<i class="fa fa-power-off"></i> |
106 |
[% IF !rota.active %] |
107 |
[% IF !rota.active %] |
107 |
Activate |
108 |
Activate |
Lines 119-125
Link Here
|
119 |
[% ELSIF (op == 'create_edit_rota') %] |
120 |
[% ELSIF (op == 'create_edit_rota') %] |
120 |
|
121 |
|
121 |
[% IF rota.rota_id %] |
122 |
[% IF rota.rota_id %] |
122 |
<h2>Edit "[% rota.title %]"</h2> |
123 |
<h2>Edit "[% rota.title | html %]"</h2> |
123 |
[% ELSE %] |
124 |
[% ELSE %] |
124 |
<h2>Create new rota</h2> |
125 |
<h2>Create new rota</h2> |
125 |
[% END %] |
126 |
[% END %] |
Lines 135-141
Link Here
|
135 |
<ol> |
136 |
<ol> |
136 |
<li> |
137 |
<li> |
137 |
<label class="required" for="title">Name:</label> |
138 |
<label class="required" for="title">Name:</label> |
138 |
<input type="text" id="title" name="title" value="[% rota.title %]" required="required" placeholder="Rota name"> |
139 |
<input type="text" id="title" name="title" value="[% rota.title | html %]" required="required" placeholder="Rota name"> |
139 |
<span class="required">Required</span> |
140 |
<span class="required">Required</span> |
140 |
</li> |
141 |
</li> |
141 |
<li> |
142 |
<li> |
Lines 152-158
Link Here
|
152 |
</li> |
153 |
</li> |
153 |
<li> |
154 |
<li> |
154 |
<label for="description">Description:</label> |
155 |
<label for="description">Description:</label> |
155 |
<textarea id="description" name="description" placeholder="Rota description">[% rota.description %]</textarea> |
156 |
<textarea id="description" name="description" placeholder="Rota description">[% rota.description | html %]</textarea> |
156 |
</li> |
157 |
</li> |
157 |
</ol> |
158 |
</ol> |
158 |
</fieldset> |
159 |
</fieldset> |
Lines 161-167
Link Here
|
161 |
<a href="/cgi-bin/koha/tools/stockrotation.pl" class="cancel">Cancel</a> |
162 |
<a href="/cgi-bin/koha/tools/stockrotation.pl" class="cancel">Cancel</a> |
162 |
</fieldset> |
163 |
</fieldset> |
163 |
[% IF rota.rota_id %] |
164 |
[% IF rota.rota_id %] |
164 |
<input type="hidden" name="id" value="[% rota.rota_id %]"> |
165 |
<input type="hidden" name="id" value="[% rota.rota_id | html %]"> |
165 |
[% END %] |
166 |
[% END %] |
166 |
<input type="hidden" name="op" value="process_rota"> |
167 |
<input type="hidden" name="op" value="process_rota"> |
167 |
</form> |
168 |
</form> |
Lines 176-182
Link Here
|
176 |
</div> |
177 |
</div> |
177 |
[% END %] |
178 |
[% END %] |
178 |
|
179 |
|
179 |
<h2>Manage [% rota.title %] stages</h2> |
180 |
<h2>Manage [% rota.title | html %] stages</h2> |
180 |
<div id="ajax_status" |
181 |
<div id="ajax_status" |
181 |
data-saving-msg="Saving changes..." |
182 |
data-saving-msg="Saving changes..." |
182 |
data-success-msg="" |
183 |
data-success-msg="" |
Lines 198-206
Link Here
|
198 |
<select name="branchcode" id="branch"> |
199 |
<select name="branchcode" id="branch"> |
199 |
[% FOREACH branch IN branches %] |
200 |
[% FOREACH branch IN branches %] |
200 |
[% IF branch.branchcode == stage.branchcode_id %] |
201 |
[% IF branch.branchcode == stage.branchcode_id %] |
201 |
<option value="[% branch.branchcode %]" selected>[% Branches.GetName(branch.branchcode) %]</option> |
202 |
<option value="[% branch.branchcode | html %]" selected>[% Branches.GetName(branch.branchcode) | html %]</option> |
202 |
[% ELSE %] |
203 |
[% ELSE %] |
203 |
<option value="[% branch.branchcode %]">[% Branches.GetName(branch.branchcode) %]</option> |
204 |
<option value="[% branch.branchcode | html %]">[% Branches.GetName(branch.branchcode) | html %]</option> |
204 |
[% END %] |
205 |
[% END %] |
205 |
[% END %] |
206 |
[% END %] |
206 |
</select> |
207 |
</select> |
Lines 208-214
Link Here
|
208 |
</li> |
209 |
</li> |
209 |
<li> |
210 |
<li> |
210 |
<label class="required" for="duration">Duration:</label> |
211 |
<label class="required" for="duration">Duration:</label> |
211 |
<input type="text" id="duration" name="duration" value="[% stage.duration %]" required="required" placeholder="Duration (days)"> |
212 |
<input type="text" id="duration" name="duration" value="[% stage.duration | html %]" required="required" placeholder="Duration (days)"> |
212 |
<span class="required">Required</span> |
213 |
<span class="required">Required</span> |
213 |
</li> |
214 |
</li> |
214 |
</ol> |
215 |
</ol> |
Lines 216-223
Link Here
|
216 |
<fieldset class="action"> |
217 |
<fieldset class="action"> |
217 |
<input type="submit" value="Submit"> |
218 |
<input type="submit" value="Submit"> |
218 |
</fieldset> |
219 |
</fieldset> |
219 |
<input type="hidden" name="stage_id" value="[% stage.id %]"> |
220 |
<input type="hidden" name="stage_id" value="[% stage.id | html %]"> |
220 |
<input type="hidden" name="rota_id" value="[% rota_id %]"> |
221 |
<input type="hidden" name="rota_id" value="[% rota_id | html %]"> |
221 |
<input type="hidden" name="op" value="process_stage"> |
222 |
<input type="hidden" name="op" value="process_stage"> |
222 |
</form> |
223 |
</form> |
223 |
|
224 |
|
Lines 230-250
Link Here
|
230 |
<span class="stagename">Library</span> |
231 |
<span class="stagename">Library</span> |
231 |
<span class="stageduration">Duration (days)</span> |
232 |
<span class="stageduration">Duration (days)</span> |
232 |
</div> |
233 |
</div> |
233 |
<ul id="sortable_stages" data-rota-id="[% rota.rota_id %]"> |
234 |
<ul id="sortable_stages" data-rota-id="[% rota.rota_id | html %]"> |
234 |
[% FOREACH stage IN existing_stages %] |
235 |
[% FOREACH stage IN existing_stages %] |
235 |
<li id="stage_[% stage.stage_id %]"> |
236 |
<li id="stage_[% stage.stage_id | html %]"> |
236 |
<span data-toggle="tooltip" title="Drag and drop to move this stage to another position" data-placement="right" class="stagename"> |
237 |
<span data-toggle="tooltip" title="Drag and drop to move this stage to another position" data-placement="right" class="stagename"> |
237 |
[% IF existing_stages.size > 1 %] |
238 |
[% IF existing_stages.size > 1 %] |
238 |
<i class="drag_handle fa fa-lg fa-bars"></i> |
239 |
<i class="drag_handle fa fa-lg fa-bars"></i> |
239 |
[% END %] |
240 |
[% END %] |
240 |
[% Branches.GetName(stage.branchcode_id) %] |
241 |
[% Branches.GetName(stage.branchcode_id) | html %] |
241 |
</span> |
242 |
</span> |
242 |
<span class="stageduration">[% stage.duration %]</span> |
243 |
<span class="stageduration">[% stage.duration | html %]</span> |
243 |
<span class="stageactions"> |
244 |
<span class="stageactions"> |
244 |
<a class="btn btn-default btn-xs" href="?op=create_edit_stage&stage_id=[% stage.stage_id %]"> |
245 |
<a class="btn btn-default btn-xs" href="?op=create_edit_stage&stage_id=[% stage.stage_id | uri %]"> |
245 |
<i class="fa fa-pencil"></i> Edit |
246 |
<i class="fa fa-pencil"></i> Edit |
246 |
</a> |
247 |
</a> |
247 |
<a class="btn btn-default btn-xs" href="?op=confirm_delete_stage&stage_id=[% stage.stage_id %]"> |
248 |
<a class="btn btn-default btn-xs" href="?op=confirm_delete_stage&stage_id=[% stage.stage_id | uri %]"> |
248 |
<i class="fa fa-trash"></i> Delete |
249 |
<i class="fa fa-trash"></i> Delete |
249 |
</a> |
250 |
</a> |
250 |
</span> |
251 |
</span> |
Lines 259-265
Link Here
|
259 |
[% ELSIF (op == 'create_edit_stage') %] |
260 |
[% ELSIF (op == 'create_edit_stage') %] |
260 |
|
261 |
|
261 |
[% IF stage.id %] |
262 |
[% IF stage.id %] |
262 |
<h2>Edit "[% Branches.GetName(stage.branchcode_id) %]"</h2> |
263 |
<h2>Edit "[% Branches.GetName(stage.branchcode_id) | html %]"</h2> |
263 |
[% ELSE %] |
264 |
[% ELSE %] |
264 |
<h2>Create new stage</h2> |
265 |
<h2>Create new stage</h2> |
265 |
[% END %] |
266 |
[% END %] |
Lines 278-286
Link Here
|
278 |
<select name="branchcode" id="branch"> |
279 |
<select name="branchcode" id="branch"> |
279 |
[% FOREACH branch IN branches %] |
280 |
[% FOREACH branch IN branches %] |
280 |
[% IF branch.branchcode == stage.branchcode_id %] |
281 |
[% IF branch.branchcode == stage.branchcode_id %] |
281 |
<option value="[% branch.branchcode %]" selected>[% Branches.GetName(branch.branchcode) %]</option> |
282 |
<option value="[% branch.branchcode | html %]" selected>[% Branches.GetName(branch.branchcode) | html %]</option> |
282 |
[% ELSE %] |
283 |
[% ELSE %] |
283 |
<option value="[% branch.branchcode %]">[% Branches.GetName(branch.branchcode) %]</option> |
284 |
<option value="[% branch.branchcode | html %]">[% Branches.GetName(branch.branchcode) | html %]</option> |
284 |
[% END %] |
285 |
[% END %] |
285 |
[% END %] |
286 |
[% END %] |
286 |
</select> |
287 |
</select> |
Lines 288-304
Link Here
|
288 |
</li> |
289 |
</li> |
289 |
<li> |
290 |
<li> |
290 |
<label class="required" for="duration">Duration:</label> |
291 |
<label class="required" for="duration">Duration:</label> |
291 |
<input type="text" id="duration" name="duration" value="[% stage.duration %]" required="required" placeholder="Duration (days)"> |
292 |
<input type="text" id="duration" name="duration" value="[% stage.duration | html %]" required="required" placeholder="Duration (days)"> |
292 |
<span class="required">Required</span> |
293 |
<span class="required">Required</span> |
293 |
</li> |
294 |
</li> |
294 |
</ol> |
295 |
</ol> |
295 |
</fieldset> |
296 |
</fieldset> |
296 |
<fieldset class="action"> |
297 |
<fieldset class="action"> |
297 |
<input type="submit" value="Save"> |
298 |
<input type="submit" value="Save"> |
298 |
<a href="/cgi-bin/koha/tools/stockrotation.pl?op=manage_stages&rota_id=[% rota_id %]" class="cancel">Cancel</a> |
299 |
<a href="/cgi-bin/koha/tools/stockrotation.pl?op=manage_stages&rota_id=[% rota_id | uri %]" class="cancel">Cancel</a> |
299 |
</fieldset> |
300 |
</fieldset> |
300 |
<input type="hidden" name="stage_id" value="[% stage.id %]"> |
301 |
<input type="hidden" name="stage_id" value="[% stage.id | html %]"> |
301 |
<input type="hidden" name="rota_id" value="[% rota_id %]"> |
302 |
<input type="hidden" name="rota_id" value="[% rota_id | html %]"> |
302 |
<input type="hidden" name="op" value="process_stage"> |
303 |
<input type="hidden" name="op" value="process_stage"> |
303 |
</form> |
304 |
</form> |
304 |
[% ELSIF (op == 'confirm_remove_from_rota') %] |
305 |
[% ELSIF (op == 'confirm_remove_from_rota') %] |
Lines 306-313
Link Here
|
306 |
<div class="dialog alert"> |
307 |
<div class="dialog alert"> |
307 |
<h3>Are you sure you wish to remove this item from it's rota</h3> |
308 |
<h3>Are you sure you wish to remove this item from it's rota</h3> |
308 |
<p> |
309 |
<p> |
309 |
<a class="btn btn-default btn-xs approve" href="?op=remove_item_from_stage&item_id=[% item_id %]&stage_id=[% stage_id %]&rota_id=[% rota_id %]"><i class="fa fa-fw fa-check"></i>Yes</a> |
310 |
<a class="btn btn-default btn-xs approve" href="?op=remove_item_from_stage&item_id=[% item_id | uri %]&stage_id=[% stage_id | uri %]&rota_id=[% rota_id | uri %]"><i class="fa fa-fw fa-check"></i>Yes</a> |
310 |
<a class="btn btn-default btn-xs deny" href="?op=manage_items&rota_id=[% rota_id %]"><i class="fa fa-fw fa-remove"></i>No</a> |
311 |
<a class="btn btn-default btn-xs deny" href="?op=manage_items&rota_id=[% rota_id | uri %]"><i class="fa fa-fw fa-remove"></i>No</a> |
311 |
</p> |
312 |
</p> |
312 |
</div> |
313 |
</div> |
313 |
[% ELSIF (op == 'confirm_delete_stage') %] |
314 |
[% ELSIF (op == 'confirm_delete_stage') %] |
Lines 318-330
Link Here
|
318 |
<p>This stage contains the following item(s):</p> |
319 |
<p>This stage contains the following item(s):</p> |
319 |
<ul> |
320 |
<ul> |
320 |
[% FOREACH item IN stage.stockrotationitems %] |
321 |
[% FOREACH item IN stage.stockrotationitems %] |
321 |
<li>[% item.itemnumber.biblio.title %] (Barcode: [% item.itemnumber.barcode %])</li> |
322 |
<li>[% item.itemnumber.biblio.title | html %] (Barcode: [% item.itemnumber.barcode | html %])</li> |
322 |
[% END %] |
323 |
[% END %] |
323 |
</ul> |
324 |
</ul> |
324 |
[% END %] |
325 |
[% END %] |
325 |
<p> |
326 |
<p> |
326 |
<a class="btn btn-default btn-xs approve" href="?op=delete_stage&stage_id=[% stage.stage_id %]"><i class="fa fa-fw fa-check"></i>Yes</a> |
327 |
<a class="btn btn-default btn-xs approve" href="?op=delete_stage&stage_id=[% stage.stage_id | uri %]"><i class="fa fa-fw fa-check"></i>Yes</a> |
327 |
<a class="btn btn-default btn-xs deny" href="?op=manage_stages&rota_id=[% stage.rota.rota_id %]"><i class="fa fa-fw fa-remove"></i>No</a> |
328 |
<a class="btn btn-default btn-xs deny" href="?op=manage_stages&rota_id=[% stage.rota.rota_id | uri %]"><i class="fa fa-fw fa-remove"></i>No</a> |
328 |
</p> |
329 |
</p> |
329 |
</div> |
330 |
</div> |
330 |
[% ELSIF (op == 'manage_items') %] |
331 |
[% ELSIF (op == 'manage_items') %] |
Lines 341-352
Link Here
|
341 |
</div> |
342 |
</div> |
342 |
[% END %] |
343 |
[% END %] |
343 |
|
344 |
|
344 |
<h2>Manage [% rota.title %] items</h2> |
345 |
<h2>Manage [% rota.title | html %] items</h2> |
345 |
|
346 |
|
346 |
<div> |
347 |
<div> |
347 |
<form id="add_rota_item_form" method="post" enctype="multipart/form-data" class="validated"> |
348 |
<form id="add_rota_item_form" method="post" enctype="multipart/form-data" class="validated"> |
348 |
<fieldset class="rows"> |
349 |
<fieldset class="rows"> |
349 |
<legend>Add item to "[% rota.title %]"</legend> |
350 |
<legend>Add item to "[% rota.title | html %]"</legend> |
350 |
<ol> |
351 |
<ol> |
351 |
<li> |
352 |
<li> |
352 |
<label for="barcode">Barcode:</label> |
353 |
<label for="barcode">Barcode:</label> |
Lines 366-378
Link Here
|
366 |
<fieldset class="action"> |
367 |
<fieldset class="action"> |
367 |
<input type="submit" value="Save"> |
368 |
<input type="submit" value="Save"> |
368 |
</fieldset> |
369 |
</fieldset> |
369 |
<input type="hidden" name="rota_id" value="[% rota.id %]"> |
370 |
<input type="hidden" name="rota_id" value="[% rota.id | html %]"> |
370 |
<input type="hidden" name="op" value="add_items_to_rota"> |
371 |
<input type="hidden" name="op" value="add_items_to_rota"> |
371 |
</form> |
372 |
</form> |
372 |
</div> |
373 |
</div> |
373 |
|
374 |
|
374 |
[% IF items.count > 0 %] |
375 |
[% IF items.count > 0 %] |
375 |
<h3>Manage items assigned to "[% rota.title %]"</h3> |
376 |
<h3>Manage items assigned to "[% rota.title | html %]"</h3> |
376 |
<table id="sr_manage_items" class="items_table" role="grid"> |
377 |
<table id="sr_manage_items" class="items_table" role="grid"> |
377 |
<thead> |
378 |
<thead> |
378 |
<th>Barcode</th> |
379 |
<th>Barcode</th> |
Lines 386-396
Link Here
|
386 |
<tbody> |
387 |
<tbody> |
387 |
[% FOREACH item IN items %] |
388 |
[% FOREACH item IN items %] |
388 |
<tr> |
389 |
<tr> |
389 |
<td><a href="/cgi-bin/koha/catalogue/moredetail.pl?itemnumber=[% item.id %]&biblionumber=[% item.itemnumber.biblio.id %]#item[% item.id %]">[% item.itemnumber.barcode %]</a></td> |
390 |
<td><a href="/cgi-bin/koha/catalogue/moredetail.pl?itemnumber=[% item.id | uri %]&biblionumber=[% item.itemnumber.biblio.id | uri %]#item[% item.id | uri %]">[% item.itemnumber.barcode | html %]</a></td> |
390 |
<td><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% item.itemnumber.biblio.id %]">[% item.itemnumber.biblio.title %]</a></td> |
391 |
<td><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% item.itemnumber.biblio.id | uri %]">[% item.itemnumber.biblio.title | html %]</a></td> |
391 |
<td>[% item.itemnumber.biblio.author %]</td> |
392 |
<td>[% item.itemnumber.biblio.author | html %]</td> |
392 |
<td>[% item.itemnumber.itemcallnumber %]</td> |
393 |
<td>[% item.itemnumber.itemcallnumber | html %]</td> |
393 |
<td>[% item.itemnumber.get_transfer ? 'Yes' : 'No' %]</td> |
394 |
<td>[% item.itemnumber.get_transfer ? 'Yes' : 'No' | html %]</td> |
394 |
<td> |
395 |
<td> |
395 |
[% FOREACH this_stage IN stages %] |
396 |
[% FOREACH this_stage IN stages %] |
396 |
[% IF this_stage.stage_id == item.stage.stage_id %] |
397 |
[% IF this_stage.stage_id == item.stage.stage_id %] |
Lines 398-415
Link Here
|
398 |
[% ELSE %] |
399 |
[% ELSE %] |
399 |
<span class="stage"> |
400 |
<span class="stage"> |
400 |
[% END %] |
401 |
[% END %] |
401 |
[% Branches.GetName(this_stage.branchcode_id) %] ([% this_stage.duration %]) |
402 |
[% Branches.GetName(this_stage.branchcode_id) | html %] ([% this_stage.duration | html %]) |
402 |
</span> |
403 |
</span> |
403 |
» |
404 |
» |
404 |
[% END %] |
405 |
[% END %] |
405 |
[% IF stages.size > 0 %] |
406 |
[% IF stages.size > 0 %] |
406 |
<span class="stage">[% rota.cyclical ? 'START' : 'END' %]</span> |
407 |
<span class="stage">[% rota.cyclical ? 'START' : 'END' | html %]</span> |
407 |
[% END %] |
408 |
[% END %] |
408 |
</td> |
409 |
</td> |
409 |
<td class="actions"> |
410 |
<td class="actions"> |
410 |
[% in_transit = item.itemnumber.get_transfer %] |
411 |
[% in_transit = item.itemnumber.get_transfer %] |
411 |
[% IF !in_transit && stages.size > 1 %] |
412 |
[% IF !in_transit && stages.size > 1 %] |
412 |
<a class="btn btn-default btn-xs" href="?op=move_to_next_stage&rota_id=[% rota.id %]&item_id=[% item.id %]&stage_id=[% item.stage.stage_id %]"> |
413 |
<a class="btn btn-default btn-xs" href="?op=move_to_next_stage&rota_id=[% rota.id | uri %]&item_id=[% item.id | uri %]&stage_id=[% item.stage.stage_id | uri %]"> |
413 |
[% ELSE %] |
414 |
[% ELSE %] |
414 |
<a class="btn btn-default btn-xs" disabled> |
415 |
<a class="btn btn-default btn-xs" disabled> |
415 |
[% END %] |
416 |
[% END %] |
Lines 417-431
Link Here
|
417 |
Move to next stage |
418 |
Move to next stage |
418 |
</a> |
419 |
</a> |
419 |
[% IF !in_transit %] |
420 |
[% IF !in_transit %] |
420 |
<a class="btn btn-default btn-xs" href="?op=toggle_in_demand&stage_id=[% item.stage.stage_id %]&item_id=[% item.id %]&rota_id=[% rota.id %]"> |
421 |
<a class="btn btn-default btn-xs" href="?op=toggle_in_demand&stage_id=[% item.stage.stage_id | uri %]&item_id=[% item.id | uri %]&rota_id=[% rota.id | uri %]"> |
421 |
[% ELSE %] |
422 |
[% ELSE %] |
422 |
<a class="btn btn-default btn-xs" disabled> |
423 |
<a class="btn btn-default btn-xs" disabled> |
423 |
[% END %] |
424 |
[% END %] |
424 |
<i class="fa fa-fire"></i> |
425 |
<i class="fa fa-fire"></i> |
425 |
[% item.indemand ? 'Remove "In demand"' : 'Add "In demand"' %] |
426 |
[% item.indemand ? 'Remove "In demand"' : 'Add "In demand"' | html %] |
426 |
</a> |
427 |
</a> |
427 |
[% IF !in_transit %] |
428 |
[% IF !in_transit %] |
428 |
<a class="btn btn-default btn-xs" href="?op=confirm_remove_from_rota&stage_id=[% item.stage.stage_id %]&item_id=[% item.id %]&rota_id=[% rota.id %]"> |
429 |
<a class="btn btn-default btn-xs" href="?op=confirm_remove_from_rota&stage_id=[% item.stage.stage_id | uri %]&item_id=[% item.id | uri %]&rota_id=[% rota.id | uri %]"> |
429 |
[% ELSE %] |
430 |
[% ELSE %] |
430 |
<a class="btn btn-default btn-xs" disabled> |
431 |
<a class="btn btn-default btn-xs" disabled> |
431 |
[% END %] |
432 |
[% END %] |
Lines 452-458
Link Here
|
452 |
<h4>Items added to rota:</h4> |
453 |
<h4>Items added to rota:</h4> |
453 |
<ul> |
454 |
<ul> |
454 |
[% FOREACH item_ok IN barcode_status.ok %] |
455 |
[% FOREACH item_ok IN barcode_status.ok %] |
455 |
<li>[% item_ok.biblio.title %]</li> |
456 |
<li>[% item_ok.biblio.title | html %]</li> |
456 |
[% END %] |
457 |
[% END %] |
457 |
</ul> |
458 |
</ul> |
458 |
[% END %] |
459 |
[% END %] |
Lines 460-466
Link Here
|
460 |
<h4>Items already on this rota:</h4> |
461 |
<h4>Items already on this rota:</h4> |
461 |
<ul> |
462 |
<ul> |
462 |
[% FOREACH item_on_this IN barcode_status.on_this %] |
463 |
[% FOREACH item_on_this IN barcode_status.on_this %] |
463 |
<li>[% item_on_this.biblio.title %]</li> |
464 |
<li>[% item_on_this.biblio.title | html %]</li> |
464 |
[% END %] |
465 |
[% END %] |
465 |
</ul> |
466 |
</ul> |
466 |
[% END %] |
467 |
[% END %] |
Lines 468-474
Link Here
|
468 |
<h4>Barcodes not found:</h4> |
469 |
<h4>Barcodes not found:</h4> |
469 |
<ul> |
470 |
<ul> |
470 |
[% FOREACH barcode_not_found IN barcode_status.not_found %] |
471 |
[% FOREACH barcode_not_found IN barcode_status.not_found %] |
471 |
<li>[% barcode_not_found %]</li> |
472 |
<li>[% barcode_not_found | html %]</li> |
472 |
[% END %] |
473 |
[% END %] |
473 |
</ul> |
474 |
</ul> |
474 |
[% END %] |
475 |
[% END %] |
Lines 476-482
Link Here
|
476 |
<h4>Items found on other rotas:</h4> |
477 |
<h4>Items found on other rotas:</h4> |
477 |
<ul> |
478 |
<ul> |
478 |
[% FOREACH item_on_other IN barcode_status.on_other %] |
479 |
[% FOREACH item_on_other IN barcode_status.on_other %] |
479 |
<li>[% item_on_other.biblio.title %]</li> |
480 |
<li>[% item_on_other.biblio.title | html %]</li> |
480 |
[% END %] |
481 |
[% END %] |
481 |
</ul> |
482 |
</ul> |
482 |
[% END %] |
483 |
[% END %] |
Lines 486-503
Link Here
|
486 |
<fieldset> |
487 |
<fieldset> |
487 |
<legend>Select items to move to this rota:</legend> |
488 |
<legend>Select items to move to this rota:</legend> |
488 |
[% FOREACH item_on_other IN barcode_status.on_other %] |
489 |
[% FOREACH item_on_other IN barcode_status.on_other %] |
489 |
<li><input type="checkbox" name="move_item" value="[% item_on_other.itemnumber %]"> [% item_on_other.biblio.title %] (Currently on "[% item_on_other.stockrotationitem.stage.rota.title %]")</li> |
490 |
<li><input type="checkbox" name="move_item" value="[% item_on_other.itemnumber | html %]"> [% item_on_other.biblio.title | html %] (Currently on "[% item_on_other.stockrotationitem.stage.rota.title | html %]")</li> |
490 |
[% END %] |
491 |
[% END %] |
491 |
|
492 |
|
492 |
</fieldset> |
493 |
</fieldset> |
493 |
<fieldset class="action"> |
494 |
<fieldset class="action"> |
494 |
<input type="submit" value="Save"> |
495 |
<input type="submit" value="Save"> |
495 |
</fieldset> |
496 |
</fieldset> |
496 |
<input type="hidden" name="rota_id" value="[% rota_id %]"> |
497 |
<input type="hidden" name="rota_id" value="[% rota_id | html %]"> |
497 |
<input type="hidden" name="op" value="move_items_to_rota"> |
498 |
<input type="hidden" name="op" value="move_items_to_rota"> |
498 |
</form> |
499 |
</form> |
499 |
[% END %] |
500 |
[% END %] |
500 |
<p><a href="?op=manage_items&rota_id=[% rota_id %]">Return to rota</a></p> |
501 |
<p><a href="?op=manage_items&rota_id=[% rota_id | uri %]">Return to rota</a></p> |
501 |
|
502 |
|
502 |
[% END %] |
503 |
[% END %] |
503 |
</div> |
504 |
</div> |
504 |
- |
|
|