summaryrefslogtreecommitdiff
path: root/app/views/shared/groups/_group.html.haml
blob: f4cfa29ae567af76eec79d9de8c9d9a7b23eb5d3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
- group_member = local_assigns[:group_member]
%li
  - if group_member
    .controls.hidden-xs
      - if can?(current_user, :admin_group, group)
        = link_to edit_group_path(group), class: "btn-sm btn btn-grouped" do
          %i.fa.fa-cogs

      = link_to leave_group_group_members_path(group), data: { confirm: leave_group_message(group.name) }, method: :delete, class: "btn-sm btn btn-grouped", title: 'Leave this group' do
        %i.fa.fa-sign-out

  = image_tag group_icon(group), class: "avatar s46 hidden-xs"
  = link_to group.name, group, class: 'group-name'

  - if group_member
    as
    %span #{group_member.human_access}

  %div.light
    #{pluralize(group.projects.count, "project")}, #{pluralize(group.users.count, "user")}