* Sort releases.

This commit is contained in:
Eelco Dolstra 2009-11-04 17:17:44 +00:00
parent 56754b1817
commit 2bcedde1c8
3 changed files with 6 additions and 3 deletions

View file

@ -213,7 +213,8 @@ sub create_view : Chained('project') PathPart('create-view') Args(0) {
sub releases : Chained('project') PathPart('releases') Args(0) {
my ($self, $c) = @_;
$c->stash->{template} = 'releases.tt';
$c->stash->{releases} = [$c->stash->{project}->releases->all];
$c->stash->{releases} = [$c->stash->{project}->releases->search({},
{order_by => ["timestamp DESC"]})];
}

View file

@ -21,6 +21,8 @@ sub release : Chained('/') PathPart('release') CaptureArgs(2) {
sub view : Chained('release') PathPart('') Args(0) {
my ($self, $c) = @_;
$c->stash->{template} = 'release.tt';
$c->stash->{members} = [$c->stash->{release}->releasemembers->search({},
{order_by => ["description"]})];
}

View file

@ -9,13 +9,13 @@ class="smallLink" href="[% c.uri_for('/release' project.name release.name "edit"
<p><em>Released on [% INCLUDE renderDateTime timestamp =
release.timestamp %].</em></p>
[% IF !release.releasemembers %]
[% IF !members %]
<p><em>No builds have been added to this release yet.</em></p>
[% ELSE %]
[% FOREACH m IN release.releasemembers %]
[% FOREACH m IN members %]
<h2>
<a href="[% c.uri_for('/build' m.build.id) %]">