[861] | 1 | [% db = c.model('Accounts').db %] |
---|
| 2 | <!-- $Id --> |
---|
| 3 | <div style="float: right" id="filter"> |
---|
| 4 | [% INCLUDE 'includes/filter.tt' |
---|
| 5 | formuri = c.uri_for() |
---|
| 6 | otype = 'netzone' |
---|
| 7 | %] |
---|
| 8 | </div> |
---|
| 9 | |
---|
| 10 | [% IF c.req.param('attrval') %] |
---|
| 11 | [% FOREACH netzonename = netzonelist.sort %] |
---|
| 12 | [% IF loop.first %] |
---|
| 13 | <table> |
---|
| 14 | <tr><th colspan="2">[% netztype | html %]</th></tr> |
---|
| 15 | [% END %] |
---|
| 16 | <tr> |
---|
| 17 | <td>[% netzonename | html %]</td> |
---|
| 18 | <td> |
---|
| 19 | <a href="[% c.uri_for('/netzones', netzonename) %]"> |
---|
| 20 | <img src="[% c.uri_for('/static', 'icons', 'icon_edit.png') %]" |
---|
| 21 | height="16" width="16" |
---|
[878] | 22 | alt="[% "edit " _ netzonename | html %]"></a> |
---|
| 23 | </td> |
---|
[861] | 24 | </tr> |
---|
| 25 | [% IF loop.last %] |
---|
| 26 | </table> |
---|
| 27 | [% END %] |
---|
| 28 | [% END %] |
---|
| 29 | [% ELSE %] |
---|
| 30 | |
---|
| 31 | <table border="0"> |
---|
[1064] | 32 | [% FOREACH netztype = [ 'dns', 'reverse', 'dhcp', 'puppet' ] %] |
---|
[861] | 33 | [% netzonelist = db.search_objects('netzone', 'type=' _ netztype) %] |
---|
| 34 | [% FOREACH netzonename = netzonelist.sort %] |
---|
| 35 | [% netzone = db.get_object('netzone', netzonename) %] |
---|
| 36 | [% IF loop.first %] |
---|
| 37 | <tr><th colspan="2">[% netztype | ucfirst | html %]</th></tr> |
---|
| 38 | <tr><th>Nom</th><th>Description</th></tr> |
---|
| 39 | [% END %] |
---|
| 40 | <tr> |
---|
| 41 | <td> |
---|
| 42 | <a href="[% c.uri_for('/netzones', netzonename) %]"> |
---|
| 43 | <img src="[% c.uri_for('/static', 'icons', 'icon_edit.png') %]" |
---|
| 44 | height="16" width="16" |
---|
[879] | 45 | alt="[% "edit " _ netzonename | html %]"></a> |
---|
[861] | 46 | [% netzonename | html %] |
---|
| 47 | </td> |
---|
| 48 | <td> |
---|
| 49 | <span title="[% netzone.get_c_field('description') | html %]"> |
---|
| 50 | [% netzone.get_c_field('description') | truncate(20) | html %] |
---|
| 51 | </span> |
---|
| 52 | </td> |
---|
| 53 | </tr> |
---|
| 54 | [% IF loop.last %] |
---|
| 55 | [% END %] |
---|
| 56 | [% END %] |
---|
| 57 | [% END %] |
---|
| 58 | [% END %] [%# IF %] |
---|
| 59 | </table> |
---|