From aaeec7caaecda1d2817c5e048e506120d6d464af Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Marc=20V=C3=A9ron?= <veron@veron.ch>
Date: Tue, 4 Apr 2017 13:03:04 +0200
Subject: [PATCH] Bug 18375: Better readability of patron category table for
zero ages and fees
In patron category table, this patch displays zero / empty values for ages and
fees with '-' for better readability
To test:
- Go to Home > Administration > Patron categories
- Verify that you have 0 years and/or only years in Age required and Uper age limit colums
- Verify that you have Enrollment and Hold fees of 0.00
- Apply patch
- Verify that such values are replaced by - to enhance table readability
Signed-off-by: Luke Honiss <luke.honiss@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
---
.../prog/en/modules/admin/categories.tt | 24 ++++++++++++++++++----
1 file changed, 20 insertions(+), 4 deletions(-)
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/categories.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/categories.tt
index b28b634..2c2863b 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/categories.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/categories.tt
@@ -386,12 +386,28 @@
until [% category.enrolmentperioddate | $KohaDates %]
[% END %]
</td>
- <td>[% category.dateofbirthrequired %] years</td>
- <td>[% category.upperagelimit %] years</td>
- <td>[% category.enrolmentfee | $Price %]</td>
+ [% IF (category.dateofbirthrequired) %]
+ <td>[% category.dateofbirthrequired %] years</td>
+ [% ELSE %]
+ <td>-</td>
+ [% END %]
+ [% IF (category.upperagelimit) %]
+ <td>[% category.upperagelimit %] years</td>
+ [% ELSE %]
+ <td>-</td>
+ [% END %]
+ [% IF (category.enrolmentfee > 0) %]
+ <td>[% category.enrolmentfee | $Price %]</td>
+ [% ELSE %]
+ <td>-</td>
+ [% END %]
<td>[% IF ( category.overduenoticerequired ) %]Yes[% ELSE %]No[% END %]</td>
<td>[% IF ( category.hidelostitems ) %]Hidden[% ELSE %]Shown[% END %]</td>
- <td>[% category.reservefee | $Price %]</td>
+ [% IF (category.reservefee > 0) %]
+ <td>[% category.reservefee | $Price %]</td>
+ [% ELSE %]
+ <td>-</td>
+ [% END %]
[% IF Koha.Preference('EnhancedMessagingPreferences') %]
<td style="white-space: nowrap; font-size:80%;">
[% SET default_messaging = category.default_messaging %]
--
2.9.3