Bug 19231: No need to pass the size to the template
[koha_ffzg] / koha-tmpl / intranet-tmpl / prog / en / modules / course_reserves / course-details.tt
index 1600824..29f0132 100644 (file)
         });
 
         $("#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?"));