added hide feature for project/jobset

This commit is contained in:
Rob Vermaas
2010-06-04 14:43:28 +00:00
parent b25761d7b2
commit 5f7ebaad37
9 changed files with 109 additions and 10 deletions

View File

@ -26,7 +26,7 @@ sub begin :Private {
sub index :Path :Args(0) {
my ($self, $c) = @_;
$c->stash->{template} = 'overview.tt';
$c->stash->{projects} = [$c->model('DB::Projects')->search({}, {order_by => 'name'})];
$c->stash->{projects} = [$c->model('DB::Projects')->search(isAdmin($c) ? {} : {hidden => 0}, {order_by => 'name'})];
$c->stash->{newsItems} = [$c->model('DB::NewsItems')->search({}, { order_by => ['createtime DESC'], rows => 5 })];
}