[Collab-qa-commits] r613 - in svnbuildstat/trunk: lib/SvnBuildStat/Controller root/src root/src/teams
goneri-guest at alioth.debian.org
goneri-guest at alioth.debian.org
Wed Dec 19 14:21:21 UTC 2007
Author: goneri-guest
Date: 2007-12-19 14:21:21 +0000 (Wed, 19 Dec 2007)
New Revision: 613
Added:
svnbuildstat/trunk/lib/SvnBuildStat/Controller/Teams.pm
svnbuildstat/trunk/root/src/teams/
svnbuildstat/trunk/root/src/teams/main.tt2
Log:
import of the teams view
Added: svnbuildstat/trunk/lib/SvnBuildStat/Controller/Teams.pm
===================================================================
--- svnbuildstat/trunk/lib/SvnBuildStat/Controller/Teams.pm (rev 0)
+++ svnbuildstat/trunk/lib/SvnBuildStat/Controller/Teams.pm 2007-12-19 14:21:21 UTC (rev 613)
@@ -0,0 +1,40 @@
+package SvnBuildStat::Controller::Teams;
+
+use strict;
+use warnings;
+use base 'Catalyst::Controller';
+
+=head1 NAME
+
+SvnBuildStat::Controller::Packages - Catalyst Controller
+
+=head1 DESCRIPTION
+
+Catalyst Controller.
+
+=head1 METHODS
+
+=cut
+
+
+=head2 index
+
+=cut
+
+sub index : Private {
+ my ( $self, $c ) = @_;
+
+ $c->response->redirect($c->uri_for('list'));
+}
+
+sub list : Local {
+ my ( $self, $c, $repository ) = @_;
+
+ $c->stash->{teams} = [ $c->model('SvnBuildStat::Model::DB::Teamy')->search(undef,{order_by=>"name"}) ];
+
+ $c->stash->{template} = 'teams/main.tt2';
+
+}
+
+
+1;
Added: svnbuildstat/trunk/root/src/teams/main.tt2
===================================================================
--- svnbuildstat/trunk/root/src/teams/main.tt2 (rev 0)
+++ svnbuildstat/trunk/root/src/teams/main.tt2 2007-12-19 14:21:21 UTC (rev 613)
@@ -0,0 +1,15 @@
+[% # This is a TT comment. The '-' at the end "chomps" the newline. You won't -%]
+[% # see this "chomping" in your browser because HTML ignores blank lines, but -%]
+[% # it WILL eliminate a blank line if you view the HTML source. It's purely -%]
+[%- # optional, but both the beginning and the ending TT tags support chomping. -%]
+
+[% # Provide a title to root/lib/site/header -%]
+[% META title = 'Team list' -%]
+
+<table>
+[% FOREACH team IN teams -%]
+<tr>
+<td><a href="[% Catalyst.uri_for('/teams//') _ team.id %]"><strong>[% team.name %]</strong></a></td>
+</tr>
+[% END -%]
+</table>
More information about the Collab-qa-commits
mailing list