Bug 35241: Fix markup errors in point of sale template
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / tools / batchMod-del.tt
1 [% USE raw %]
2 [% USE Koha %]
3 [% USE KohaDates %]
4 [% USE Asset %]
5 [% USE Branches %]
6 [% PROCESS 'i18n.inc' %]
7 [% SET footerjs = 1 %]
8 [% INCLUDE 'doc-head-open.inc' %]
9 <title>[% FILTER collapse %]
10     [% IF ( show ) %]
11         [% t("Confirm selection") | html %] &rsaquo;
12     [% END %]
13     [% IF op == 'enqueued' %]
14         [% t("Job enqueued") | html %] &rsaquo;
15     [% END %]
16     [% t("Batch item deletion") | html %] &rsaquo;
17     [% t("Cataloging") | html %] &rsaquo;
18     [% t("Koha") | html %]
19 [% END %]</title>
20 [% INCLUDE 'doc-head-close.inc' %]
21 <!--[if IE]>
22 <style>#selections { display: none; }</style>
23 <![endif]-->
24 </head>
25 <body id="tools_batchMod-del" class="tools">
26 [% WRAPPER 'header.inc' %]
27     [% INCLUDE 'cat-search.inc' %]
28 [% END %]
29
30 [% WRAPPER 'sub-header.inc' %]
31     [% WRAPPER breadcrumbs %]
32         [% WRAPPER breadcrumb_item %]
33             <a href="/cgi-bin/koha/cataloguing/cataloging-home.pl">Cataloging</a>
34         [% END %]
35         [% IF ( show || op == "enqueued") %]
36             [% WRAPPER breadcrumb_item %]
37                 <a href="/cgi-bin/koha/tools/batchMod.pl">Batch item deletion</a>
38             [% END %]
39         [% ELSE %]
40             [% WRAPPER breadcrumb_item bc_active= 1 %]
41                 <span>Batch item deletion</span>
42             [% END %]
43         [% END %]
44         [% IF ( op == 'enqueued' ) %]
45             [% WRAPPER breadcrumb_item bc_active= 1 %]
46                 [% t("Job enqueued") | html %]
47             [% END %]
48         [% END %]
49         [% IF ( show ) %]
50             [% WRAPPER breadcrumb_item bc_active= 1 %]
51                 [% t("Confirm selection") | html %]
52             [% END %]
53         [% END %]
54     [% END #/ WRAPPER breadcrumbs %]
55 [% END #/ WRAPPER sub-header.inc %]
56
57 <div class="main container-fluid">
58
59     <h1>Batch item deletion</h1>
60
61     [% FOREACH message IN messages %]
62       [% IF message.type == 'success' %]
63         <div class="dialog message">
64       [% ELSIF message.type == 'warning' %]
65         <div class="dialog alert">
66       [% ELSIF message.type == 'error' %]
67         <div class="dialog alert" style="margin:auto;">
68       [% END %]
69       [% IF message.code == 'cannot_enqueue_job' %]
70           <span>Cannot enqueue this job.</span>
71       [% END %]
72       [% IF message.error %]
73         <span>(The error was: [% message.error | html %], see the Koha log file for more information).</span>
74       [% END %]
75       </div>
76     [% END %]
77
78
79     [% UNLESS ( action ) %]
80
81     [% IF ( notfoundbarcodes.size ) %]
82         <div class="dialog alert">
83             [% IF ( itemresults ) %]<p>Warning, the following barcodes were not found:</p>[% ELSE %]<p>Warning: no barcodes were found</p>[% END %]
84         </div>
85         <table style="margin:auto;">
86             <thead>
87                 <tr><th>Barcodes not found</th></tr>
88             </thead>
89             <tbody>
90                 [% FOREACH notfoundbarcode IN notfoundbarcodes %]
91                     <tr><td>[% notfoundbarcode |html %]</td></td>
92                 [% END %]
93             </tbody>
94         </table>
95     [% END %] <!-- /notfoundbarcodes -->
96     [% IF ( notfounditemnumbers.size ) %]
97         <div class="dialog alert">
98             [% IF ( itemresults ) %]<p>Warning, the following itemnumbers were not found:</p>[% ELSE %]<p>Warning: no itemnumbers were found</p>[% END %]
99         </div>
100         <table style="margin:auto;">
101             <thead>
102                 <tr><th>Itemnumbers not found</th></tr>
103             </thead>
104             <tbody>
105                 [% FOREACH notfounditemnumber IN notfounditemnumbers %]
106                     <tr><td>[% notfounditemnumber |html %]</td></td>
107                 [% END %]
108             </tbody>
109         </table>
110     [% END %] <!-- /notfounditemnumbers -->
111
112     [% IF cannot_be_deleted.size %]
113         <div class="dialog alert">
114             <p>Warning, the following items cannot be deleted: </p>
115         </div>
116         <table style="margin:auto;">
117             <thead>
118                 <tr><th>Cannot be deleted</th></tr>
119             </thead>
120             <tbody>
121                 [% FOREACH barcode IN cannot_be_deleted %]
122                     <tr><td>[% barcode | html %]</td></td>
123                 [% END %]
124             </tbody>
125         </table>
126     [% END %]
127
128     [% IF ( notfoundbarcodes.size || notfounditemnumbers.size || cannot_be_deleted.size ) && !too_many_items_display && item_loop %]
129         <h4>The following barcodes were found: </h4>
130     [% END %]
131
132
133 <form name="f" action="batchMod.pl" method="post">
134      <input type="hidden" name="biblionumber" id="biblionumber" value="[% biblionumber | html %]" />
135      <input type="hidden" name="op" value="[% op | html %]" />
136      <input type="hidden" name="searchid" value="[% searchid | html %]" />
137      <input type="hidden" name="src" id="src" value="[% src | html %]" />
138      [% IF biblionumber %]
139         <input type="hidden" name="biblionumber" id="biblionumber" value="[% biblionumber | html %]" />
140      [% END %]
141
142 [% IF items.size %]
143     [% PROCESS items_table_batchmod headers => item_header_loop, items => items, checkboxes_delete => 1, display_columns_selection => 1 %]
144 [% END %]
145
146 [% IF ( simple_items_display ) %]
147     <ul>
148     [% FOREACH simple_items_displa IN simple_items_display %]
149         <li>
150             <a href="[% simple_items_displa.itemnumber | url %]">[% simple_items_displa.barcode | html %]</a>
151         </li>
152     [% END %]
153     </ul>
154 [% END %]
155
156
157 [% IF ( show ) %]
158
159 [% IF ( too_many_items_display ) %]
160     <p>Too many items ([% too_many_items_display | html %]) to display individually.</p>
161     [% FOREACH itemnumber IN itemnumbers_array %]
162         <input type="hidden" name="itemnumber" value="[% itemnumber | html %]" />
163     [% END %]
164 [% END %]
165
166     [% IF ( itemresults ) %]
167         <div id="cataloguing_additem_newitem" class="item_edit_form">
168          <input type="hidden" name="op" value="[% op | html %]" />
169          <p>This will delete [% IF ( too_many_items_display ) %]all the[% ELSE %]the selected[% END %] items.</p>
170          <input type="hidden" name="del" value="1" />
171          <input type="checkbox" name="del_records" id="del_records" /> <label for="del_records">Delete records if no items remain.</label>
172
173          <fieldset class="action">
174         [% IF too_many_items_display %]
175             <input type="submit" name="mainformsubmit" class="btn btn-primary" value="Delete ALL submitted items" />
176         [% ELSE %]
177             <input type="submit" name="mainformsubmit" class="btn btn-primary" value="Delete selected items" />
178         [% END %]
179
180         <a href="/cgi-bin/koha/tools/batchMod.pl?del=1" class="cancel">Cancel</a>
181         </fieldset>
182     </div>
183     [% ELSE %]
184     <p><a href="/cgi-bin/koha/tools/batchMod.pl?del=1">Return to batch item deletion</a></p>
185     [% END %]
186     [% END %]
187     </form>
188     [% END %]
189
190
191     [% IF op == 'enqueued' %]
192         <div class="dialog message">
193             <h1>The job has been enqueued!</h1>
194             <p>It will be processed as soon as possible.</p>
195           <p><a href="/cgi-bin/koha/admin/background_jobs.pl?op=view&id=[% job_id | uri %]" title="View detail of the enqueued job">View detail of the enqueued job</a>
196           | <a href="/cgi-bin/koha/tools/batchMod.pl?del=1" title="New batch item deletion">New batch item deletion</a></p>
197         </div>
198
199         <fieldset class="action">
200             [% IF src == 'CATALOGUING' # from catalogue/detail.pl > Delete items in a batch%]
201                 [% IF searchid %]
202                     <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblionumber | uri %]&searchid=[% searchid | uri %]">Return to the record</a>
203                 [% ELSE %]
204                     <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblionumber | uri %]">Return to the record</a>
205                 [% END %]
206             [% ELSIF src %]
207                 <a href="[% src | url %]">Return to where you were</a>
208             [% ELSE %]
209                 <a href="/cgi-bin/koha/tools/batchMod.pl?del=1">Return to batch item deletion</a>
210             [% END %]
211         </fieldset>
212     [% END %]
213
214     </div>
215
216 [% MACRO jsinclude BLOCK %]
217     [% Asset.js("js/tools-menu.js") | $raw %]
218     [% INCLUDE 'datatables.inc' %]
219     [% INCLUDE 'columns_settings.inc' %]
220     [% Asset.js("js/pages/batchMod.js") | $raw %]
221     [% Asset.js("js/browser.js") | $raw %]
222     <script>
223         [% IF searchid %]
224             browser = KOHA.browser('[% searchid | html %]');
225             browser.show_back_link();
226         [% END %]
227     </script>
228 [% END %]
229
230 [% INCLUDE 'intranet-bottom.inc' %]