diff --git a/app/models/user.rb b/app/models/user.rb index cf42d736058..ccb21a8b204 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -294,12 +294,12 @@ class User < ActiveRecord::Base end def projects_limit_left - projects_limit - owned_projects.count + projects_limit - personal_projects.count end def projects_limit_percent return 100 if projects_limit.zero? - (owned_projects.count.to_f / projects_limit) * 100 + (personal_projects.count.to_f / projects_limit) * 100 end def recent_push project_id = nil diff --git a/app/views/profiles/show.html.haml b/app/views/profiles/show.html.haml index 7ca7583cd32..1ce2556ed09 100644 --- a/app/views/profiles/show.html.haml +++ b/app/views/profiles/show.html.haml @@ -70,9 +70,9 @@ - unless current_user.projects_limit_left > 100 %fieldset %legend - Owned projects: + Personal projects: %small.pull-right - %span= current_user.owned_projects.count + %span= current_user.personal_projects.count of %span= current_user.projects_limit .padded