debian-mirror-gitlab/app/views/shared/groups/_group.html.haml

42 lines
1.4 KiB
Text
Raw Normal View History

2015-09-25 12:07:36 +05:30
- group_member = local_assigns[:group_member]
2017-08-17 22:00:37 +05:30
- full_name = true unless local_assigns[:full_name] == false
- group_name = full_name ? group.full_name : group.name
2016-04-02 18:10:28 +05:30
- css_class = '' unless local_assigns[:css_class]
- css_class += " no-description" if group.description.blank?
%li.group-row{ class: css_class }
2015-09-25 12:07:36 +05:30
- if group_member
.controls.hidden-xs
- if can?(current_user, :admin_group, group)
= link_to edit_group_path(group), class: "btn" do
= icon('cogs')
2015-09-25 12:07:36 +05:30
= link_to leave_group_group_members_path(group), data: { confirm: leave_confirmation_message(group) }, method: :delete, class: "btn", title: 'Leave this group' do
2016-06-02 11:05:42 +05:30
= icon('sign-out')
2015-09-25 12:07:36 +05:30
2016-04-02 18:10:28 +05:30
.stats
%span
2016-06-02 11:05:42 +05:30
= icon('bookmark')
2017-08-17 22:00:37 +05:30
= number_with_delimiter(group.projects.non_archived.count)
2016-04-02 18:10:28 +05:30
%span
= icon('users')
= number_with_delimiter(group.users.count)
2017-08-17 22:00:37 +05:30
%span.visibility-icon.has-tooltip{ data: { container: 'body', placement: 'left' }, title: visibility_icon_description(group) }
2016-06-02 11:05:42 +05:30
= visibility_level_icon(group.visibility_level, fw: false)
2017-08-17 22:00:37 +05:30
.avatar-container.s40
= link_to group do
= image_tag group_icon(group), class: "avatar s40 hidden-xs"
2016-06-02 11:05:42 +05:30
.title
2017-08-17 22:00:37 +05:30
= link_to group_name, group, class: 'group-name'
2015-09-25 12:07:36 +05:30
2016-06-02 11:05:42 +05:30
- if group_member
as
2017-08-17 22:00:37 +05:30
%span= group_member.human_access
2015-09-25 12:07:36 +05:30
2016-04-02 18:10:28 +05:30
- if group.description.present?
2016-06-02 11:05:42 +05:30
.description
2016-11-03 12:29:30 +05:30
= markdown_field(group, :description)