Commit ce1b742b authored by randx's avatar randx

Group: new link on dashboard if admin. Fixed people count

parent 26045d7a
No related merge requests found
......@@ -52,7 +52,7 @@ class GroupsController < ApplicationController
end
def people
@users = group.users
@users = group.users.all
end
protected
......
......@@ -22,6 +22,10 @@ module Account
projects_limit > my_own_projects.count
end
def can_create_group?
is_admin?
end
def last_activity_project
projects.first
end
......
......@@ -3,6 +3,11 @@
Groups
%small
(#{groups.count})
- if current_user.can_create_group?
%span.right
= link_to new_admin_group_path, class: "btn very_small info" do
%i.icon-plus
New Group
%ul.unstyled
- groups.each do |group|
%li.wll
......
......@@ -2,7 +2,7 @@
%h5
People
%small
(#{@users.count})
(#{@users.size})
%ul.unstyled
- @users.each do |user|
%li.wll
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment