Bugzilla – Attachment 191389 Details for
Bug 41570
Tidy kohaTable block - course_reserves
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 41570: Tidy kohaTable - course_reserves/course-details.tt
Bug-41570-Tidy-kohaTable---coursereservescourse-de.patch (text/plain), 2.42 KB, created by
Owen Leonard
on 2026-01-13 19:43:42 UTC
(
hide
)
Description:
Bug 41570: Tidy kohaTable - course_reserves/course-details.tt
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2026-01-13 19:43:42 UTC
Size:
2.42 KB
patch
obsolete
>From 22c7565d772987a908164d89ac9c022e273bffd3 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Thu, 8 Jan 2026 12:36:50 +0100 >Subject: [PATCH] Bug 41570: Tidy kohaTable - course_reserves/course-details.tt > >Signed-off-by: Owen Leonard <oleonard@myacpl.org> >--- > .../modules/course_reserves/course-details.tt | 17 +++++++++-------- > 1 file changed, 9 insertions(+), 8 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-details.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-details.tt >index f0002c63139..7705cf1c048 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-details.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-details.tt >@@ -362,6 +362,14 @@ > [% INCLUDE 'datatables.inc' %] > <script> > var table_settings = [% TablesSettings.GetTableSettings( 'coursereserves', 'reserves', 'course_reserves_table', 'json' ) | $raw %]; >+ const course_reserves_size = [% course_reserves.size || 0 | html %] >+ const i18n = { >+ are_you_sure_items: [% I18N.tnx("Are you sure you want to delete this course? There is one attached item.", "Are you sure you want to delete this course? There are {count} attached items.", course_reserves_size, { count: course_reserves_size}) | html %], >+ are_you_sure_no_item: [% I18N.t("Are you sure you want to delete this course?") | html %], >+ }; >+ </script> >+ >+ <script> > $(document).ready(function(){ > > $("#delete_course_button").on( 'click', function(e){ >@@ -394,14 +402,7 @@ > }); > > $("#delete_course").click(function(){ >- [% SET count = course_reserves.size || 0 %] >- [% IF count == 1 %] >- return confirmDelete(_("Are you sure you want to delete this course? There is %s attached item.").format([% count | html %]) ); >- [% ELSIF count > 1 %] >- return confirmDelete(_("Are you sure you want to delete this course? There are %s attached items.").format([% count | html %]) ); >- [% ELSE %] >- return confirmDelete(_("Are you sure you want to delete this course?")); >- [% END %] >+ return confirmDelete(course_reserves_size > 0 ? i18n.are_you_sure_items : i18n.are_you_sure_no_item); > }); > }); > </script> >-- >2.39.5
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 41570
:
191127
|
191128
|
191129
| 191389 |
191390
|
191391
|
191392