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