BigW Consortium Gitlab

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

%li.group-row{ class: css_class }
7
  - if group_member
Dmitriy Zaporozhets committed
8
    .controls.hidden-xs
9
      - if can?(current_user, :admin_group, group)
10 11
        = link_to edit_group_path(group), class: "btn" do
          = icon('cogs')
12

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

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

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

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

28
  .avatar-container.s40
29
    = image_tag group_icon(group), class: "avatar s40 hidden-xs"
30 31
  .title
    = link_to group, class: 'group-name' do
32 33 34 35
      - if full_name
        = group.full_name
      - else
        = group.name
36

37 38
    - if group_member
      as
39
      %span= group_member.human_access
40

41
  - if group.description.present?
42
    .description
43
      = markdown_field(group, :description)