Bugzilla – Attachment 187527 Details for
Bug 40777
500 Error: Something went wrong when loading the table Should Exit Cleanly
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 40777: Add 'Audit' button in the toolbar
Bug-40777-Add-Audit-button-in-the-toolbar.patch (text/plain), 3.22 KB, created by
Jonathan Druart
on 2025-10-07 14:18:20 UTC
(
hide
)
Description:
Bug 40777: Add 'Audit' button in the toolbar
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2025-10-07 14:18:20 UTC
Size:
3.22 KB
patch
obsolete
>From 18a7beb5bb2450ae3bb05c9035751adbfc017cd5 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Tue, 7 Oct 2025 16:11:19 +0200 >Subject: [PATCH] Bug 40777: Add 'Audit' button in the toolbar > >--- > catalogue/detail.pl | 9 +++++++++ > .../intranet-tmpl/prog/en/includes/cat-toolbar.inc | 5 +++++ > .../prog/en/modules/catalogue/detail.tt | 13 +++++++++++++ > 3 files changed, 27 insertions(+) > >diff --git a/catalogue/detail.pl b/catalogue/detail.pl >index f8a1fe447ec..d7484f3d8f8 100755 >--- a/catalogue/detail.pl >+++ b/catalogue/detail.pl >@@ -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; >@@ -538,4 +539,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; >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc >index 7b4ac6920fb..44251fc3223 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc >@@ -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 >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt >index 2fd1d4cff86..e60d7f494a4 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt >@@ -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 %] > >-- >2.34.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 40777
:
187526
| 187527 |
187528