Lines 378-399
Link Here
|
378 |
<input type="hidden" name="rota_id" value="[% rota_id | html %]"> |
378 |
<input type="hidden" name="rota_id" value="[% rota_id | html %]"> |
379 |
<input type="hidden" name="op" value="cud-process_stage"> |
379 |
<input type="hidden" name="op" value="cud-process_stage"> |
380 |
</form> |
380 |
</form> |
381 |
[% ELSIF (op == 'confirm_remove_from_rota') %] |
|
|
382 |
|
383 |
<div class="alert alert-warning"> |
384 |
<h1>Are you sure you wish to remove this item from its rota</h1> |
385 |
<p> |
386 |
<form id="remove_item_from_stage_[% item_id | html %]_[% rota.rota_id | html %]" method="post" action="/cgi-bin/koha/tools/stockrotation.pl"> |
387 |
[% INCLUDE 'csrf-token.inc' %] |
388 |
<input type="hidden" name="op" value="cud-remove_item_from_stage" /> |
389 |
<input type="hidden" name="item_id" value="[% item_id | html %]" /> |
390 |
<input type="hidden" name="rota_id" value="[% rota_id | html %]" /> |
391 |
<input type="hidden" name="stage_id" value="[% stage_id | html %]" /> |
392 |
<button class="btn btn-default btn-xs approve" type="submit"><i class="fa fa-fw fa-check"></i> Yes</button> |
393 |
</form> |
394 |
<a class="btn btn-default btn-xs deny" href="?op=manage_items&rota_id=[% rota_id | uri %]"><i class="fa fa-fw fa-times"></i> No</a> |
395 |
</p> |
396 |
</div> |
397 |
[% ELSIF (op == 'confirm_delete_rota') %] |
381 |
[% ELSIF (op == 'confirm_delete_rota') %] |
398 |
|
382 |
|
399 |
<div class="alert alert-warning"> |
383 |
<div class="alert alert-warning"> |
Lines 512-523
Link Here
|
512 |
</thead> |
496 |
</thead> |
513 |
<tbody> |
497 |
<tbody> |
514 |
[% FOREACH sritem IN sritems %] |
498 |
[% FOREACH sritem IN sritems %] |
|
|
499 |
[%- SET transfer = sritem.item.get_transfer -%] |
515 |
<tr> |
500 |
<tr> |
516 |
<td><a href="/cgi-bin/koha/catalogue/moredetail.pl?itemnumber=[% sritem.id | uri %]&biblionumber=[% sritem.item.biblio.id | uri %]#item[% sritem.id | uri %]">[% sritem.item.barcode | html %]</a></td> |
501 |
<td><a href="/cgi-bin/koha/catalogue/moredetail.pl?itemnumber=[% sritem.id | uri %]&biblionumber=[% sritem.item.biblio.id | uri %]#item[% sritem.id | uri %]">[% sritem.item.barcode | html %]</a></td> |
517 |
<td><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% sritem.item.biblio.id | uri %]">[% sritem.item.biblio.title | html %]</a></td> |
502 |
<td><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% sritem.item.biblio.id | uri %]">[% sritem.item.biblio.title | html %]</a></td> |
518 |
<td>[% sritem.item.biblio.author | html %]</td> |
503 |
<td>[% sritem.item.biblio.author | html %]</td> |
519 |
<td>[% sritem.item.itemcallnumber | html %]</td> |
504 |
<td>[% sritem.item.itemcallnumber | html %]</td> |
520 |
<td>[% IF ( transfer = sritem.item.get_transfer) %] |
505 |
<td>[% IF ( transfer ) %] |
521 |
[% IF (transfer.reason.match('Stockrotation.*')) %] |
506 |
[% IF (transfer.reason.match('Stockrotation.*')) %] |
522 |
[% IF (transfer.datesent) %] |
507 |
[% IF (transfer.datesent) %] |
523 |
<span class="intransit">In transit from [% Branches.GetName( transfer.frombranch ) | html %] to [% Branches.GetName( transfer.tobranch ) | html %] since [% transfer.datesent | $KohaDates %]</span> |
508 |
<span class="intransit">In transit from [% Branches.GetName( transfer.frombranch ) | html %] to [% Branches.GetName( transfer.tobranch ) | html %] since [% transfer.datesent | $KohaDates %]</span> |
Lines 528-589
Link Here
|
528 |
[% END %] |
513 |
[% END %] |
529 |
</td> |
514 |
</td> |
530 |
<td> |
515 |
<td> |
531 |
[% FOREACH this_stage IN stages %] |
516 |
[%- FOREACH this_stage IN stages -%] |
532 |
[% IF this_stage.stage_id == sritem.stage.stage_id %] |
517 |
[%- IF this_stage.stage_id == sritem.stage.stage_id -%] |
533 |
<span class="stage highlight_stage"> |
518 |
<span class="stage highlight_stage"> |
534 |
[% ELSE %] |
519 |
[%- ELSE -%] |
535 |
<span class="stage"> |
520 |
<span class="stage"> |
536 |
[% END %] |
521 |
[%- END -%] |
537 |
[% Branches.GetName(this_stage.branchcode_id) | html %] ([% this_stage.duration | html %]) |
522 |
[%- Branches.GetName(this_stage.branchcode_id) | html -%] ([%- this_stage.duration | html -%]) |
538 |
</span> |
523 |
</span>» |
539 |
» |
524 |
[%- END -%] |
540 |
[% END %] |
525 |
[%- IF stages.size > 0 -%] |
541 |
[% IF stages.size > 0 %] |
|
|
542 |
<span class="stage">[% rota.cyclical ? 'START' : 'END' | html %]</span> |
526 |
<span class="stage">[% rota.cyclical ? 'START' : 'END' | html %]</span> |
543 |
[% END %] |
527 |
[%- END -%] |
544 |
</td> |
528 |
</td> |
545 |
<td class="actions"> |
529 |
<td class="actions"> |
546 |
[% in_transit = sritem.item.get_transfer %] |
530 |
[%- IF stages.size < 2 -%] |
547 |
[% IF stages.size < 2 %] |
|
|
548 |
<a class="btn btn-default btn-xs" title="Rota has a single stage, advancing will have no effect" disabled> |
531 |
<a class="btn btn-default btn-xs" title="Rota has a single stage, advancing will have no effect" disabled> |
549 |
[% ELSE %] |
532 |
[%- ELSE -%] |
550 |
<form id="move_to_next_stage_[% sritem.id | html %]_[% rota.id | html %]" method="post" action="/cgi-bin/koha/tools/stockrotation.pl"> |
533 |
[%- IF !transfer -%] |
551 |
[% INCLUDE 'csrf-token.inc' %] |
534 |
<a id="move_to_next_stage_[% sritem.id | html %]_[% rota.id | html %]" class="btn btn-default btn-xs submit-form-link" href="#" data-item_id="[% sritem.id | html %]" data-rota_id="[% rota.id | html %]" date-stage_id="[% sritem.stage.stage_id | html %]" data-action="/cgi-bin/koha/tools/stockrotation.pl" data-method="post" data-op="cud-move_to_next_stage"> |
552 |
<input type="hidden" name="op" value="cud-move_to_next_stage" /> |
535 |
[%- ELSE -%] |
553 |
<input type="hidden" name="item_id" value="[% sritem.id | html %]" /> |
536 |
<a id="move_to_next_stage_[% sritem.id | html %]_[% rota.id | html %]" class="btn btn-default btn-xs submit-form-link" href="#" data-item_id="[% sritem.id | html %]" data-rota_id="[% rota.id | html %]" date-stage_id="[% sritem.stage.stage_id | html %]" data-action="/cgi-bin/koha/tools/stockrotation.pl" data-method="post" data-op="cud-move_to_next_stage" title="Item is in transit, it will be directed to new stage when checked in"> |
554 |
<input type="hidden" name="rota_id" value="[% rota.id | html %]" /> |
537 |
[%- END -%] |
555 |
<input type="hidden" name="stage_id" value="[% sritem.stage.stage_id | html %]" /> |
538 |
<i class="fa fa-arrow-right"></i> Move to next stage</a> |
556 |
[% IF !in_transit %] |
539 |
[%- END -%] |
557 |
<button class="btn btn-default btn-xs" type="submit"><i class="fa fa-arrow-right"></i> Move to next stage</button> |
540 |
|
558 |
[% ELSE %] |
541 |
[%- IF !transfer -%] |
559 |
<button class="btn btn-default btn-xs" type="submit" title="Item is in transit, it will be directed to new stage when checked in"><i class="fa fa-arrow-right"></i> Move to next stage</button> |
542 |
<a id="toggle_in_demand_[% sritem.id | html %]_[% rota.id | html %]" class="btn btn-default btn-xs submit-form-link" href="#" data-item_id="[% sritem.id | html %]" data-rota_id="[% rota.id | html %]" date-stage_id="[% sritem.stage.stage_id | html %]" data-action="/cgi-bin/koha/tools/stockrotation.pl" data-method="post" data-op="cud-toggle_in_demand" title="Item is in transit, it will be directed to new stage when checked in"> |
560 |
[% END %] |
543 |
[%- IF sritem.indemand -%] |
561 |
</form> |
544 |
<i class="fa fa-fire"></i> Remove "In demand"</button> |
562 |
[% END %] |
545 |
[%- ELSE -%] |
563 |
|
546 |
<i class="fa fa-fire"></i> Add "In demand"</button> |
564 |
[% IF !in_transit %] |
547 |
[%- END -%] |
565 |
<form id="toggle_in_demand_[% sritem.id | html %]_[% rota.id | html %]" method="post" action="/cgi-bin/koha/tools/stockrotation.pl"> |
548 |
</a> |
566 |
[% INCLUDE 'csrf-token.inc' %] |
549 |
[%- END -%] |
567 |
<input type="hidden" name="op" value="cud-toggle_in_demand" /> |
550 |
|
568 |
<input type="hidden" name="item_id" value="[% sritem.id | html %]" /> |
551 |
[%- IF !transfer -%] |
569 |
<input type="hidden" name="rota_id" value="[% rota.id | html %]" /> |
552 |
<a id="remove_item_from_stage_[% item_id | html %]_[% rota.id | html %]" class="btn btn-default btn-xs submit-form-link" action="/cgi-bin/koha/tools/stockrotation.pl" data-op="cud-remove_item_from_stage" data-item_id="[% sritem.id | html %]" data-stage_id="[% sritem.stage.stage_id | html %]" data-rota_id="[% rota.id | html %]" data-method="post" data-confirmation-msg="[% t('Are you sure you wish to remove this item from its rota?') %]"> |
570 |
<input type="hidden" name="stage_id" value="[% sritem.stage.stage_id | html %]" /> |
553 |
[%- ELSE -%] |
571 |
[% IF sritem.indemand %] |
554 |
<a class="btn btn-default btn-xs" disabled="disabled"> |
572 |
<button class="btn btn-default btn-xs" type="submit"><i class="fa fa-fire"></i> Remove "In demand"</button> |
555 |
[%- END -%] |
573 |
[% ELSE %] |
556 |
<i class="fa fa-trash-can"></i>Remove from rota</a> |
574 |
<button class="btn btn-default btn-xs" type="submit"><i class="fa fa-fire"></i> Add "In demand"</button> |
|
|
575 |
[% END %] |
576 |
</form> |
577 |
[% END %] |
578 |
|
579 |
[% IF !in_transit %] |
580 |
<a class="btn btn-default btn-xs" href="?op=confirm_remove_from_rota&stage_id=[% sritem.stage.stage_id | uri %]&item_id=[% sritem.id | uri %]&rota_id=[% rota.id | uri %]"> |
581 |
[% ELSE %] |
582 |
<a class="btn btn-default btn-xs" disabled> |
583 |
[% END %] |
584 |
<i class="fa fa-trash-can"></i> |
585 |
Remove from rota |
586 |
</a> |
587 |
</td> |
557 |
</td> |
588 |
</tr> |
558 |
</tr> |
589 |
[% END %] |
559 |
[% END %] |
Lines 697-702
Link Here
|
697 |
[% INCLUDE 'columns_settings.inc' %] |
667 |
[% INCLUDE 'columns_settings.inc' %] |
698 |
[% Asset.js( "lib/sortable/Sortable.min.js" ) | $raw %] |
668 |
[% Asset.js( "lib/sortable/Sortable.min.js" ) | $raw %] |
699 |
[% Asset.js("js/pages/stockrotation.js") | $raw %] |
669 |
[% Asset.js("js/pages/stockrotation.js") | $raw %] |
|
|
670 |
[% Asset.js("js/form-submit.js") | $raw %] |
700 |
<script> |
671 |
<script> |
701 |
var stock_rotation_items_table_settings = [% TablesSettings.GetTableSettings( 'tools', 'stockrotation', 'stock_rotation_manage_items', 'json' ) | $raw %]; |
672 |
var stock_rotation_items_table_settings = [% TablesSettings.GetTableSettings( 'tools', 'stockrotation', 'stock_rotation_manage_items', 'json' ) | $raw %]; |
702 |
var stock_rotation_table_settings = [% TablesSettings.GetTableSettings( 'tools', 'stockrotation', 'stock_rotation', 'json' ) | $raw %]; |
673 |
var stock_rotation_table_settings = [% TablesSettings.GetTableSettings( 'tools', 'stockrotation', 'stock_rotation', 'json' ) | $raw %]; |
703 |
- |
|
|