Bug 23884: Merge strings.inc and browser-strings.inc
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / catalogue / stockrotation.tt
blob26d6604dbc26fd94b70d81103ee1c03fc66c5660
1 [% USE raw %]
2 [% USE Koha %]
3 [% USE Asset %]
4 [% USE Branches %]
5 [% SET footerjs = 1 %]
6 [% INCLUDE 'doc-head-open.inc' %]
7 <title>Koha &rsaquo; Catalog &rsaquo; Stock rotation details for [% INCLUDE 'biblio-title-head.inc' %]</title>
8 [% INCLUDE 'doc-head-close.inc' %]
9 </head>
10 <body id="catalog_stockrotation" class="catalog">
11 [% USE KohaDates %]
12 [% INCLUDE 'header.inc' %]
13 [% INCLUDE 'cat-search.inc' %]
15 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/catalogue/search.pl">Catalog</a>  &rsaquo; Stock rotation details for <i>[% INCLUDE 'biblio-title.inc' %]</i></div>
17 <div class="main container-fluid">
18     <div class="row">
19         <div class="col-sm-10 col-sm-push-2">
20             <main>
22 <div id="catalogue_detail_biblio">
24     [% IF no_op_set %]
25         <h1 class="title">Stock rotation details for [% INCLUDE 'biblio-title.inc' %]</h1>
26         [% IF rotas.count > 0 && items.size > 0 %]
28             <table class="items_table dataTable no-footer" role="grid">
29                 <thead>
30                     <tr>
31                         <th>Barcode</th>
32                         <th>Callnumber</th>
33                         <th>Rota</th>
34                         <th>Rota status</th>
35                         <th>In transit</th>
36                         <th>Stages &amp; duration in days<br>(current stage highlighted)</th>
37                         <th>&nbsp;</th>
38                     </tr>
39                 </thead>
40                 <tbody>
41                     [% FOREACH item IN items %]
42                         <tr>
43                             <td>[% item.bib_item.barcode | html %]</td>
44                             <td>[% item.bib_item.itemcallnumber | html %]</td>
45                             <td>
46                                 [% item.rota.title | html %]
47                             </td>
48                             <td>
49                                 [% IF item.rota %]
50                                     [% IF !item.rota.active %]
51                                         <span class="highlighted-row">
52                                     [% END %]
53                                         [% IF item.rota.active %]
54                                             Active
55                                         [% ELSE %]
56                                             Inactive
57                                         [% END %]
58                                     [% IF !item.rota.active %]
59                                         </span>
60                                     [% END %]
61                                 [% END %]
62                             </td>
63                             <td>
64                                 [% IF item.bib_item.get_transfer %]
65                                     Yes
66                                 [% ELSE %]
67                                     No
68                                 [% END %]
69                             </td>
70                             <td>
71                                 [% FOREACH this_stage IN item.stages %]
72                                     [% IF this_stage.stage_id == item.stockrotationitem.stage.stage_id %]
73                                         <span class="stage highlight_stage">
74                                     [% ELSE %]
75                                         <span class="stage">
76                                     [% END %]
77                                     [% Branches.GetName(this_stage.branchcode_id) | html %] ([% this_stage.duration | html %])
78                                     </span>
79                                     &raquo;
80                                 [% END %]
81                                 [% IF item.stages.size > 0 %]
82                                     <span class="stage">
83                                         [% IF item.rota.cyclical %]
84                                             START
85                                         [% ELSE %]
86                                             END
87                                         [% END %]
88                                     </span>
89                                 [% END %]
90                             </td>
91                             <td class="actions">
92                                 [% IF item.stockrotationitem %]
93                                     [% in_transit = item.bib_item.get_transfer %]
94                                     [% IF !in_transit && item.stages.size > 1 %]
95                                         <a class="btn btn-default btn-xs" href="?op=move_to_next_stage&amp;stage_id=[% item.stockrotationitem.stage.stage_id | uri %]&amp;item_id=[% item.bib_item.id | uri %]&amp;biblionumber=[% biblionumber | uri %]">
96                                     [% ELSE %]
97                                         <a class="btn btn-default btn-xs" disabled>
98                                     [% END %]
99                                         <i class="fa fa-arrow-right"></i>
100                                         Move to next stage
101                                     </a>
102                                     [% IF !in_transit %]
103                                         <a class="btn btn-default btn-xs" href="?op=toggle_in_demand&amp;stage_id=[% item.stockrotationitem.stage.stage_id | uri %]&amp;item_id=[% item.bib_item.id | uri %]&amp;biblionumber=[% biblionumber | uri %]">
104                                     [% ELSE %]
105                                         <a class="btn btn-default btn-xs" disabled>
106                                     [% END %]
107                                         <i class="fa fa-fire"></i>
108                                         [% IF item.stockrotationitem.indemand %]
109                                             Remove "In demand"
110                                         [% ELSE %]
111                                             Add "In demand"
112                                         [% END %]
113                                     </a>
114                                     [% IF !in_transit %]
115                                         <a class="btn btn-default btn-xs" href="?op=confirm_remove_from_rota&amp;stage_id=[% item.stockrotationitem.stage.stage_id | uri %]&amp;item_id=[% item.bib_item.id | uri %]&amp;biblionumber=[% biblionumber | uri %]">
116                                     [% ELSE %]
117                                         <a class="btn btn-default btn-xs" disabled>
118                                     [% END %]
119                                         <i class="fa fa-trash"></i>
120                                         Remove from rota
121                                     </a>
122                                 [% ELSE %]
123                                     <form class="rota_select_form" method="post" enctype="multipart/form-data">
124                                         <select class="item_select_rota" name="rota_id">
125                                             [% FOREACH rota IN rotas %]
126                                                 <option value="[% rota.rota_id | uri %]">[% rota.title | html %]</option>
127                                             [% END %]
128                                         </select>
129                                         <button class="btn btn-default btn-xs" type="submit"><i class="fa fa-plus"></i> Add to rota</button>
130                                         <input type="hidden" name="op" value="add_item_to_rota" />
131                                         <input type="hidden" name="item_id" value="[% item.bib_item.id | uri %]" />
132                                         <input type="hidden" name="biblionumber" value="[% biblionumber | uri %]" />
133                                     </form>
134                                 [% END %]
135                             </td>
136                         </tr>
137                     [% END %]
138                 </tbody>
139             </table>
140         [% END %]
141         [% IF !items || items.size == 0 %]
142             <h1>No physical items for this record</h1>
143         [% END %]
144         [% IF !rotas || rotas.count == 0 %]
145             <h1>There are no rotas with stages assigned</h1>
146         [% END %]
147     [% ELSIF op == 'confirm_remove_from_rota' %]
148         <div class="dialog alert">
149             <h3>Are you sure you want to remove this item from it's rota?</h3>
150             <p>
151                 <a class="btn btn-default btn-xs approve" href="?op=remove_item_from_stage&amp;stage_id=[% stage_id | uri %]&amp;item_id=[% item_id | uri %]&amp;biblionumber=[% biblionumber | uri %]"><i class="fa fa-fw fa-check"></i>Yes</a>
152                 <a class="btn btn-default btn-xs deny" href="?biblionumber=[% biblionumber | uri %]"><i class="fa fa-fw fa-remove"></i>No</a>
153             </p>
154         </div>
155     [% END %]
157 </div>
159             </main>
160         </div> <!-- /.col-sm-10.col-sm-push-2 -->
162         <div class="col-sm-2 col-sm-pull-10">
163             <aside>
164                 [% INCLUDE 'biblio-view-menu.inc' %]
165             </aside>
166         </div> <!-- /.col-sm-2.col-sm-pull-10 -->
167     </div> <!-- /.row -->
169 [% MACRO jsinclude BLOCK %]
170     [% INCLUDE 'strings.inc' %]
171     [% Asset.js("js/browser.js") | $raw %]
172     <script>
173         var browser = KOHA.browser('[% searchid | html %]', parseInt('[% biblionumber | html %]', 10));
174         browser.show();
175     </script>
176 [% END %]
178 [% INCLUDE 'intranet-bottom.inc' %]