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