source: LATMOS-Accounts-Web/lib/LATMOS/Accounts/Web/Controller/NetZones.pm @ 884

Last change on this file since 884 was 884, checked in by nanardon, 13 years ago
  • kill Controller.pm, useless
File size: 1.2 KB
Line 
1package LATMOS::Accounts::Web::Controller::NetZones;
2
3use strict;
4use warnings;
5use base 'Catalyst::Controller';
6
7=head1 NAME
8
9LATMOS::Accounts::Web::Controller::Users - Catalyst Controller
10
11=head1 DESCRIPTION
12
13Catalyst Controller.
14
15=head1 METHODS
16
17=cut
18
19
20=head2 index
21
22=cut
23
24sub index : Private {
25    my ( $self, $c ) = @_;
26   
27    $c->stash->{ofilter} = $c->model('AttrFilter', 'netzone');
28    $c->stash->{netzonelist} = [  map { $_->id } @{ $c->stash->{objectslist} } ];
29    $c->stash->{page}{title} = "Liste des zones réseaux";
30}
31
32sub default : LocalPath {
33    my ( $self, $c, undef, $netzonename ) = @_;
34
35    my $base = $c->model('Accounts')->db;
36    $c->stash->{netzone} = $base->get_object('netzone', $netzonename) or do {
37        $c->forward('/no_object');
38        return;
39    };
40    $c->stash->{page}{title} = "Zone réseau :: $netzonename";
41    $c->stash->{netzonename} = $netzonename;
42    $c->stash->{form} = $c->model('AttrForms', 'netzone', $c->stash->{netzone});
43    $c->stash->{form}->set_attrs;
44}
45
46=head1 AUTHOR
47
48Thauvin Olivier
49
50=head1 LICENSE
51
52This library is free software, you can redistribute it and/or modify
53it under the same terms as Perl itself.
54
55=cut
56
571;
Note: See TracBrowser for help on using the repository browser.