Fix for Bug 6696, New category button broken when no categories defined
authorOwen Leonard <oleonard@myacpl.org>
Wed, 10 Aug 2011 15:44:37 +0000 (11:44 -0400)
committerChris Cormack <chrisc@catalyst.net.nz>
Sun, 28 Aug 2011 07:31:17 +0000 (19:31 +1200)
commita94a9f745556d42e5018695dbaa70a72129cc993
tree5f5c509b910b11a77c63ad1ed299c75ee6634b28
parente73965c62f3895d5bdf5ad0a52c89e54e248f8f1
Fix for Bug 6696, New category button broken when no categories defined

The javascript tablesorter will trigger an error if we try
to apply it to a table with no <tbody>. That error prevented
the YUI button script to complete properly, hence the broken
button.

This patch hides the table in cases where there are no
categories and displays an error message instead.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
- Deleted all patron categories and checked button was broken
- Applied patch and checked again - button shows up
- Nice: There is a note now that you have to create categories

Signed-off-by: Ian Walls <ian.walls@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
koha-tmpl/intranet-tmpl/prog/en/modules/admin/categorie.tt