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

Last change on this file since 1089 was 1089, checked in by nanardon, 12 years ago
  • various fixes introduce by filter patch
File size: 1.1 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->{page}{title} = "Liste des zones réseaux";
29}
30
31sub default : LocalPath {
32    my ( $self, $c, undef, $netzonename ) = @_;
33
34    my $base = $c->model('Accounts')->db;
35    $c->stash->{netzone} = $base->get_object('netzone', $netzonename) or do {
36        $c->forward('/no_object');
37        return;
38    };
39    $c->stash->{page}{title} = "Zone réseau :: $netzonename";
40    $c->stash->{netzonename} = $netzonename;
41    $c->stash->{form} = $c->model('AttrForms', 'netzone', $c->stash->{netzone});
42    $c->stash->{form}->set_attrs;
43}
44
45=head1 AUTHOR
46
47Thauvin Olivier
48
49=head1 LICENSE
50
51This library is free software, you can redistribute it and/or modify
52it under the same terms as Perl itself.
53
54=cut
55
561;
Note: See TracBrowser for help on using the repository browser.