From 12d1da5af55b9a200fd410e4ebcc3ae1546b9988 Mon Sep 17 00:00:00 2001 From: Aleisha Amohia Date: Wed, 28 Jun 2017 02:29:27 +0000 Subject: [PATCH] Bug 18869: Fixing display of patron clubs tables This patch 1) Hides the club templates table if there are no club templates, shows an appropriate message 2) Hides the clubs table if there are no clubs. Shows an appropriate message for whether templates exist 3) Puts the actions in one column, or a dropdown menu Sponsored-by: Catalyst IT --- .../intranet-tmpl/prog/en/modules/clubs/clubs.tt | 155 ++++++++++----------- 1 file changed, 74 insertions(+), 81 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/clubs/clubs.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/clubs/clubs.tt index 6c90814..a65cd0c 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/clubs/clubs.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/clubs/clubs.tt @@ -15,7 +15,7 @@ "sPaginationType": "four_button", "sDom": 'C<"top pager"ilpf><"#filter_c">tr<"bottom pager"ip>', "aoColumnDefs": [ - { "aTargets": [ -1, -2 ], "bSortable": false, "bSearchable": false }, + { "aTargets": [ -1 ], "bSortable": false, "bSearchable": false }, ] } )); @@ -23,7 +23,7 @@ "sPaginationType": "four_button", "sDom": 'C<"top pager"ilpf><"#filter_c">tr<"bottom pager"ip>', "aoColumnDefs": [ - { "aTargets": [ -1, -2, -3 ], "bSortable": false, "bSearchable": false }, + { "aTargets": [ -1 ], "bSortable": false, "bSearchable": false }, ] } )); }); @@ -107,21 +107,19 @@ [% END %] - - - - - - - - - - - - - - - [% IF club_templates %] + [% IF club_templates %] +
NameDescriptionPublic enrollmentEmail requiredLibrary  
+ + + + + + + + + + + [% FOREACH t IN club_templates %] @@ -141,15 +139,11 @@ [% END %] - - [% END %] - [% ELSE %] - - - - [% END %] - -
NameDescriptionPublic enrollmentEmail requiredLibraryActions
[% t.name %] [% Branches.GetName( t.branchcode ) %] + [% IF CAN_user_clubs_edit_templates %] - + Edit - [% END %] - - [% IF CAN_user_clubs_edit_templates %] Delete @@ -157,15 +151,11 @@
- No club templates defined. -
+ + + [% ELSE %] +
No club templates defined.
+ [% END %]

Clubs

@@ -186,26 +176,23 @@ [% END %] - - - - - - - - - - - - - - - - - - - - [% IF clubs %] + [% IF clubs %] +
NameTemplateDescriptionPublic enrollmentEmail requiredLibraryStart dateEnd dateEnrolled patrons   
+ + + + + + + + + + + + + + + [% FOREACH c IN clubs %] @@ -240,39 +227,45 @@ [% c.club_enrollments.count %] - - [% END %] - [% ELSE %] - - - - [% END %] - -
NameTemplateDescriptionPublic enrollmentEmail requiredLibraryStart dateEnd dateEnrolled patrons 
[% c.name %] - [% IF ( c.club_enrollments.count ) %] - - [% ELSE %] - - [% END %] - Enrollments - - - [% IF CAN_user_clubs_edit_clubs %] - - Edit - - [% END %] - - [% IF CAN_user_clubs_edit_clubs %] - - Delete +
- No clubs defined. -
+ + + [% ELSE %] + [% IF club_templates %] +
No clubs defined.
+ [% ELSE %] +
No clubs defined. A club template must be defined before a club can be defined.
+ [% END %] + [% END %]
-- 2.1.4