Skip to content

Commit

Permalink
Added form to report management
Browse files Browse the repository at this point in the history
  • Loading branch information
kthakore committed Jan 24, 2011
1 parent 7845984 commit 5b0e246
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 4 deletions.
21 changes: 18 additions & 3 deletions implementation/SIMS/SIMS/lib/SIMS/Controller/Report.pm
@@ -1,7 +1,7 @@
package SIMS::Controller::Report;
use Moose;
use namespace::autoclean;

use Data::Dumper;
BEGIN {extends 'Catalyst::Controller'; }

=head1 NAME
Expand All @@ -20,13 +20,28 @@ Catalyst Controller.
=head2 index
=cut
sub base : Chained('/') PathPart('report') CaptureArgs(0) {
my ( $self, $c ) = @_;

$c->session->{original_URI} = $c->request->uri;
my @roles = $c->user->roles();

$c->response->redirect( $c->uri_for('/unauthorized') )
unless ( grep /(g_admin)/, @roles );
}

sub index :Path :Args(0) {
sub index : Chained('base') : PathPart('') : Args(0) {
my ( $self, $c ) = @_;

$c->response->body('Matched SIMS::Controller::Report in Report.');
}

sub add_query : Chained('base') : PathPart('add_query') : Args(0) {
my ( $self, $c ) = @_;

$c->response->body( Dumper $c->request->params() );


}

=head1 AUTHOR
Expand Down
3 changes: 2 additions & 1 deletion implementation/SIMS/SIMS/lib/SIMS/Controller/Root.pm
Expand Up @@ -46,7 +46,8 @@ sub index : Path : Args(0) {
push(
@{$dashboard},
{ src => $c->uri_for('techadmin'), text => 'Manage Users' },
{ src => $c->uri_for('graduateadmin/supervisors'), text => 'Manage Supervisors' }
{ src => $c->uri_for('graduateadmin/supervisors'), text => 'Manage Supervisors' },
{ src => $c->uri_for('report'), text => 'Manage Report' }

);
}
Expand Down

0 comments on commit 5b0e246

Please sign in to comment.