Bugzilla – Attachment 68783 Details for
Bug 19231
No warning of number of attached items when deleting a course
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 19231: No need to pass the size to the template
Bug-19231-No-need-to-pass-the-size-to-the-template.patch (text/plain), 1.93 KB, created by
Jonathan Druart
on 2017-10-27 18:30:21 UTC
(
hide
)
Description:
Bug 19231: No need to pass the size to the template
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2017-10-27 18:30:21 UTC
Size:
1.93 KB
patch
obsolete
>From edfd443b6aa5cac6652fa55e7650bb84ec874f76 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Fri, 27 Oct 2017 15:29:22 -0300 >Subject: [PATCH] Bug 19231: No need to pass the size to the template > >We have the array already, we just need to call .size on it >--- > course_reserves/course-details.pl | 1 - > .../intranet-tmpl/prog/en/modules/course_reserves/course-details.tt | 3 ++- > 2 files changed, 2 insertions(+), 2 deletions(-) > >diff --git a/course_reserves/course-details.pl b/course_reserves/course-details.pl >index a9ffe2c421..af1eb62337 100755 >--- a/course_reserves/course-details.pl >+++ b/course_reserves/course-details.pl >@@ -60,7 +60,6 @@ my $course_reserves = GetCourseReserves( > $template->param( > course => $course, > course_reserves => $course_reserves, >- count => scalar @$course_reserves, > ); > > output_html_with_http_headers $cgi, $cookie, $template->output; >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 1600824827..29f0132fb3 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 >@@ -23,9 +23,10 @@ > }); > > $("#delete_course").click(function(){ >+ [% SET count = course_reserves.size %] > [% IF count == 1 %] > return confirmDelete(_("Are you sure you want to delete this course? There is [% count %] attached item.") ); >- [% ELSIF count != 1 && count > 0 %] >+ [% ELSIF count > 1 %] > return confirmDelete(_("Are you sure you want to delete this course? There are [% count %] attached items.") ); > [% ELSE %] > return confirmDelete(_("Are you sure you want to delete this course?")); >-- >2.11.0
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 19231
:
66679
|
67069
|
67071
|
68726
| 68783