Commit 665f575e authored by Martin Wortschack's avatar Martin Wortschack

Merge branch 'btn-icon-user-profile' into 'master'

Add btn-icon class for action buttons in the user profile

See merge request gitlab-org/gitlab!52901
parents 667bd9f4 ec958a0e
...@@ -14,23 +14,23 @@ ...@@ -14,23 +14,23 @@
.cover-block.user-cover-block{ class: [('border-bottom' if profile_tabs.empty?)] } .cover-block.user-cover-block{ class: [('border-bottom' if profile_tabs.empty?)] }
= render layout: 'users/cover_controls' do = render layout: 'users/cover_controls' do
- if @user == current_user - if @user == current_user
= link_to profile_path, class: link_classes + 'btn gl-button btn-default has-tooltip', title: s_('UserProfile|Edit profile'), 'aria-label': 'Edit profile' do = link_to profile_path, class: link_classes + 'btn gl-button btn-default btn-icon has-tooltip', title: s_('UserProfile|Edit profile'), 'aria-label': 'Edit profile' do
= sprite_icon('pencil') = sprite_icon('pencil')
- elsif current_user - elsif current_user
- if @user.abuse_report - if @user.abuse_report
%button{ class: link_classes + 'btn gl-button btn-danger', title: s_('UserProfile|Already reported for abuse'), %button{ class: link_classes + 'btn gl-button btn-danger btn-icon', title: s_('UserProfile|Already reported for abuse'),
data: { toggle: 'tooltip', placement: 'bottom', container: 'body' } }> data: { toggle: 'tooltip', placement: 'bottom', container: 'body' } }>
= sprite_icon('error') = sprite_icon('error')
- else - else
= link_to new_abuse_report_path(user_id: @user.id, ref_url: request.referrer), class: link_classes + 'btn gl-button btn-default', = link_to new_abuse_report_path(user_id: @user.id, ref_url: request.referrer), class: link_classes + 'btn gl-button btn-default btn-icon',
title: s_('UserProfile|Report abuse'), data: { toggle: 'tooltip', placement: 'bottom', container: 'body' } do title: s_('UserProfile|Report abuse'), data: { toggle: 'tooltip', placement: 'bottom', container: 'body' } do
= sprite_icon('error') = sprite_icon('error')
- if can?(current_user, :read_user_profile, @user) - if can?(current_user, :read_user_profile, @user)
= link_to user_path(@user, rss_url_options), class: link_classes + 'btn gl-button btn-default has-tooltip', = link_to user_path(@user, rss_url_options), class: link_classes + 'btn gl-button btn-default btn-icon has-tooltip',
title: s_('UserProfile|Subscribe'), data: { toggle: 'tooltip', placement: 'bottom', container: 'body' } do title: s_('UserProfile|Subscribe'), data: { toggle: 'tooltip', placement: 'bottom', container: 'body' } do
= sprite_icon('rss', css_class: 'qa-rss-icon') = sprite_icon('rss', css_class: 'qa-rss-icon')
- if current_user && current_user.admin? - if current_user && current_user.admin?
= link_to [:admin, @user], class: link_classes + 'btn gl-button btn-default', title: s_('UserProfile|View user in admin area'), = link_to [:admin, @user], class: link_classes + 'btn gl-button btn-default btn-icon', title: s_('UserProfile|View user in admin area'),
data: {toggle: 'tooltip', placement: 'bottom', container: 'body'} do data: {toggle: 'tooltip', placement: 'bottom', container: 'body'} do
= sprite_icon('user') = sprite_icon('user')
......
---
title: Add btn-icon class for action buttons in the user profile
merge_request: 52901
author: Yogi (@yo)
type: other
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment