diff --git a/app/models/user_team_user_relationship.rb b/app/models/user_team_user_relationship.rb index 00d12eb..63bdc49 100644 --- a/app/models/user_team_user_relationship.rb +++ b/app/models/user_team_user_relationship.rb @@ -12,4 +12,8 @@ class UserTeamUserRelationship < ActiveRecord::Base def user_name user.name end + + def access_human + UsersProject.access_roles.invert[permission] + end end diff --git a/app/views/dashboard/_groups.html.haml b/app/views/dashboard/_groups.html.haml index dc50bff..f977466 100644 --- a/app/views/dashboard/_groups.html.haml +++ b/app/views/dashboard/_groups.html.haml @@ -1,4 +1,4 @@ -.groups_box +.ui-box %h5.title Groups %small @@ -13,8 +13,6 @@ %li = link_to group_path(id: group.path), class: dom_class(group) do %strong.well-title= truncate(group.name, length: 35) - %span.arrow - → - %span.last_activity - %strong Projects: - %span= current_user.authorized_projects.where(namespace_id: group.id).count + %span.right.light + - if group.owner == current_user + %i.icon-wrench diff --git a/app/views/dashboard/_teams.html.haml b/app/views/dashboard/_teams.html.haml index b047acf..7912175 100644 --- a/app/views/dashboard/_teams.html.haml +++ b/app/views/dashboard/_teams.html.haml @@ -1,4 +1,4 @@ -.teams_box +.ui-box %h5.title Teams %small @@ -12,10 +12,9 @@ %li = link_to team_path(id: team.path), class: dom_class(team) do %strong.well-title= truncate(team.name, length: 35) - %span.arrow - → - %span.last_activity - %strong Projects: - %span= "#{team.projects.count}, " - %strong Members: - %span= team.members.count + %span.right.light + - if team.owner == current_user + %i.icon-wrench + - tm = current_user.user_team_user_relationships.find_by_user_team_id(team.id) + - if tm + = tm.access_human -- libgit2 0.21.2