Bug 16001 - Use standard message dialog when there are no cities to list
authorOwen Leonard <oleonard@myacpl.org>
Mon, 7 Mar 2016 17:12:40 +0000 (12:12 -0500)
committerBrendan Gallagher <brendan@bywatersolutions.com>
Tue, 31 May 2016 11:44:37 +0000 (11:44 +0000)
If there are no existing cities in Administration -> Cities and Towns,
the message saying so should be in the standard message dialog.

Another minor change: Edit the message to say "There are no cities
defined," which I think reads better in English.

To test you must have no cities and towns defined.

Apply this patch and go to Administration -> Cities and Towns. You
should see a message displayed in a standard "message" style dialog.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Better view, no errors

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/cities.tt

index f6a85ea..a380a45 100644 (file)
         Searching: [% searchfield %]
     [% END %]
 
-    [% IF cities %]
+    [% IF cities.count %]
         <table id="table_cities">
             <thead>
                 <th>City ID</th>
             </tbody>
         </table>
     [% ELSE %]
-        There is no city defined. <a href="/cgi-bin/koha/admin/cities.pl?op=add_form">Create a new city</a>.
+        <div class="dialog message">
+            There are no cities defined. <a href="/cgi-bin/koha/admin/cities.pl?op=add_form">Create a new city</a>.
+        </div>
     [% END %]
 [% END %]