dashboard

This commit is contained in:
gitlabhq 2011-10-19 16:25:22 +03:00
parent 85265b1bac
commit 69e0ea6265
4 changed files with 39 additions and 13 deletions

View file

@ -64,11 +64,11 @@ class ProjectsController < ApplicationController
@date = case params[:view]
when "week" then Date.today - 7.days
else Date.today
end
end.at_beginning_of_day
@heads = @project.repo.heads
@commits = @heads.map do |h|
@project.repo.log(h.name, nil, :since => @date - 1.day)
@project.repo.log(h.name, nil, :since => @date)
end.flatten.uniq { |c| c.id }
@commits.sort! do |x, y|