package LATMOS::Accounts::Web::Controller::Services;

use strict;
use warnings;
use base 'Catalyst::Controller';

=head1 NAME

LATMOS::Accounts::Web::Controller::Users - Catalyst Controller

=head1 DESCRIPTION

Catalyst Controller.

=head1 METHODS

=cut


=head2 index 

=cut

sub index : Private {
    my ( $self, $c ) = @_;
    
    $c->stash->{ofilter} = $c->model('AttrFilter', 'service');
    my $start = $c->req->param('start');
}

sub default : LocalPath {
    my ( $self, $c, undef, $servicename ) = @_;

    my $base = $c->model('Accounts')->db;
    $c->stash->{page}{title} = "Service :: $servicename";
    $c->stash->{service} = $base->get_object('service', $servicename) or do {
        $c->forward('/no_object');
        return;
    };
    $c->stash->{servicename} = $servicename;
    $c->stash->{form} = $c->model('AttrForms', 'services', $c->stash->{service});
    $c->stash->{form}->set_attrs;
}

=head1 AUTHOR

Thauvin Olivier

=head1 LICENSE

This library is free software, you can redistribute it and/or modify
it under the same terms as Perl itself.

=cut

1;
