aboutsummaryrefslogtreecommitdiffstats
path: root/templates/web/default/admin/bodies.html
diff options
context:
space:
mode:
Diffstat (limited to 'templates/web/default/admin/bodies.html')
-rw-r--r--templates/web/default/admin/bodies.html103
1 files changed, 63 insertions, 40 deletions
diff --git a/templates/web/default/admin/bodies.html b/templates/web/default/admin/bodies.html
index a1555cac9..c0824521e 100644
--- a/templates/web/default/admin/bodies.html
+++ b/templates/web/default/admin/bodies.html
@@ -2,49 +2,72 @@
[% INCLUDE 'admin/edit-league.html' %]
-<table cellspacing="0" cellpadding="2" border="1">
- <tr>
- <th>[% loc('Name') %]</th>
+[% IF bodies.size == 0 %]
+ <p class="fms-admin-info">
+ [% loc('Currently no bodies have been created.') %]
+ <br>
+ [% loc('You need to add bodies (such as councils or departments) so that you can then add
+ the categories of problems they can handle (such as potholes or streetlights) and the
+ contacts (such as an email address) to which reports are sent.') %]
+ </p>
+[% ELSE %]
+ <table cellspacing="0" cellpadding="2" border="1">
+ <tr>
+ <th>[% loc('Name') %]</th>
+ [% IF c.cobrand.moniker == 'zurich' %]
+ <th>[% loc('Email') %]</th>
+ <th>[% loc('Deleted') %]</th>
+ [% ELSE %]
+ <th>[% loc('Category') %]</th>
+ [% END %]
+ </tr>
+ [%- FOREACH body IN bodies %]
+ [%- SET id = body.id %]
+ [% NEXT IF c.cobrand.moniker == 'zurich' AND admin_type == 'dm' AND (body.parent OR body.bodies) %]
+ <tr[% IF c.cobrand.moniker == 'zurich' AND body.deleted %] class="muted"[% END %]>
+ <td>
+ [% IF c.cobrand.moniker == 'zurich' %]
+ [% FILTER repeat(4*body.api_key) %]&nbsp;[% END %]
+ [% IF admin_type == 'super' %]
+ <a href="[% c.uri_for( 'body', id ) %]">[% body.name %]</a>
+ [% ELSE %]
+ [% body.name %]
+ [% END %]
+ [% ELSE %] [%# not Zurich: all bodies should be links %]
+ <a href="[% c.uri_for( 'body', id ) %]">[% body.name %]</a>
+ [%- ', ' _ body.parent.name IF body.parent -%]
+ [% END %]
+ </td>
[% IF c.cobrand.moniker == 'zurich' %]
- <th>[% loc('Email') %]</th>
+ <td>[% body.endpoint %]</td>
+ <td>[% IF body.deleted %]Yes[% END %]</td>
[% ELSE %]
- <th>[% loc('Category') %]</th>
- [% END %]
- </tr>
-[%- FOREACH body IN bodies %]
- [%- SET id = body.id %]
- [% NEXT IF c.cobrand.moniker == 'zurich' AND admin_type == 'dm' AND (body.parent OR body.bodies) %]
- <tr>
- <td>
- [% IF c.cobrand.moniker == 'zurich' %]
- [% FILTER repeat(4*body.api_key) %]&nbsp;[% END %]
- [% END %]
- <a href="[% c.uri_for( 'body', id ) %]">[% body.name %]</a>
- [% IF c.cobrand.moniker != 'zurich' %]
- [%- ', ' _ body.parent.name IF body.parent -%]
+ <td>
+ [% IF counts.$id %]
+ [% tprintf( loc('%d addresses'), counts.$id.c) IF c.cobrand.moniker != 'emptyhomes' %]
+ [% IF counts.$id.deleted %]
+ (1+ deleted)
+ [% ELSIF counts.$id.confirmed != counts.$id.c %]
+ (some unconfirmed)
+ [% END %]
+ [% ELSE %]
+ no categories
[% END %]
- </td>
- [% IF c.cobrand.moniker == 'zurich' %]
- <td>[% body.endpoint %]</td>
- [% ELSE %]
- <td>
- [% IF counts.$id %]
- [% tprintf( loc('%d addresses'), counts.$id.c) IF c.cobrand.moniker != 'emptyhomes' %]
- [% IF counts.$id.deleted %]
- (1+ deleted)
- [% ELSIF counts.$id.confirmed != counts.$id.c %]
- (some unconfirmed)
- [% END %]
- [% ELSE %]
- no categories
- [% END %]
- </td>
- [% END %]
- </tr>
-[%- END %]
-</table>
+ </td>
+ [% END %]
+ </tr>
+ [%- END %]
+ </table>
+[% END %]
-<h2>[% loc('Add body') %]</h2>
-[% INCLUDE 'admin/body-form.html', body='' %]
+[% IF c.cobrand.moniker == 'zurich' %]
+ [% IF admin_type == 'super' %]
+ <h2>[% loc('Add body') %]</h2>
+ [% INCLUDE 'admin/body-form.html', body='' %]
+ [% END %]
+[% ELSE %]
+ <h2>[% loc('Add body') %]</h2>
+ [% INCLUDE 'admin/body-form.html', body='' %]
+[% END %]
[% INCLUDE 'admin/footer.html' %]
4'>304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462