BigW Consortium Gitlab

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

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

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

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

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

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

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

35 36
    - if group_member
      as
37
      %span= group_member.human_access
38

39
  - if group.description.present?
40
    .description
41
      = markdown_field(group, :description)