_group.html.haml 1.23 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's avatar
Dmitriy Zaporozhets committed
7
    .controls.hidden-xs
8
      - if can?(current_user, :admin_group, group)
9 10
        = link_to edit_group_path(group), class: "btn" do
          = icon('cogs')
11

12
      = link_to leave_group_group_members_path(group), data: { confirm: leave_confirmation_message(group) }, method: :delete, class: "btn", title: 'Leave this group' do
13
        = icon('sign-out')
14

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

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

24
    %span.visibility-icon.has-tooltip{data: { container: 'body', placement: 'left' }, title: visibility_icon_description(group)}
25 26
      = visibility_level_icon(group.visibility_level, fw: false)

27
  = image_tag group_icon(group), class: "avatar s40 hidden-xs"
28 29 30
  .title
    = link_to group, class: 'group-name' do
      = group.name
31

32 33 34
    - if group_member
      as
      %span #{group_member.human_access}
35

36
  - if group.description.present?
37
    .description
38
      = markdown(group.description, pipeline: :description)