Bug 16532: Groups showing empty tables if no groups defined
authorAleisha <aleishaamohia@hotmail.com>
Tue, 17 May 2016 05:04:08 +0000 (05:04 +0000)
committerBrendan Gallagher <brendan@bywatersolutions.com>
Tue, 31 May 2016 09:04:09 +0000 (09:04 +0000)
EDIT: Same change for libraries

To test:
1) Go to Admin -> Libraries and Groups
2) Notice empty tables if nothing defined
3) Apply patch and refresh page
4) Empty tables should not show
5) Add a new group
6) Confirm table shows correctly

Sponsored-by: Catalyst IT
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
koha-tmpl/intranet-tmpl/prog/en/modules/admin/branches.tt

index b698a86..77356ac 100644 (file)
@@ -218,7 +218,7 @@ tinyMCE.init({
 
 [% IF op == 'list' %]
     <h3>Libraries</h3>
-    [% IF libraries %]
+    [% IF libraries.count %]
         <table id="branchest">
             <thead>
                 <tr>
@@ -283,7 +283,7 @@ tinyMCE.init({
     [% IF group_types %]
         [% FOREACH group_type IN group_types %]
             <h3>[% IF group_type.categorytype == 'properties' %]Properties[% ELSIF group_type.categorytype == 'searchdomain' %]Search domain[% END %]</h3>
-            [% IF group_type.categories %]
+            [% IF group_type.categories.size %]
                 <table>
                     <thead>
                         <tr>