diff options
Diffstat (limited to 'app/views/users/show.html.haml')
-rw-r--r-- | app/views/users/show.html.haml | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/app/views/users/show.html.haml b/app/views/users/show.html.haml index cdaa739a7b3..fbd61123078 100644 --- a/app/views/users/show.html.haml +++ b/app/views/users/show.html.haml @@ -13,6 +13,13 @@ .user-profile .cover-block.user-cover-block{ class: [('border-bottom' if profile_tabs.empty?)] } = render layout: 'users/cover_controls' do + - if current_user && current_user.id != @user.id + - if current_user.following?(@user) + = link_to user_unfollow_path(@user, :json) , class: link_classes + 'btn gl-button btn-default', method: :post do + = _('Unfollow') + - else + = link_to user_follow_path(@user, :json) , class: link_classes + 'btn gl-button btn-default', method: :post do + = _('Follow') - if @user == current_user = 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', data: { toggle: 'tooltip', placement: 'bottom', container: 'body' } do @@ -26,13 +33,6 @@ = 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 = sprite_icon('error') - - if current_user && current_user.id != @user.id - - if current_user.following?(@user) - = link_to user_unfollow_path(@user, :json) , class: link_classes + 'btn gl-button btn-default', method: :post do - = _('Unfollow') - - else - = link_to user_follow_path(@user, :json) , class: link_classes + 'btn gl-button btn-default', method: :post do - = _('Follow') - if can?(current_user, :read_user_profile, @user) = 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 |