Bug 40777: Add 'Audit' button in the toolbar
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
parent
b88dd24139
commit
305da27e65
|
|
@ -49,6 +49,7 @@ use Koha::Biblio::ItemGroup::Items;
|
|||
use Koha::Biblio::ItemGroups;
|
||||
use Koha::CoverImages;
|
||||
use Koha::DateUtils;
|
||||
use Koha::Database::DataInconsistency;
|
||||
use Koha::ILL::Requests;
|
||||
use Koha::Items;
|
||||
use Koha::ItemTypes;
|
||||
|
|
@ -591,4 +592,12 @@ $template->param( found1 => scalar $query->param('found1') );
|
|||
|
||||
$template->param( biblio => $biblio );
|
||||
|
||||
if ( $query->param('audit') ) {
|
||||
my @audit_errors = Koha::Database::DataInconsistency->for_biblio($biblio);
|
||||
$template->param(
|
||||
auditing => 1,
|
||||
audit_errors => \@audit_errors,
|
||||
);
|
||||
}
|
||||
|
||||
output_html_with_http_headers $query, $cookie, $template->output;
|
||||
|
|
|
|||
|
|
@ -281,6 +281,11 @@
|
|||
[% END %]
|
||||
[% END %]
|
||||
[% END %]
|
||||
|
||||
<div class="btn-group">
|
||||
<a id="audit_record" class="btn btn-default" href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblionumber | html %]&audit=1" role="button"> <i class="fa-solid fa-stethoscope"></i> Audit </a>
|
||||
</div>
|
||||
|
||||
[% IF ( Koha.Preference('EnableBooking') && CAN_user_circulate_manage_bookings && biblio.items.filter_by_bookable.count ) %]
|
||||
<div class="btn-group"
|
||||
><button id="placbooking" class="btn btn-default" data-bs-toggle="modal" data-bs-target="#placeBookingModal" data-biblionumber="[% biblionumber | html %]"><i class="fa fa-calendar"></i> Place booking</button></div
|
||||
|
|
|
|||
|
|
@ -117,6 +117,19 @@
|
|||
</div>
|
||||
[% END %]
|
||||
|
||||
[% IF auditing %]
|
||||
[% IF audit_errors %]
|
||||
<div class="alert alert-warning">
|
||||
<h1>Errors found</h1>
|
||||
[% FOR error IN audit_errors %]
|
||||
<div class="alert alert-warning">[% error | html %]</div>
|
||||
[% END %]
|
||||
</div>
|
||||
[% ELSE %]
|
||||
<div class="alert alert-info">No data inconsistency found.</div>
|
||||
[% END %]
|
||||
[% END %]
|
||||
|
||||
<div class="page-section">
|
||||
[% XSLTBloc | $raw %]
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue