diff options
author | franck cuny <franck@lumberjaph.net> | 2010-09-26 10:35:49 +0200 |
---|---|---|
committer | franck cuny <franck@lumberjaph.net> | 2010-09-26 10:35:49 +0200 |
commit | b1f81494f97947f9f50338268beccb0f601d433e (patch) | |
tree | 725a61611c7a050eb0fad37e0861851791b817b7 | |
parent | more css; display a nicer list of projects on main page (diff) | |
download | jitterbug-b1f81494f97947f9f50338268beccb0f601d433e.tar.gz |
sort by days
Diffstat (limited to '')
-rw-r--r-- | lib/jitterbug/Project.pm | 4 | ||||
-rw-r--r-- | views/project/index.tt | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/lib/jitterbug/Project.pm b/lib/jitterbug/Project.pm index db921e7..9695884 100644 --- a/lib/jitterbug/Project.pm +++ b/lib/jitterbug/Project.pm @@ -25,8 +25,10 @@ get '/:project' => sub { push @{$commits->{$d}}, $_; } + my @days = sort {$b cmp $a} keys %$commits; + template 'project/index', - { project => $project, builds => $commits, %$desc }; + { project => $project, days => \@days, builds => $commits, %$desc }; }; get '/:project/feed' => sub { diff --git a/views/project/index.tt b/views/project/index.tt index ff13769..2749989 100644 --- a/views/project/index.tt +++ b/views/project/index.tt @@ -4,7 +4,7 @@ <strong>"<: $description :>"</strong> - :for $builds.keys() -> $day { + :for $days -> $day { <h3 class="builds-day" id="builds-day-<: $day :>"><: $day :></h3> <div class="commits" id="commits-day-<: $day :>"> :for $builds[$day] -> $build { |