BigW Consortium Gitlab

_group.html.haml 1.06 KB
Newer Older
1
- group_member = local_assigns[:group_member]
2 3 4 5
- css_class = '' unless local_assigns[:css_class]
- css_class += " no-description" if group.description.blank?

%li.group-row{ class: css_class }
6
  - if group_member
Dmitriy Zaporozhets committed
7
    .controls.hidden-xs
8 9 10 11 12 13 14
      - 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

15 16 17
  .stats
    %span
      = icon('home')
18
      = number_with_delimiter(group.projects.count)
19 20 21

    %span
      = icon('users')
22
      = number_with_delimiter(group.users.count)
23

24
  = image_tag group_icon(group), class: "avatar s46 hidden-xs"
25
  = link_to group, class: 'group-name' do
26
    %span.item-title= group.name
27 28 29

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

32 33 34
  - if group.description.present?
    .light
      = markdown(group.description, pipeline: :description)