Koha/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batchMod-del.tt
Owen Leonard ff7ad7aaa6
Bug 32046: (follow-up) Accommodate the inclusion of item information
If you have item information configured in the MarcItemFieldsToOrder
system preference, the "Select to import" tab will display a basic item
information form which needs to use the same style as other item edit
forms.

In order to make the CSS in addbiblio.css more generic, I've changed
some styles to use a class, .item_edit_form, instead of an ID. This lets
us have multiple <div class="item_edit_form"> in this template without
duplicating IDs. Other instances of <div
id="cataloguing_additem_newitem"> have haa the .item_edit_form class
added.

To test you must have a staged MARC file which includes items and you
must configure the MarcItemFieldsToOrder preference to map those items
in the ordering interface.

As you follow the previous patch's test plan you'll find that when you
click a checkbox or title to expand the information about that title
you'll see "Item record X" headings following by a properly-styled form.

To confirm that the changes to addbiblio.css are not too far-reaching,
test the other affected pages:

 - Item add/edit
 - Batch item modification
 - Batch item deletion

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-11-23 09:34:04 -03:00

207 lines
7.4 KiB
Text

[% USE raw %]
[% USE Koha %]
[% USE KohaDates %]
[% USE Asset %]
[% USE Branches %]
[% SET footerjs = 1 %]
[% PROCESS 'i18n.inc' %]
[% INCLUDE 'doc-head-open.inc' %]
<title>Batch item deletion &rsaquo; Cataloging &rsaquo; Koha</title>
[% INCLUDE 'doc-head-close.inc' %]
<!--[if IE]>
<style>#selections { display: none; }</style>
<![endif]-->
</head>
<body id="tools_batchMod-del" class="tools">
[% WRAPPER 'header.inc' %]
[% INCLUDE 'cat-search.inc' %]
[% END %]
[% WRAPPER 'sub-header.inc' %]
<nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumb">
<ol>
<li>
<a href="/cgi-bin/koha/mainpage.pl">Home</a>
</li>
<li>
<a href="/cgi-bin/koha/cataloguing/cataloging-home.pl">Cataloging</a>
</li>
<li>
<a href="#" aria-current="page">Batch item deletion</a>
</li>
</ol>
</nav>
[% END %]
<div class="main container-fluid">
<h1>Batch item deletion</h1>
[% FOREACH message IN messages %]
[% IF message.type == 'success' %]
<div class="dialog message">
[% ELSIF message.type == 'warning' %]
<div class="dialog alert">
[% ELSIF message.type == 'error' %]
<div class="dialog alert" style="margin:auto;">
[% END %]
[% IF message.code == 'cannot_enqueue_job' %]
<span>Cannot enqueue this job.</span>
[% END %]
[% IF message.error %]
<span>(The error was: [% message.error | html %], see the Koha log file for more information).</span>
[% END %]
</div>
[% END %]
[% UNLESS ( action ) %]
[% IF ( notfoundbarcodes.size ) %]
<div class="dialog alert">
[% IF ( itemresults ) %]<p>Warning, the following barcodes were not found:</p>[% ELSE %]<p>Warning: no barcodes were found</p>[% END %]
</div>
<table style="margin:auto;">
<thead>
<tr><th>Barcodes not found</th></tr>
</thead>
<tbody>
[% FOREACH notfoundbarcode IN notfoundbarcodes %]
<tr><td>[% notfoundbarcode |html %]</td></td>
[% END %]
</tbody>
</table>
[% END %] <!-- /notfoundbarcodes -->
[% IF ( notfounditemnumbers.size ) %]
<div class="dialog alert">
[% IF ( itemresults ) %]<p>Warning, the following itemnumbers were not found:</p>[% ELSE %]<p>Warning: no itemnumbers were found</p>[% END %]
</div>
<table style="margin:auto;">
<thead>
<tr><th>Itemnumbers not found</th></tr>
</thead>
<tbody>
[% FOREACH notfounditemnumber IN notfounditemnumbers %]
<tr><td>[% notfounditemnumber |html %]</td></td>
[% END %]
</tbody>
</table>
[% END %] <!-- /notfounditemnumbers -->
[% IF cannot_be_deleted.size %]
<div class="dialog alert">
<p>Warning, the following items cannot be deleted: </p>
</div>
<table style="margin:auto;">
<thead>
<tr><th>Cannot be deleted</th></tr>
</thead>
<tbody>
[% FOREACH barcode IN cannot_be_deleted %]
<tr><td>[% barcode | html %]</td></td>
[% END %]
</tbody>
</table>
[% END %]
[% IF ( notfoundbarcodes.size || notfounditemnumbers.size || cannot_be_deleted.size ) && !too_many_items_display && item_loop %]
<h4>The following barcodes were found: </h4>
[% END %]
<form name="f" action="batchMod.pl" method="post">
<input type="hidden" name="biblionumber" id="biblionumber" value="[% biblionumber | html %]" />
<input type="hidden" name="op" value="[% op | html %]" />
<input type="hidden" name="searchid" value="[% searchid | html %]" />
<input type="hidden" name="src" id="src" value="[% src | html %]" />
[% IF biblionumber %]
<input type="hidden" name="biblionumber" id="biblionumber" value="[% biblionumber | html %]" />
[% END %]
[% IF items.size %]
[% PROCESS items_table_batchmod headers => item_header_loop, items => items, checkboxes_delete => 1, display_columns_selection => 1 %]
[% END %]
[% IF ( simple_items_display ) %]
<ul>
[% FOREACH simple_items_displa IN simple_items_display %]
<li>
<a href="[% simple_items_displa.itemnumber | url %]">[% simple_items_displa.barcode | html %]</a>
</li>
[% END %]
</ul>
[% END %]
[% IF ( show ) %]
[% IF ( too_many_items_display ) %]
<p>Too many items ([% too_many_items_display | html %]) to display individually.</p>
[% FOREACH itemnumber IN itemnumbers_array %]
<input type="hidden" name="itemnumber" value="[% itemnumber | html %]" />
[% END %]
[% END %]
[% IF ( itemresults ) %]
<div id="cataloguing_additem_newitem" class="item_edit_form">
<input type="hidden" name="op" value="[% op | html %]" />
<p>This will delete [% IF ( too_many_items_display ) %]all the[% ELSE %]the selected[% END %] items.</p>
<input type="hidden" name="del" value="1" />
<input type="checkbox" name="del_records" id="del_records" /> <label for="del_records">Delete records if no items remain.</label>
<fieldset class="action">
[% IF too_many_items_display %]
<input type="submit" name="mainformsubmit" class="btn btn-primary" value="Delete ALL submitted items" />
[% ELSE %]
<input type="submit" name="mainformsubmit" class="btn btn-primary" value="Delete selected items" />
[% END %]
<a href="/cgi-bin/koha/tools/batchMod.pl?del=1" class="cancel">Cancel</a>
</fieldset>
</div>
[% ELSE %]
<p><a href="/cgi-bin/koha/tools/batchMod.pl?del=1">Return to batch item deletion</a></p>
[% END %]
[% END %]
</form>
[% END %]
[% IF op == 'enqueued' %]
<div class="dialog message">
<p>The job has been enqueued! It will be processed as soon as possible.</p>
<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>
| <a href="/cgi-bin/koha/tools/batchMod.pl?del=1" title="New batch item deletion">New batch item deletion</a></p>
</div>
<fieldset class="action">
[% IF src == 'CATALOGUING' # from catalogue/detail.pl > Delete items in a batch%]
[% IF searchid %]
<a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblionumber | uri %]&searchid=[% searchid | uri %]">Return to the record</a>
[% ELSE %]
<a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblionumber | uri %]">Return to the record</a>
[% END %]
[% ELSIF src %]
<a href="[% src | url %]">Return to where you were</a>
[% ELSE %]
<a href="/cgi-bin/koha/tools/batchMod.pl?del=1">Return to batch item deletion</a>
[% END %]
</fieldset>
[% END %]
</div>
[% MACRO jsinclude BLOCK %]
[% Asset.js("js/tools-menu.js") | $raw %]
[% INCLUDE 'datatables.inc' %]
[% Asset.js("js/pages/batchMod.js") | $raw %]
[% Asset.js("js/browser.js") | $raw %]
<script>
[% IF searchid %]
browser = KOHA.browser('[% searchid | html %]');
browser.show_back_link();
[% END %]
</script>
[% END %]
[% INCLUDE 'intranet-bottom.inc' %]