Bug 9877: Followup: FIX if the table is empty.
authorJonathan Druart <jonathan.druart@biblibre.com>
Wed, 27 Mar 2013 15:02:36 +0000 (16:02 +0100)
committerJared Camins-Esakov <jcamins@cpbibliography.com>
Wed, 3 Apr 2013 10:16:15 +0000 (06:16 -0400)
If there is no data, we don't display the table.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgets.tt

index 6bd3606..95e4f8f 100644 (file)
 
 [% INCLUDE 'budgets-active-currency.inc' %]
 
+[% IF ( budget ) %]
+
 <table id="budgeth">
     <thead>
         <tr>
     </tr>
     </tfoot>
     <tbody>
-    [% IF ( budget ) %]
         [% FOREACH budge IN budget %]
     [% IF ( budge.toggle ) %]
     <tr id="node-[% budge.budget_id %]" class="highlight[% IF ( budge.budget_parent_id ) %] child-of-node-[% budge.budget_parent_id %][% END %] tooltiped">
         </td>
     [% END %]
     </tr>
-        [% END %]
-    [% ELSE %]
-        <tr><td>No fund found</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td class="tooltipcontent">&nbsp;</td><td>&nbsp;</td></tr>
     [% END %]
     </tbody>
 </table>
 
+[% ELSE %]
+    No fund found
+[% END %]
+
 [% IF ( pagination_bar ) %]<div class="pages">[% pagination_bar %]</div>[% END %]
 [% END %] <!-- else -->