Skip to content

Commit

Permalink
Sort sub-zones on zone pages
Browse files Browse the repository at this point in the history
closes #52
  • Loading branch information
abh committed Feb 19, 2015
1 parent ebd0539 commit 60b19a9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions docs/ntppool/tpl/zone.html
Expand Up @@ -110,9 +110,9 @@ <h4>IP[% ip_version %]</h4>
END;
%]

[% IF zone.zones %]
[% IF zone.children %]
<p>
[% FOR child = zone.zones %]
[% FOR child = zone.children %]
<a href="[% child.url %][% show_servers ? '?show_servers=1' : '' %]">[% child.description %]</a> &#8212; [% child.fqdn %] ([% child.server_count %])<br />

[% END %]
Expand Down
4 changes: 2 additions & 2 deletions lib/NP/Model/Zone.pm
Expand Up @@ -40,9 +40,9 @@ sub graph_path {
return "$rrd_path/graph/" . $file;
}


sub children {
shift->zones;
my $self = shift;
return $self->{_children} ||= [ sort { $a->name cmp $b->name } $self->zones ];
}

sub random_subzone_ids {
Expand Down

0 comments on commit 60b19a9

Please sign in to comment.