Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/admin/users')
-rw-r--r--app/views/admin/users/_access_levels.html.haml14
-rw-r--r--app/views/admin/users/_modals.html.haml2
-rw-r--r--app/views/admin/users/_user.html.haml72
-rw-r--r--app/views/admin/users/_users.html.haml17
-rw-r--r--app/views/admin/users/show.html.haml1
5 files changed, 19 insertions, 87 deletions
diff --git a/app/views/admin/users/_access_levels.html.haml b/app/views/admin/users/_access_levels.html.haml
index 573580bc5c5..aeb274fe2cb 100644
--- a/app/views/admin/users/_access_levels.html.haml
+++ b/app/views/admin/users/_access_levels.html.haml
@@ -48,3 +48,17 @@
%row.hidden#warning_external_automatically_set.hidden
.badge.badge-warning.text-white
= s_('AdminUsers|Automatically marked as default internal user')
+
+ .form-group.row
+ - @user.credit_card_validation || @user.build_credit_card_validation
+ = f.fields_for :credit_card_validation do |ff|
+ .col-sm-2.col-form-label.gl-pt-0
+ = ff.label s_("AdminUsers|Validate user account")
+ .col-sm-10.gl-display-flex.gl-align-items-baseline
+ = ff.check_box :credit_card_validated_at, checked: @user.credit_card_validated_at.present?
+ .gl-pl-2
+ .light
+ = s_('AdminUsers|User is validated and can use free CI minutes on shared runners.')
+ .gl-text-gray-600
+ = s_('AdminUsers|A user can validate themselves by inputting a credit/debit card, or an admin can manually validate a user.')
+
diff --git a/app/views/admin/users/_modals.html.haml b/app/views/admin/users/_modals.html.haml
index f6e7cefafe7..0890990f476 100644
--- a/app/views/admin/users/_modals.html.haml
+++ b/app/views/admin/users/_modals.html.haml
@@ -1,5 +1,5 @@
#js-delete-user-modal
-#js-modal-texts.hidden{ "hidden": true, "aria-hidden": true }
+#js-modal-texts.hidden{ "hidden": true, "aria-hidden": "true" }
%div{ data: { modal: "delete",
title: s_("AdminUsers|Delete User %{username}?"),
action: s_('AdminUsers|Delete user'),
diff --git a/app/views/admin/users/_user.html.haml b/app/views/admin/users/_user.html.haml
deleted file mode 100644
index 2816a1061b9..00000000000
--- a/app/views/admin/users/_user.html.haml
+++ /dev/null
@@ -1,72 +0,0 @@
-.gl-responsive-table-row{ role: 'row', data: { qa_selector: 'user_row_content' } }
- .table-section.section-40
- .table-mobile-header{ role: 'rowheader' }
- = _('Name')
- .table-mobile-content
- = render 'user_detail', user: user
- .table-section.section-10
- .table-mobile-header{ role: 'rowheader' }
- = _('Projects')
- .table-mobile-content.gl-str-truncated{ data: { testid: "user-project-count-#{user.id}" } }
- = user.authorized_projects.length
- .table-section.section-15
- .table-mobile-header{ role: 'rowheader' }
- = _('Created on')
- .table-mobile-content
- = l(user.created_at.to_date, format: :admin)
- .table-section.section-15
- .table-mobile-header{ role: 'rowheader' }
- = _('Last activity')
- .table-mobile-content
- = user.last_activity_on.nil? ? _('Never') : l(user.last_activity_on, format: :admin)
- - unless user.internal?
- .table-section.section-20.table-button-footer
- .table-action-buttons{ data: { testid: "user-actions-#{user.id}" } }
- = link_to _('Edit'), edit_admin_user_path(user), class: 'btn gl-button btn-default'
- - unless user == current_user
- %button.dropdown-new.btn.gl-button.btn-default{ type: 'button', data: { testid: "dropdown-toggle", toggle: 'dropdown' } }
- = sprite_icon('settings')
- = sprite_icon('chevron-down')
- %ul.dropdown-menu.dropdown-menu-right
- %li.dropdown-header
- = _('Settings')
- %li
- - if user.ldap_blocked?
- %span.small
- = s_('AdminUsers|Cannot unblock LDAP blocked users')
- - elsif user.blocked?
- - if user.blocked_pending_approval?
- = link_to s_('AdminUsers|Approve'), approve_admin_user_path(user), method: :put
- = link_to s_('AdminUsers|Reject'), reject_admin_user_path(user), method: :delete
- - else
- %button.gl-button.btn.btn-default-tertiary.js-confirm-modal-button{ data: user_unblock_data(user) }
- = s_('AdminUsers|Unblock')
- - else
- %button.gl-button.btn.btn-default-tertiary.js-confirm-modal-button{ data: user_block_data(user, user_block_effects) }
- = s_('AdminUsers|Block')
- - if user.can_be_deactivated?
- %li
- %button.gl-button.btn.btn-default-tertiary.js-confirm-modal-button{ data: user_deactivation_data(user, user_deactivation_effects) }
- = s_('AdminUsers|Deactivate')
- - elsif user.deactivated?
- %li
- %button.gl-button.btn.btn-default-tertiary.js-confirm-modal-button{ data: user_activation_data(user) }
- = s_('AdminUsers|Activate')
- - if user.access_locked?
- %li
- = link_to _('Unlock'), unlock_admin_user_path(user), method: :put, data: { confirm: _('Are you sure?') }
- - if can?(current_user, :destroy_user, user) && !user.blocked_pending_approval?
- %li.divider
- - if user.can_be_removed?
- %li
- %button.js-delete-user-modal-button.gl-button.btn.btn-danger-tertiary{ data: { 'gl-modal-action': 'delete',
- delete_user_url: admin_user_path(user),
- block_user_url: block_admin_user_path(user),
- username: sanitize_name(user.name) } }
- = s_('AdminUsers|Delete user')
- %li
- %button.js-delete-user-modal-button.gl-button.btn.btn-danger-tertiary{ data: { 'gl-modal-action': 'delete-with-contributions',
- delete_user_url: admin_user_path(user, hard_delete: true),
- block_user_url: block_admin_user_path(user),
- username: sanitize_name(user.name) } }
- = s_('AdminUsers|Delete user and contributions')
diff --git a/app/views/admin/users/_users.html.haml b/app/views/admin/users/_users.html.haml
index e4438f38a47..1a43d91b800 100644
--- a/app/views/admin/users/_users.html.haml
+++ b/app/views/admin/users/_users.html.haml
@@ -73,20 +73,9 @@
= link_to admin_users_path(sort: value, filter: params[:filter], search_query: params[:search_query]) do
= title
-- if Feature.enabled?(:vue_admin_users, default_enabled: :yaml)
- #js-admin-users-app{ data: admin_users_data_attributes(@users) }
- .gl-spinner-container.gl-my-7
- %span.gl-vertical-align-bottom.gl-spinner.gl-spinner-dark.gl-spinner-lg{ aria: { label: _('Loading') } }
-- elsif @users.empty?
- .nothing-here-block.border-top-0
- = s_('AdminUsers|No users found')
-- else
- .table-holder
- .thead-white.text-nowrap.gl-responsive-table-row.table-row-header{ role: 'row' }
- - user_table_headers.each do |header|
- .table-section{ class: header[:section_class_name], role: 'rowheader' }= header[:header_text]
-
- = render partial: 'admin/users/user', collection: @users
+#js-admin-users-app{ data: admin_users_data_attributes(@users) }
+ .gl-spinner-container.gl-my-7
+ %span.gl-vertical-align-bottom.gl-spinner.gl-spinner-dark.gl-spinner-lg{ aria: { label: _('Loading') } }
= paginate_collection @users
diff --git a/app/views/admin/users/show.html.haml b/app/views/admin/users/show.html.haml
index 19cc29668f5..08c1e089f21 100644
--- a/app/views/admin/users/show.html.haml
+++ b/app/views/admin/users/show.html.haml
@@ -59,6 +59,7 @@
= _('Disabled')
= render_if_exists 'admin/namespace_plan_info', namespace: @user.namespace
+ = render_if_exists 'admin/users/credit_card_info', user: @user
%li
%span.light= _('External User:')