New project page improved. User profile improved. Show issues, participant on Milestone show page.
This commit is contained in:
parent
af99e4afe1
commit
c9af8e7579
20 changed files with 200 additions and 117 deletions
|
@ -9,6 +9,10 @@ class Milestone < ActiveRecord::Base
|
|||
where("due_date > ? OR due_date IS NULL", Date.today)
|
||||
end
|
||||
|
||||
def participants
|
||||
User.where(:id => issues.map(&:assignee_id))
|
||||
end
|
||||
|
||||
def percent_complete
|
||||
@percent_complete ||= begin
|
||||
total_i = self.issues.count
|
||||
|
|
|
@ -131,6 +131,11 @@ class User < ActiveRecord::Base
|
|||
self.blocked = true
|
||||
save
|
||||
end
|
||||
|
||||
def projects_limit_percent
|
||||
return 100 if projects_limit.zero?
|
||||
(my_own_projects.count.to_f / projects_limit) * 100
|
||||
end
|
||||
end
|
||||
# == Schema Information
|
||||
#
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue