Bug 24156: move ColumnsSettings to TablesSettings
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / tools / stockrotation.tt
blob754e833e265dbe97f2ea9f185abd9c0318f5894c
1 [% USE raw %]
2 [% USE Asset %]
3 [% USE Koha %]
4 [% USE Branches %]
5 [% USE KohaDates %]
6 [% USE TablesSettings %]
7 [% SET footerjs = 1 %]
8 [% INCLUDE 'doc-head-open.inc' %]
9 <title>Koha &rsaquo; Stock rotation</title>
10 [% INCLUDE 'doc-head-close.inc' %]
11 </head>
13 <body id="tools_stockrotation" class="tools">
14 [% INCLUDE 'header.inc' %]
15 [% INCLUDE 'cat-search.inc' %]
17 <div id="breadcrumbs">
18     <a href="/cgi-bin/koha/mainpage.pl">Home</a>
19     &rsaquo; <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a>
21 [% IF no_op_set %]
22     &rsaquo; Stock rotation
23 [% ELSE %]
24     &rsaquo; <a href="/cgi-bin/koha/tools/stockrotation.pl">Stock rotation</a>
25 [% END %]
27 [% IF (op == 'create_edit_rota' && rota.rota_id) %]
28     &rsaquo; Edit rota
29 [% ELSIF (op == 'create_edit_rota' && !rota.rota_id) %]
30     &rsaquo; Create rota
31 [% ELSIF (op == 'manage_stages') %]
32     &rsaquo; Manage stages
33 [% ELSIF (op == 'create_edit_stage' && stage.id) %]
34     <a href="?op=manage_stages&amp;rota_id=[% rota_id | uri %]">&rsaquo; Manage stages</a>
35     &rsaquo; Edit stage
36 [% ELSIF (op == 'create_edit_stage' && !stage.id) %]
37     <a href="?op=manage_stages&amp;rota_id=[% rota_id | uri %]">&rsaquo; Manage stages</a>
38     &rsaquo; Create stage
39 [% ELSIF (op == 'manage_items') %]
40     &rsaquo; Manage items
41 [% END %]
43 </div>
45 <div class="main container-fluid">
46     <div class="row">
47         <div class="col-sm-10 col-sm-push-2">
48             <main>
50             <div id="stockrotation">
52                 [% IF no_op_set %]
54                     [% INCLUDE 'stockrotation-toolbar.inc' %]
56                     <h2>Stock rotation</h2>
58                     [% IF existing_rotas.size > 0 %]
59                         <table id="stock_rotation" class="rotas_table" role="grid">
60                             <thead>
61                                 <tr>
62                                 <th class="anti-the">Name</th>
63                                 <th>Cyclical</th>
64                                 <th>Active</th>
65                                 <th>Description</th>
66                                 <th>Number of items</th>
67                                 <th class="NoSort noExport">&nbsp;</th>
68                                 </tr>
69                             </thead>
70                             <tbody>
71                                 [% FOREACH rota IN existing_rotas %]
72                                     <tr>
73                                         <td>[% rota.title | html %]</td>
74                                         <td>[% rota.cyclical ? 'Yes' : 'No' | html %]</td>
75                                         <td>[% rota.active ? 'Yes' : 'No' | html %]</td>
76                                         <td>[% rota.description | html %]</td>
77                                         <td>[% rota.stockrotationitems.count | html %]</td>
78                                         <td class="actions">
79                                             <a class="btn btn-default btn-xs" href="?op=create_edit_rota&amp;rota_id=[% rota.rota_id | uri %]">
80                                                 <i class="fa fa-pencil"></i>
81                                                 Edit
82                                             </a>
83                                             <div class="btn-group dropup" role="group">
84                                                 <button type="button" class="btn btn-default btn-xs dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
85                                                     Manage
86                                                     <i class="fa fa-caret-down"></i>
87                                                 </button>
88                                                 <ul class="dropdown-menu pull-right">
89                                                     <li><a href="?op=manage_stages&amp;rota_id=[% rota.rota_id | uri %]">Stages</a></li>
90                                                     [% IF CAN_user_stockrotation_manage_rota_items && rota.stockrotationstages.count > 0 %]
91                                                     <li><a href="?op=manage_items&amp;rota_id=[% rota.rota_id | uri %]">Items</a></li>
92                                                     [% END %]
93                                                 </ul>
94                                             </div>
95                                             <a class="btn btn-default btn-xs" href="?op=toggle_rota&amp;rota_id=[% rota.rota_id | uri %]">
96                                                 <i class="fa fa-power-off"></i>
97                                                 [% IF !rota.active %]
98                                                     Activate
99                                                 [% ELSE %]
100                                                     Deactivate
101                                                 [% END %]
102                                             </a>
103                                         </td>
104                                     </tr>
105                                 [% END %]
106                             </tbody>
107                         </table>
108                     [% END %]
110                 [% ELSIF (op == 'create_edit_rota') %]
112                     [% IF rota.rota_id %]
113                         <h2>Edit "[% rota.title | html %]"</h2>
114                     [% ELSE %]
115                         <h2>Create new rota</h2>
116                     [% END %]
118                     [% IF error == 'invalid_form' %]
119                     <div class="dialog alert">
120                         <h3>There was a problem with your form submission</h3>
121                     </div>
122                     [% END %]
124                     <form id="rota_form" method="post" enctype="multipart/form-data" class="validated">
125                         <fieldset class="rows">
126                             <ol>
127                                 <li>
128                                     <label class="required" for="title">Name:</label>
129                                     <input type="text" id="title" name="title" value="[% rota.title | html %]" required="required" placeholder="Rota name">
130                                     <span class="required">Required</span>
131                                 </li>
132                                 <li>
133                                     <label for="cyclical">Cyclical:</label>
134                                     <select name="cyclical" id="cyclical">
135                                         [% IF rota.cyclical %]
136                                             <option value="1" selected="selected">Yes</option>
137                                             <option value="0">No</option>
138                                         [% ELSE %]
139                                             <option value="1">Yes</option>
140                                             <option value="0" selected="selected">No</option>
141                                         [% END %]
142                                     </select>
143                                 </li>
144                                 <li>
145                                     <label for="description">Description:</label>
146                                     <textarea id="description" name="description" placeholder="Rota description">[% rota.description | html %]</textarea>
147                                 </li>
148                             </ol>
149                         </fieldset>
150                         <fieldset class="action">
151                             <input type="submit" value="Save">
152                             <a href="/cgi-bin/koha/tools/stockrotation.pl" class="cancel">Cancel</a>
153                         </fieldset>
154                         [% IF rota.rota_id %]
155                             <input type="hidden" name="id" value="[% rota.rota_id | html %]">
156                         [% END %]
157                         <input type="hidden" name="op" value="process_rota">
158                     </form>
160                 [% ELSIF (op == 'manage_stages') %]
162                     [% INCLUDE 'stockrotation-toolbar.inc' %]
164                     [% IF error == 'invalid_form' %]
165                     <div class="dialog alert">
166                         <h3>There was a problem with your form submission</h3>
167                     </div>
168                     [% END %]
170                     <h2>Manage <em>[% rota.title | html %]</em> stages</h2>
171                     <div id="ajax_status"
172                         data-saving-msg="Saving changes..."
173                         data-success-msg=""
174                         data-failed-msg="Error: ">
175                         <span id="ajax_saving_msg"></span>
176                         <i id="ajax_saving_icon" class="fa fa-spinner fa-spin"></i>
177                         <i id="ajax_success_icon" class="fa fa-check"></i>
178                         <i id="ajax_failed_icon" class="fa fa-times"></i>
179                         <span id="ajax_success_msg"></span>
180                         <span id="ajax_failed_msg"></span>
181                     </div>
183                     <!-- Add stage modal -->
184                     <div class="modal" id="addStageModal" tabindex="-1" role="dialog" aria-labelledby="addStageLabel">
185                         <form id="stage_form" method="post" enctype="multipart/form-data" class="validated">
186                             <div class="modal-dialog" role="document">
187                                 <div class="modal-content">
188                                     <div class="modal-header">
189                                         <button type="button" class="closebtn" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
190                                         <h4 class="modal-title" id="addStageLabel">Add stage to <em>[% rota.title | html %]</em></h4>
191                                     </div>
192                                     <div class="modal-body">
193                                         <fieldset class="rows">
194                                             <ol>
195                                                 <li>
196                                                     <label class="required" for="branch">Library:</label>
197                                                     <select name="branchcode" id="branch">
198                                                         [% FOREACH branch IN branches %]
199                                                             [% IF branch.branchcode == stage.branchcode_id %]
200                                                                 <option value="[% branch.branchcode | html %]" selected="selected">[% Branches.GetName(branch.branchcode) | html %]</option>
201                                                             [% ELSE %]
202                                                                 <option value="[% branch.branchcode | html %]">[% Branches.GetName(branch.branchcode) | html %]</option>
203                                                             [% END %]
204                                                         [% END %]
205                                                     </select>
206                                                     <span class="required">Required</span>
207                                                 </li>
208                                                 <li>
209                                                     <label class="required" for="duration">Duration:</label>
210                                                     <input type="text" id="duration" name="duration" value="[% stage.duration | html %]" required="required" placeholder="Duration (days)">
211                                                     <span class="required">Required</span>
212                                                 </li>
213                                             </ol>
214                                         </fieldset> <!-- /.rows -->
215                                     </div> <!-- /.modal-body -->
216                                     <div class="modal-footer">
217                                         <input type="hidden" name="stage_id" value="[% stage.id | html %]">
218                                         <input type="hidden" name="rota_id" value="[% rota_id | html %]">
219                                         <input type="hidden" name="op" value="process_stage">
220                                         <button type="submit" class="btn btn-default">Save</button>
221                                         <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
222                                     </div> <!-- /.modal-footer -->
223                                 </div> <!-- /.modal-content -->
224                             </div> <!-- /.modal-dialog -->
225                         </form> <!-- /#stage_form -->
226                     </div> <!-- /#addStageModal -->
228                     [% IF existing_stages.size > 0 %]
229                         <div id="manage_stages">
230                             <div id="manage_stages_help">
231                                 Stages can be re-ordered by using the <i class="drag_handle fa fa-lg fa-bars"></i>handle to drag and drop them to their new position
232                             </div>
233                             <div id="stage_list_headings">
234                                 <span class="stagename">Library</span>
235                                 <span class="stageduration">Duration (days)</span>
236                             </div>
237                             <ul id="sortable_stages" data-rota-id="[% rota.rota_id | html %]">
238                                 [% FOREACH stage IN existing_stages %]
239                                     <li id="stage_[% stage.stage_id | html %]">
240                                         <span data-toggle="tooltip" title="Drag and drop to move this stage to another position" data-placement="right" class="stagename">
241                                             [% IF existing_stages.size > 1 %]
242                                                 <i class="drag_handle fa fa-lg fa-bars"></i>
243                                             [% END %]
244                                             [% Branches.GetName(stage.branchcode_id) | html %]
245                                         </span>
246                                         <span class="stageduration">[% stage.duration | html %]</span>
247                                         <span class="stageactions">
248                                             <a class="btn btn-default btn-xs" href="?op=create_edit_stage&amp;stage_id=[% stage.stage_id | uri %]">
249                                                 <i class="fa fa-pencil"></i> Edit
250                                             </a>
251                                             <a class="btn btn-default btn-xs" href="?op=confirm_delete_stage&amp;stage_id=[% stage.stage_id | uri %]">
252                                                 <i class="fa fa-trash"></i> Delete
253                                             </a>
254                                         </span>
255                                     </li>
256                                 [% END %]
257                             </ul>
258                         </div>
259                     [% ELSE %]
261                         <div class="dialog message">
262                             <h4>This rota has no stages.</h4>
263                             <p><button type="button" data-toggle="modal" data-target="#addStageModal"><i class="fa fa-plus"></i> Add a stage</button></p>
264                         </div>
266                     [% END %]
268                     <p><a href="stockrotation.pl">Return to rotas</a></p>
270                 [% ELSIF (op == 'create_edit_stage') %]
272                     [% IF stage.id %]
273                         <h2>Edit "[% Branches.GetName(stage.branchcode_id) | html %]"</h2>
274                     [% ELSE %]
275                         <h2>Create new stage</h2>
276                     [% END %]
278                     [% IF error == 'invalid_form' %]
279                     <div class="dialog alert">
280                         <h3>There was a problem with your form submission</h3>
281                     </div>
282                     [% END %]
284                     <form id="stage_form" method="post" enctype="multipart/form-data" class="validated">
285                         <fieldset class="rows">
286                             <ol>
287                                 <li>
288                                     <label class="required" for="branch">Library:</label>
289                                     <select name="branchcode" id="branch">
290                                         [% FOREACH branch IN branches %]
291                                             [% IF branch.branchcode == stage.branchcode_id %]
292                                                 <option value="[% branch.branchcode | html %]" selected="selected">[% Branches.GetName(branch.branchcode) | html %]</option>
293                                             [% ELSE %]
294                                                 <option value="[% branch.branchcode | html %]">[% Branches.GetName(branch.branchcode) | html %]</option>
295                                             [% END %]
296                                         [% END %]
297                                     </select>
298                                     <span class="required">Required</span>
299                                 </li>
300                                 <li>
301                                     <label class="required" for="duration">Duration:</label>
302                                     <input type="text" id="duration" name="duration" value="[% stage.duration | html %]" required="required" placeholder="Duration (days)">
303                                     <span class="required">Required</span>
304                                 </li>
305                             </ol>
306                         </fieldset>
307                         <fieldset class="action">
308                             <input type="submit" value="Save">
309                             <a href="/cgi-bin/koha/tools/stockrotation.pl?op=manage_stages&amp;rota_id=[% rota_id | uri %]" class="cancel">Cancel</a>
310                         </fieldset>
311                         <input type="hidden" name="stage_id" value="[% stage.id | html %]">
312                         <input type="hidden" name="rota_id" value="[% rota_id | html %]">
313                         <input type="hidden" name="op" value="process_stage">
314                     </form>
315                 [% ELSIF (op == 'confirm_remove_from_rota') %]
317                     <div class="dialog alert">
318                         <h3>Are you sure you wish to remove this item from it's rota</h3>
319                         <p>
320                             <a class="btn btn-default btn-xs approve" href="?op=remove_item_from_stage&amp;item_id=[% item_id | uri %]&amp;stage_id=[% stage_id | uri %]&amp;rota_id=[% rota_id | uri %]"><i class="fa fa-fw fa-check"></i>Yes</a>
321                             <a class="btn btn-default btn-xs deny" href="?op=manage_items&amp;rota_id=[% rota_id | uri %]"><i class="fa fa-fw fa-remove"></i>No</a>
322                         </p>
323                     </div>
324                 [% ELSIF (op == 'confirm_delete_stage') %]
326                     <div class="dialog alert">
327                         <h3>Are you sure you want to delete this stage?</h3>
328                         [% IF stage.stockrotationitems.count > 0 %]
329                             <p>This stage contains the following item(s):</p>
330                             <ul>
331                                 [% FOREACH item IN stage.stockrotationitems %]
332                                     <li>[% item.itemnumber.biblio.title | html %] (Barcode: [% item.itemnumber.barcode | html %])</li>
333                                 [% END %]
334                             </ul>
335                         [% END %]
336                         <p>
337                             <a class="btn btn-default btn-xs approve" href="?op=delete_stage&amp;stage_id=[% stage.stage_id | uri %]"><i class="fa fa-fw fa-check"></i>Yes</a>
338                             <a class="btn btn-default btn-xs deny" href="?op=manage_stages&amp;rota_id=[% stage.rota.rota_id | uri %]"><i class="fa fa-fw fa-remove"></i>No</a>
339                         </p>
340                     </div>
341                 [% ELSIF (op == 'manage_items') %]
343                     [% INCLUDE 'stockrotation-toolbar.inc' %]
345                     [% IF error %]
346                         <div class="dialog alert">
347                             [% IF error == "item_not_found" %]
348                                 <h3>The item was not found</h3>
349                             [% ELSIF error == "already_on_rota" %]
350                                 <h3>This item is already on this rota</h3>
351                             [% END %]
352                         </div>
353                     [% END %]
355                     <h2>Manage items assigned to <em>[% rota.title | html %]</em></h2>
357                     <!-- Add items modal -->
358                     <div class="modal" id="addItemsModal" tabindex="-1" role="dialog" aria-labelledby="addItemsLabel">
359                         <form id="add_rota_item_form" method="post" enctype="multipart/form-data" class="validated">
360                             <div class="modal-dialog" role="document">
361                                 <div class="modal-content">
362                                     <div class="modal-header">
363                                         <button type="button" class="closebtn" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
364                                         <h4 class="modal-title" id="addItemsLabel">Add item to <em>[% rota.title | html %]</em></h4>
365                                     </div>
366                                     <div class="modal-body">
367                                         <fieldset class="rows">
368                                             <legend>Add an item by barcode</legend>
369                                             <ol>
370                                                 <li>
371                                                     <label for="barcode">Barcode:</label>
372                                                     <input type="text" id="barcode" name="barcode" placeholder="Item barcode" autofocus>
373                                                 </li>
374                                             </ol>
375                                         </fieldset>
376                                         <fieldset class="rows">
377                                             <legend>Use a barcode file</legend>
378                                             <ol>
379                                                 <li>
380                                                     <label for="barcodefile">Barcode file:</label>
381                                                     <input type="file" id="barcodefile" name="barcodefile">
382                                                 </li>
383                                             </ol>
384                                         </fieldset> <!-- /.rows -->
385                                     </div> <!-- /.modal-body -->
386                                     <div class="modal-footer">
387                                         <input type="hidden" name="rota_id" value="[% rota.id | html %]">
388                                         <input type="hidden" name="op" value="add_items_to_rota">
389                                         <button type="submit" class="btn btn-default">Save</button>
390                                         <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
391                                     </div> <!-- /.modal-footer -->
392                                 </div> <!-- /.modal-content -->
393                             </div> <!-- /.modal-dialog -->
394                         </form> <!-- /#dd_rota_item_form -->
395                     </div> <!-- /#addItemsModal -->
397                     [% IF items.count > 0 %]
398                         <table id="stock_rotation_manage_items" class="items_table" role="grid">
399                             <thead>
400                                 <tr>
401                                     <th>Barcode</th>
402                                     <th>Title</th>
403                                     <th>Author</th>
404                                     <th>Call number</th>
405                                     <th class="NoSearch">In transit</th>
406                                     <th class="NoSort noExport">Stages &amp; duration in days<br>(current stage highlighted)</th>
407                                     <th class="NoSort noExport">&nbsp;</th>
408                                 </tr>
409                             </thead>
410                             <tbody>
411                                 [% FOREACH item IN items %]
412                                     <tr>
413                                         <td><a href="/cgi-bin/koha/catalogue/moredetail.pl?itemnumber=[% item.id | uri %]&amp;biblionumber=[% item.itemnumber.biblio.id | uri %]#item[% item.id | uri %]">[% item.itemnumber.barcode | html %]</a></td>
414                                         <td><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% item.itemnumber.biblio.id | uri %]">[% item.itemnumber.biblio.title | html %]</a></td>
415                                         <td>[% item.itemnumber.biblio.author | html %]</td>
416                                         <td>[% item.itemnumber.itemcallnumber | html %]</td>
417                                         <td>[% item.itemnumber.get_transfer ? 'Yes' : 'No' | html %]</td>
418                                         <td>
419                                             [% FOREACH this_stage IN stages %]
420                                                 [% IF this_stage.stage_id == item.stage.stage_id %]
421                                                     <span class="stage highlight_stage">
422                                                 [% ELSE %]
423                                                     <span class="stage">
424                                                 [% END %]
425                                                 [% Branches.GetName(this_stage.branchcode_id) | html %] ([% this_stage.duration | html %])
426                                                 </span>
427                                                 &raquo;
428                                             [% END %]
429                                             [% IF stages.size > 0 %]
430                                                 <span class="stage">[% rota.cyclical ? 'START' : 'END' | html %]</span>
431                                             [% END %]
432                                         </td>
433                                         <td class="actions">
434                                             [% in_transit = item.itemnumber.get_transfer %]
435                                             [% IF !in_transit && stages.size > 1 %]
436                                                 <a class="btn btn-default btn-xs" href="?op=move_to_next_stage&amp;rota_id=[% rota.id | uri %]&amp;item_id=[% item.id | uri %]&amp;stage_id=[% item.stage.stage_id | uri %]">
437                                             [% ELSE %]
438                                                 <a class="btn btn-default btn-xs" disabled>
439                                             [% END %]
440                                                 <i class="fa fa-arrow-right"></i>
441                                                 Move to next stage
442                                             </a>
443                                             [% IF !in_transit %]
444                                                 <a class="btn btn-default btn-xs" href="?op=toggle_in_demand&amp;stage_id=[% item.stage.stage_id | uri %]&amp;item_id=[% item.id | uri %]&amp;rota_id=[% rota.id | uri %]">
445                                             [% ELSE %]
446                                                 <a class="btn btn-default btn-xs" disabled>
447                                             [% END %]
448                                                 <i class="fa fa-fire"></i>
449                                                 [% IF item.indemand %]
450                                                 <span>Remove &quot;In demand&quot;</span>
451                                                 [% ELSE %]
452                                                 <span>Add &quot;In demand&quot;</span>
453                                                 [% END %]
454                                             </a>
455                                             [% IF !in_transit %]
456                                                 <a class="btn btn-default btn-xs" href="?op=confirm_remove_from_rota&amp;stage_id=[% item.stage.stage_id | uri %]&amp;item_id=[% item.id | uri %]&amp;rota_id=[% rota.id | uri %]">
457                                             [% ELSE %]
458                                                 <a class="btn btn-default btn-xs" disabled>
459                                             [% END %]
460                                                 <i class="fa fa-trash"></i>
461                                                 Remove from rota
462                                             </a>
463                                         </td>
464                                     </tr>
465                                 [% END %]
466                             </tbody>
467                         </table>
468                     [% ELSE %]
470                         <div class="dialog message">
471                             <h4>There are no items assigned to this rota.</h4>
472                             <p><button type="button" data-toggle="modal" data-target="#addItemsModal"><i class="fa fa-plus"></i> Add items</button></p>
473                         </div>
475                     [% END %]
477                     <p><a href="stockrotation.pl">Return to rotas</a></p>
479                 [% ELSIF op == 'add_items_to_rota' %]
481                     <div class="dialog message">
482                         <h3>Add items to rota report</h3>
483                     </div>
485                     <div>
486                         [% IF barcode_status.ok.size > 0 %]
487                             <h4>Items added to rota:</h4>
488                             <ul>
489                                 [% FOREACH item_ok IN barcode_status.ok %]
490                                     <li>[% item_ok.biblio.title | html %]</li>
491                                 [% END %]
492                             </ul>
493                         [% END %]
494                         [% IF barcode_status.on_this.size > 0 %]
495                             <h4>Items already on this rota:</h4>
496                             <ul>
497                                 [% FOREACH item_on_this IN barcode_status.on_this %]
498                                     <li>[% item_on_this.biblio.title | html %]</li>
499                                 [% END %]
500                             </ul>
501                         [% END %]
502                         [% IF barcode_status.not_found.size > 0 %]
503                             <h4>Barcodes not found:</h4>
504                             <ul>
505                                 [% FOREACH barcode_not_found IN barcode_status.not_found %]
506                                     <li>[% barcode_not_found | html %]</li>
507                                 [% END %]
508                             </ul>
509                         [% END %]
510                         [% IF barcode_status.on_other.size > 0 %]
511                             <h4>Items found on other rotas:</h4>
512                             <ul>
513                                 [% FOREACH item_on_other IN barcode_status.on_other %]
514                                     <li>[% item_on_other.biblio.title | html %]</li>
515                                 [% END %]
516                             </ul>
517                         [% END %]
518                     </div>
519                     [% IF barcode_status.on_other.size > 0 %]
520                         <form id="add_rota_item_form" method="post" enctype="multipart/form-data">
521                             <fieldset>
522                                 <legend>Select items to move to this rota:</legend>
523                                 [% FOREACH item_on_other IN barcode_status.on_other %]
524                                     <li><input type="checkbox" name="move_item" value="[% item_on_other.itemnumber | html %]"> [% item_on_other.biblio.title | html %] (Currently on &quot;[% item_on_other.stockrotationitem.stage.rota.title | html %]&quot;)</li>
525                                 [% END %]
527                             </fieldset>
528                             <fieldset class="action">
529                                 <input type="submit" value="Save">
530                             </fieldset>
531                             <input type="hidden" name="rota_id" value="[% rota_id | html %]">
532                             <input type="hidden" name="op" value="move_items_to_rota">
533                         </form>
534                     [% END %]
535                     <p><a href="?op=manage_items&amp;rota_id=[% rota_id | uri %]">Return to rota</a></p>
537                 [% END %]
538             </div>
540             </main>
541         </div> <!-- /.col-sm-10.col-sm-push-2 -->
543         <div class="col-sm-2 col-sm-pull-10">
544             <aside>
545                 [% IF ( op == 'manage_stages' || op == 'manage_items' ) %]
546                     <div id="menu">
547                         <ul>
548                             [% IF op == 'manage_stages' %]
549                                 <li class="active">
550                             [% ELSE %]
551                                 <li>
552                             [% END %]
553                                     <a href="/cgi-bin/koha/tools/stockrotation.pl?op=manage_stages&amp;rota_id=[% rota_id | uri %]">Manage stages</a>
554                                 </li>
555                             [% IF op == 'manage_items' %]
556                                 <li class="active">
557                             [% ELSE %]
558                                 <li>
559                             [% END %]
560                                     <a href="/cgi-bin/koha/tools/stockrotation.pl?op=manage_items&amp;rota_id=[% rota_id | uri %]">Manage items</a>
561                             </li>
562                         </ul>
563                     </div>
564                 [% END %]
565                 [% INCLUDE 'tools-menu.inc' %]
566             </aside>
567         </div> <!-- /.col-sm-2.col-sm-pull-10 -->
568     </div> <!-- /.row -->
570 [% MACRO jsinclude BLOCK %]
571     [% Asset.js("js/tools-menu.js") | $raw %]
572     [% INCLUDE 'datatables.inc' %]
573     [% INCLUDE 'columns_settings.inc' %]
574     [% Asset.js("js/pages/stockrotation.js") | $raw %]
575     <script>
576         var stock_rotation_items_columns_settings = [% TablesSettings.GetColumns( 'tools', 'stockrotation', 'stock_rotation_manage_items', 'json' ) | $raw %];
577         var stock_rotation_columns_settings = [% TablesSettings.GetColumns( 'tools', 'stockrotation', 'stock_rotation', 'json' ) | $raw %];
578         $("#addStageModal, #addItemsModal").on("shown.bs.modal", function(){
579             $("#branch, #barcode").focus();
580         });
581     </script>
582 [% END %]
584 [% INCLUDE 'intranet-bottom.inc' %]