|
Lines 44-162
Link Here
|
| 44 |
[% IF no_op_set %] |
44 |
[% IF no_op_set %] |
| 45 |
<h1 class="title">Stock rotation details for [% INCLUDE 'biblio-title.inc' %]</h1> |
45 |
<h1 class="title">Stock rotation details for [% INCLUDE 'biblio-title.inc' %]</h1> |
| 46 |
[% IF rotas.count > 0 && items.size > 0 %] |
46 |
[% IF rotas.count > 0 && items.size > 0 %] |
| 47 |
|
47 |
<div class="page-section"> |
| 48 |
<table class="items_table dataTable no-footer" role="grid"> |
48 |
<table class="items_table dataTable no-footer" role="grid"> |
| 49 |
<thead> |
49 |
<thead> |
| 50 |
<tr> |
|
|
| 51 |
<th>Barcode</th> |
| 52 |
<th>Call number</th> |
| 53 |
<th>Rota</th> |
| 54 |
<th>Rota status</th> |
| 55 |
<th>In transit</th> |
| 56 |
<th>Stages & duration in days<br>(current stage highlighted)</th> |
| 57 |
<th> </th> |
| 58 |
</tr> |
| 59 |
</thead> |
| 60 |
<tbody> |
| 61 |
[% FOREACH item IN items %] |
| 62 |
<tr> |
50 |
<tr> |
| 63 |
<td>[% item.bib_item.barcode | html %]</td> |
51 |
<th>Barcode</th> |
| 64 |
<td>[% item.bib_item.itemcallnumber | html %]</td> |
52 |
<th>Call number</th> |
| 65 |
<td> |
53 |
<th>Rota</th> |
| 66 |
[% item.rota.title | html %] |
54 |
<th>Rota status</th> |
| 67 |
</td> |
55 |
<th>In transit</th> |
| 68 |
<td> |
56 |
<th>Stages & duration in days<br>(current stage highlighted)</th> |
| 69 |
[% IF item.rota %] |
57 |
<th> </th> |
| 70 |
[% IF !item.rota.active %] |
58 |
</tr> |
| 71 |
<span class="highlighted-row"> |
59 |
</thead> |
|
|
60 |
<tbody> |
| 61 |
[% FOREACH item IN items %] |
| 62 |
<tr> |
| 63 |
<td>[% item.bib_item.barcode | html %]</td> |
| 64 |
<td>[% item.bib_item.itemcallnumber | html %]</td> |
| 65 |
<td> |
| 66 |
[% item.rota.title | html %] |
| 67 |
</td> |
| 68 |
<td> |
| 69 |
[% IF item.rota %] |
| 70 |
[% IF !item.rota.active %] |
| 71 |
<span class="highlighted-row"> |
| 72 |
[% END %] |
| 73 |
[% IF item.rota.active %] |
| 74 |
<span>Active</span> |
| 75 |
[% ELSE %] |
| 76 |
<span>Inactive</span> |
| 77 |
[% END %] |
| 78 |
[% IF !item.rota.active %] |
| 79 |
</span> |
| 80 |
[% END %] |
| 72 |
[% END %] |
81 |
[% END %] |
| 73 |
[% IF item.rota.active %] |
82 |
</td> |
| 74 |
<span>Active</span> |
83 |
<td> |
|
|
84 |
[% IF item.bib_item.get_transfer %] |
| 85 |
<span>Yes</span> |
| 86 |
[% ELSE %] |
| 87 |
<span>No</span> |
| 88 |
[% END %] |
| 89 |
</td> |
| 90 |
<td> |
| 91 |
[% FOREACH this_stage IN item.stages %] |
| 92 |
[% IF this_stage.stage_id == item.stockrotationitem.stage.stage_id %] |
| 93 |
<span class="stage highlight_stage"> |
| 75 |
[% ELSE %] |
94 |
[% ELSE %] |
| 76 |
<span>Inactive</span> |
95 |
<span class="stage"> |
| 77 |
[% END %] |
96 |
[% END %] |
| 78 |
[% IF !item.rota.active %] |
97 |
[% Branches.GetName(this_stage.branchcode_id) | html %] ([% this_stage.duration | html %]) |
| 79 |
</span> |
98 |
</span> |
|
|
99 |
» |
| 80 |
[% END %] |
100 |
[% END %] |
| 81 |
[% END %] |
101 |
[% IF item.stages.size > 0 %] |
| 82 |
</td> |
|
|
| 83 |
<td> |
| 84 |
[% IF item.bib_item.get_transfer %] |
| 85 |
<span>Yes</span> |
| 86 |
[% ELSE %] |
| 87 |
<span>No</span> |
| 88 |
[% END %] |
| 89 |
</td> |
| 90 |
<td> |
| 91 |
[% FOREACH this_stage IN item.stages %] |
| 92 |
[% IF this_stage.stage_id == item.stockrotationitem.stage.stage_id %] |
| 93 |
<span class="stage highlight_stage"> |
| 94 |
[% ELSE %] |
| 95 |
<span class="stage"> |
102 |
<span class="stage"> |
|
|
103 |
[% IF item.rota.cyclical %] |
| 104 |
START |
| 105 |
[% ELSE %] |
| 106 |
END |
| 107 |
[% END %] |
| 108 |
</span> |
| 96 |
[% END %] |
109 |
[% END %] |
| 97 |
[% Branches.GetName(this_stage.branchcode_id) | html %] ([% this_stage.duration | html %]) |
110 |
</td> |
| 98 |
</span> |
111 |
<td class="actions"> |
| 99 |
» |
112 |
[% IF item.stockrotationitem %] |
| 100 |
[% END %] |
113 |
[% in_transit = item.bib_item.get_transfer %] |
| 101 |
[% IF item.stages.size > 0 %] |
114 |
[% IF !in_transit && item.stages.size > 1 %] |
| 102 |
<span class="stage"> |
115 |
<a class="btn btn-default btn-xs" href="?op=move_to_next_stage&stage_id=[% item.stockrotationitem.stage.stage_id | uri %]&item_id=[% item.bib_item.id | uri %]&biblionumber=[% biblionumber | uri %]"> |
| 103 |
[% IF item.rota.cyclical %] |
|
|
| 104 |
START |
| 105 |
[% ELSE %] |
116 |
[% ELSE %] |
| 106 |
END |
117 |
<a class="btn btn-default btn-xs" disabled> |
| 107 |
[% END %] |
118 |
[% END %] |
| 108 |
</span> |
119 |
<i class="fa fa-arrow-right"></i> |
| 109 |
[% END %] |
120 |
Move to next stage |
| 110 |
</td> |
121 |
</a> |
| 111 |
<td class="actions"> |
122 |
[% IF !in_transit %] |
| 112 |
[% IF item.stockrotationitem %] |
123 |
<a class="btn btn-default btn-xs" href="?op=toggle_in_demand&stage_id=[% item.stockrotationitem.stage.stage_id | uri %]&item_id=[% item.bib_item.id | uri %]&biblionumber=[% biblionumber | uri %]"> |
| 113 |
[% in_transit = item.bib_item.get_transfer %] |
|
|
| 114 |
[% IF !in_transit && item.stages.size > 1 %] |
| 115 |
<a class="btn btn-default btn-xs" href="?op=move_to_next_stage&stage_id=[% item.stockrotationitem.stage.stage_id | uri %]&item_id=[% item.bib_item.id | uri %]&biblionumber=[% biblionumber | uri %]"> |
| 116 |
[% ELSE %] |
| 117 |
<a class="btn btn-default btn-xs" disabled> |
| 118 |
[% END %] |
| 119 |
<i class="fa fa-arrow-right"></i> |
| 120 |
Move to next stage |
| 121 |
</a> |
| 122 |
[% IF !in_transit %] |
| 123 |
<a class="btn btn-default btn-xs" href="?op=toggle_in_demand&stage_id=[% item.stockrotationitem.stage.stage_id | uri %]&item_id=[% item.bib_item.id | uri %]&biblionumber=[% biblionumber | uri %]"> |
| 124 |
[% ELSE %] |
| 125 |
<a class="btn btn-default btn-xs" disabled> |
| 126 |
[% END %] |
| 127 |
<i class="fa fa-fire"></i> |
| 128 |
[% IF item.stockrotationitem.indemand %] |
| 129 |
Remove "In demand" |
| 130 |
[% ELSE %] |
124 |
[% ELSE %] |
| 131 |
Add "In demand" |
125 |
<a class="btn btn-default btn-xs" disabled> |
| 132 |
[% END %] |
126 |
[% END %] |
| 133 |
</a> |
127 |
<i class="fa fa-fire"></i> |
| 134 |
[% IF !in_transit %] |
128 |
[% IF item.stockrotationitem.indemand %] |
| 135 |
<a class="btn btn-default btn-xs" href="?op=confirm_remove_from_rota&stage_id=[% item.stockrotationitem.stage.stage_id | uri %]&item_id=[% item.bib_item.id | uri %]&biblionumber=[% biblionumber | uri %]"> |
129 |
Remove "In demand" |
|
|
130 |
[% ELSE %] |
| 131 |
Add "In demand" |
| 132 |
[% END %] |
| 133 |
</a> |
| 134 |
[% IF !in_transit %] |
| 135 |
<a class="btn btn-default btn-xs" href="?op=confirm_remove_from_rota&stage_id=[% item.stockrotationitem.stage.stage_id | uri %]&item_id=[% item.bib_item.id | uri %]&biblionumber=[% biblionumber | uri %]"> |
| 136 |
[% ELSE %] |
| 137 |
<a class="btn btn-default btn-xs" disabled> |
| 138 |
[% END %] |
| 139 |
<i class="fa fa-trash"></i> |
| 140 |
Remove from rota |
| 141 |
</a> |
| 136 |
[% ELSE %] |
142 |
[% ELSE %] |
| 137 |
<a class="btn btn-default btn-xs" disabled> |
143 |
<form class="rota_select_form" method="post" enctype="multipart/form-data"> |
|
|
144 |
<select class="item_select_rota" name="rota_id"> |
| 145 |
[% FOREACH rota IN rotas %] |
| 146 |
<option value="[% rota.rota_id | uri %]">[% rota.title | html %]</option> |
| 147 |
[% END %] |
| 148 |
</select> |
| 149 |
<button class="btn btn-default btn-xs" type="submit"><i class="fa fa-plus"></i> Add to rota</button> |
| 150 |
<input type="hidden" name="op" value="add_item_to_rota" /> |
| 151 |
<input type="hidden" name="item_id" value="[% item.bib_item.id | uri %]" /> |
| 152 |
<input type="hidden" name="biblionumber" value="[% biblionumber | uri %]" /> |
| 153 |
</form> |
| 138 |
[% END %] |
154 |
[% END %] |
| 139 |
<i class="fa fa-trash"></i> |
155 |
</td> |
| 140 |
Remove from rota |
156 |
</tr> |
| 141 |
</a> |
157 |
[% END %] |
| 142 |
[% ELSE %] |
158 |
</tbody> |
| 143 |
<form class="rota_select_form" method="post" enctype="multipart/form-data"> |
159 |
</table> |
| 144 |
<select class="item_select_rota" name="rota_id"> |
160 |
</div> <!-- /.page-section --> |
| 145 |
[% FOREACH rota IN rotas %] |
|
|
| 146 |
<option value="[% rota.rota_id | uri %]">[% rota.title | html %]</option> |
| 147 |
[% END %] |
| 148 |
</select> |
| 149 |
<button class="btn btn-default btn-xs" type="submit"><i class="fa fa-plus"></i> Add to rota</button> |
| 150 |
<input type="hidden" name="op" value="add_item_to_rota" /> |
| 151 |
<input type="hidden" name="item_id" value="[% item.bib_item.id | uri %]" /> |
| 152 |
<input type="hidden" name="biblionumber" value="[% biblionumber | uri %]" /> |
| 153 |
</form> |
| 154 |
[% END %] |
| 155 |
</td> |
| 156 |
</tr> |
| 157 |
[% END %] |
| 158 |
</tbody> |
| 159 |
</table> |
| 160 |
[% END %] |
161 |
[% END %] |
| 161 |
[% IF !items || items.size == 0 %] |
162 |
[% IF !items || items.size == 0 %] |
| 162 |
<h1>No physical items for this record</h1> |
163 |
<h1>No physical items for this record</h1> |
| 163 |
- |
|
|