Also hide disabled projects on the overview page by default

This commit is contained in:
Eelco Dolstra
2016-11-01 13:13:59 +01:00
parent 9072adece8
commit 07decd6915
3 changed files with 29 additions and 5 deletions

View File

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