Commit 3b92ed15 authored by Yogi's avatar Yogi Committed by David O'Regan

Move user action card to new GitLab UI card in admin

parent 82325168
...@@ -138,10 +138,10 @@ ...@@ -138,10 +138,10 @@
.col-md-6 .col-md-6
- unless @user == current_user - unless @user == current_user
- if can_force_email_confirmation?(@user) - if can_force_email_confirmation?(@user)
.card.border-info .gl-card.border-info.gl-mb-5
.card-header.bg-info.text-white .gl-card-header.bg-info.text-white
Confirm user Confirm user
.card-body .gl-card-body
- if @user.unconfirmed_email.present? - if @user.unconfirmed_email.present?
- email = " (#{@user.unconfirmed_email})" - email = " (#{@user.unconfirmed_email})"
%p This user has an unconfirmed email address#{email}. You may force a confirmation. %p This user has an unconfirmed email address#{email}. You may force a confirmation.
...@@ -152,19 +152,19 @@ ...@@ -152,19 +152,19 @@
- unless @user.internal? - unless @user.internal?
- if @user.deactivated? - if @user.deactivated?
.card.border-info .gl-card.border-info.gl-mb-5
.card-header.bg-info.text-white .gl-card-header.bg-info.text-white
Reactivate this user Reactivate this user
.card-body .gl-card-body
= render partial: 'admin/users/user_activation_effects' = render partial: 'admin/users/user_activation_effects'
%br %br
%button.btn.gl-button.btn-info.js-confirm-modal-button{ data: user_activation_data(@user) } %button.btn.gl-button.btn-info.js-confirm-modal-button{ data: user_activation_data(@user) }
= s_('AdminUsers|Activate user') = s_('AdminUsers|Activate user')
- elsif @user.can_be_deactivated? - elsif @user.can_be_deactivated?
.card.border-warning .gl-card.border-warning.gl-mb-5
.card-header.bg-warning.text-white .gl-card-header.bg-warning.text-white
Deactivate this user Deactivate this user
.card-body .gl-card-body
= user_deactivation_effects = user_deactivation_effects
%br %br
%button.btn.gl-button.btn-warning.js-confirm-modal-button{ data: user_deactivation_data(@user, s_('AdminUsers|You can always re-activate their account, their data will remain intact.')) } %button.btn.gl-button.btn-warning.js-confirm-modal-button{ data: user_deactivation_data(@user, s_('AdminUsers|You can always re-activate their account, their data will remain intact.')) }
...@@ -174,10 +174,10 @@ ...@@ -174,10 +174,10 @@
= render 'admin/users/approve_user', user: @user = render 'admin/users/approve_user', user: @user
= render 'admin/users/reject_pending_user', user: @user = render 'admin/users/reject_pending_user', user: @user
- else - else
.card.border-info .gl-card.border-info.gl-mb-5
.card-header.gl-bg-blue-500.gl-text-white .gl-card-header.gl-bg-blue-500.gl-text-white
This user is blocked This user is blocked
.card-body .gl-card-body
%p A blocked user cannot: %p A blocked user cannot:
%ul %ul
%li Log in %li Log in
...@@ -189,7 +189,7 @@ ...@@ -189,7 +189,7 @@
= render 'admin/users/block_user', user: @user = render 'admin/users/block_user', user: @user
- if @user.access_locked? - if @user.access_locked?
.card.border-info .card.border-info.gl-mb-5
.card-header.bg-info.text-white .card-header.bg-info.text-white
This account has been locked This account has been locked
.card-body .card-body
...@@ -197,10 +197,10 @@ ...@@ -197,10 +197,10 @@
%br %br
= link_to 'Unlock user', unlock_admin_user_path(@user), method: :put, class: "btn gl-button btn-info", data: { confirm: 'Are you sure?' } = link_to 'Unlock user', unlock_admin_user_path(@user), method: :put, class: "btn gl-button btn-info", data: { confirm: 'Are you sure?' }
- if !@user.blocked_pending_approval? - if !@user.blocked_pending_approval?
.card.border-danger .gl-card.border-danger.gl-mb-5
.card-header.bg-danger.text-white .gl-card-header.bg-danger.text-white
= s_('AdminUsers|Delete user') = s_('AdminUsers|Delete user')
.card-body .gl-card-body
- if @user.can_be_removed? && can?(current_user, :destroy_user, @user) - if @user.can_be_removed? && can?(current_user, :destroy_user, @user)
%p Deleting a user has the following effects: %p Deleting a user has the following effects:
= render 'users/deletion_guidance', user: @user = render 'users/deletion_guidance', user: @user
...@@ -221,10 +221,10 @@ ...@@ -221,10 +221,10 @@
%p %p
You don't have access to delete this user. You don't have access to delete this user.
.card.border-danger .gl-card.border-danger
.card-header.bg-danger.text-white .gl-card-header.bg-danger.text-white
= s_('AdminUsers|Delete user and contributions') = s_('AdminUsers|Delete user and contributions')
.card-body .gl-card-body
- if can?(current_user, :destroy_user, @user) - if can?(current_user, :destroy_user, @user)
%p %p
This option deletes the user and any contributions that This option deletes the user and any contributions that
......
---
title: Move user action card to new GitLab UI card in admin
merge_request: 51914
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