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