Commit b5dd9e67 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Make a team and group boxes smaller on dashboard

parent ca752e64
...@@ -12,4 +12,8 @@ class UserTeamUserRelationship < ActiveRecord::Base ...@@ -12,4 +12,8 @@ class UserTeamUserRelationship < ActiveRecord::Base
def user_name def user_name
user.name user.name
end end
def access_human
UsersProject.access_roles.invert[permission]
end
end end
.groups_box .ui-box
%h5.title %h5.title
Groups Groups
%small %small
...@@ -13,8 +13,6 @@ ...@@ -13,8 +13,6 @@
%li %li
= link_to group_path(id: group.path), class: dom_class(group) do = link_to group_path(id: group.path), class: dom_class(group) do
%strong.well-title= truncate(group.name, length: 35) %strong.well-title= truncate(group.name, length: 35)
%span.arrow %span.right.light
&rarr; - if group.owner == current_user
%span.last_activity %i.icon-wrench
%strong Projects:
%span= current_user.authorized_projects.where(namespace_id: group.id).count
.teams_box .ui-box
%h5.title %h5.title
Teams Teams
%small %small
...@@ -12,10 +12,9 @@ ...@@ -12,10 +12,9 @@
%li %li
= link_to team_path(id: team.path), class: dom_class(team) do = link_to team_path(id: team.path), class: dom_class(team) do
%strong.well-title= truncate(team.name, length: 35) %strong.well-title= truncate(team.name, length: 35)
%span.arrow %span.right.light
&rarr; - if team.owner == current_user
%span.last_activity %i.icon-wrench
%strong Projects: - tm = current_user.user_team_user_relationships.find_by_user_team_id(team.id)
%span= "#{team.projects.count}, " - if tm
%strong Members: = tm.access_human
%span= team.members.count
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