diff options
Diffstat (limited to 'app/views/admin/users')
-rw-r--r-- | app/views/admin/users/_access_levels.html.haml | 2 | ||||
-rw-r--r-- | app/views/admin/users/_admin_notes.html.haml | 2 | ||||
-rw-r--r-- | app/views/admin/users/_cohorts.html.haml | 4 | ||||
-rw-r--r-- | app/views/admin/users/_cohorts_table.html.haml | 35 | ||||
-rw-r--r-- | app/views/admin/users/_form.html.haml | 18 | ||||
-rw-r--r-- | app/views/admin/users/_head.html.haml | 3 | ||||
-rw-r--r-- | app/views/admin/users/_user.html.haml | 4 | ||||
-rw-r--r-- | app/views/admin/users/_user_detail.html.haml | 7 | ||||
-rw-r--r-- | app/views/admin/users/_users.html.haml | 88 | ||||
-rw-r--r-- | app/views/admin/users/index.html.haml | 99 | ||||
-rw-r--r-- | app/views/admin/users/show.html.haml | 42 |
11 files changed, 179 insertions, 125 deletions
diff --git a/app/views/admin/users/_access_levels.html.haml b/app/views/admin/users/_access_levels.html.haml index 3ba01e8a350..573580bc5c5 100644 --- a/app/views/admin/users/_access_levels.html.haml +++ b/app/views/admin/users/_access_levels.html.haml @@ -5,7 +5,7 @@ .col-sm-2.col-form-label = f.label :projects_limit .col-sm-10 - = f.number_field :projects_limit, min: 0, max: Gitlab::Database::MAX_INT_VALUE, class: 'form-control' + = f.number_field :projects_limit, min: 0, max: Gitlab::Database::MAX_INT_VALUE, class: 'form-control gl-form-input' .form-group.row .col-sm-2.col-form-label.gl-pt-0 diff --git a/app/views/admin/users/_admin_notes.html.haml b/app/views/admin/users/_admin_notes.html.haml index 4da70a504f7..a20b2fbffc4 100644 --- a/app/views/admin/users/_admin_notes.html.haml +++ b/app/views/admin/users/_admin_notes.html.haml @@ -4,4 +4,4 @@ .col-sm-2.col-form-label = f.label :note, s_('AdminNote|Note') .col-sm-10 - = f.text_area :note, class: 'form-control' + = f.text_area :note, class: 'form-control gl-form-input gl-form-textarea' diff --git a/app/views/admin/users/_cohorts.html.haml b/app/views/admin/users/_cohorts.html.haml new file mode 100644 index 00000000000..013c6072165 --- /dev/null +++ b/app/views/admin/users/_cohorts.html.haml @@ -0,0 +1,4 @@ +- if @cohorts + = render 'cohorts_table' +- else + #js-cohorts-empty-state{ data: { empty_state_svg_path: image_path('illustrations/convdev/convdev_no_index.svg'), enable_usage_ping_link: metrics_and_profiling_admin_application_settings_path(anchor: 'js-usage-settings'), docs_link: help_page_path('user/admin_area/analytics/user_cohorts') } } diff --git a/app/views/admin/users/_cohorts_table.html.haml b/app/views/admin/users/_cohorts_table.html.haml new file mode 100644 index 00000000000..bb6266b38f6 --- /dev/null +++ b/app/views/admin/users/_cohorts_table.html.haml @@ -0,0 +1,35 @@ +- number_of_data_columns = @cohorts[:months_included] - 1 +.bs-callout.clearfix + %p + = s_("Cohorts|User cohorts are shown for the last %{months_included} months. Only users with activity are counted in the 'New users' column; inactive users are counted separately.") % { months_included: @cohorts[:months_included] } + = link_to sprite_icon('question-o'), help_page_path('user/admin_area/analytics/user_cohorts', anchor: 'cohorts'), title: 'About this feature', target: '_blank' + +.table-holder.d-xl-table + %table.table + %thead + %tr + %th.border-right.pt-4{ colspan: 3 } + %th.font-weight-bold.pt-4{ colspan: number_of_data_columns } + = s_("Cohorts|Returning users") + %tr + %th.border-top-0 + = s_("Cohorts|Registration month") + %th.border-top-0 + = s_("Cohorts|Inactive users") + %th.border-top-0.border-right + = s_("Cohorts|New users") + - number_of_data_columns.times do |i| + %th.border-top-0 + = s_("Cohorts|Month %{month_index}") % { month_index: i + 1 } + %tbody + - @cohorts[:cohorts].each do |cohort| + %tr + %td= cohort[:registration_month] + %td= cohort[:inactive] + %td.border-right= cohort[:total] + - cohort[:activity_months].each do |activity_month| + %td + - next if cohort[:total] == '0' + = activity_month[:percentage] + %br + = activity_month[:total] diff --git a/app/views/admin/users/_form.html.haml b/app/views/admin/users/_form.html.haml index 61c31d2d864..40393f0db99 100644 --- a/app/views/admin/users/_form.html.haml +++ b/app/views/admin/users/_form.html.haml @@ -8,19 +8,19 @@ .col-sm-2.col-form-label = f.label :name .col-sm-10 - = f.text_field :name, required: true, autocomplete: 'off', class: 'form-control' + = f.text_field :name, required: true, autocomplete: 'off', class: 'form-control gl-form-input' %span.help-inline * required .form-group.row .col-sm-2.col-form-label = f.label :username .col-sm-10 - = f.text_field :username, required: true, autocomplete: 'off', autocorrect: 'off', autocapitalize: 'off', spellcheck: false, class: 'form-control' + = f.text_field :username, required: true, autocomplete: 'off', autocorrect: 'off', autocapitalize: 'off', spellcheck: false, class: 'form-control gl-form-input' %span.help-inline * required .form-group.row .col-sm-2.col-form-label = f.label :email .col-sm-10 - = f.text_field :email, required: true, autocomplete: 'off', class: 'form-control' + = f.text_field :email, required: true, autocomplete: 'off', class: 'form-control gl-form-input' %span.help-inline * required - if @user.new_record? @@ -41,12 +41,12 @@ .col-sm-2.col-form-label = f.label :password .col-sm-10 - = f.password_field :password, disabled: f.object.force_random_password, class: 'form-control' + = f.password_field :password, disabled: f.object.force_random_password, class: 'form-control gl-form-input' .form-group.row .col-sm-2.col-form-label = f.label :password_confirmation .col-sm-10 - = f.password_field :password_confirmation, disabled: f.object.force_random_password, class: 'form-control' + = f.password_field :password_confirmation, disabled: f.object.force_random_password, class: 'form-control gl-form-input' = render partial: 'access_levels', locals: { f: f } @@ -66,22 +66,22 @@ .col-sm-2.col-form-label = f.label :skype .col-sm-10 - = f.text_field :skype, class: 'form-control' + = f.text_field :skype, class: 'form-control gl-form-input' .form-group.row .col-sm-2.col-form-label = f.label :linkedin .col-sm-10 - = f.text_field :linkedin, class: 'form-control' + = f.text_field :linkedin, class: 'form-control gl-form-input' .form-group.row .col-sm-2.col-form-label = f.label :twitter .col-sm-10 - = f.text_field :twitter, class: 'form-control' + = f.text_field :twitter, class: 'form-control gl-form-input' .form-group.row .col-sm-2.col-form-label = f.label :website_url .col-sm-10 - = f.text_field :website_url, class: 'form-control' + = f.text_field :website_url, class: 'form-control gl-form-input' = render 'admin/users/admin_notes', f: f diff --git a/app/views/admin/users/_head.html.haml b/app/views/admin/users/_head.html.haml index 4abcdef7e27..8a4a1a54c58 100644 --- a/app/views/admin/users/_head.html.haml +++ b/app/views/admin/users/_head.html.haml @@ -15,7 +15,8 @@ - if @user.deactivated? %span.cred = s_('AdminUsers|(Deactivated)') - = render_if_exists 'admin/users/audtior_user_badge' + = render_if_exists 'admin/users/auditor_user_badge' + = render_if_exists 'admin/users/gma_user_badge' .float-right - if impersonation_enabled? && @user != current_user && @user.can?(:log_in) diff --git a/app/views/admin/users/_user.html.haml b/app/views/admin/users/_user.html.haml index 31fd3aea94d..224a3cea28d 100644 --- a/app/views/admin/users/_user.html.haml +++ b/app/views/admin/users/_user.html.haml @@ -59,13 +59,13 @@ %li.divider - if user.can_be_removed? %li - %button.delete-user-button.btn.btn-default-tertiary.text-danger{ data: { 'gl-modal-action': 'delete', + %button.js-delete-user-modal-button.btn.btn-default-tertiary.text-danger{ 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.delete-user-button.btn.btn-default-tertiary.text-danger{ data: { 'gl-modal-action': 'delete-with-contributions', + %button.js-delete-user-modal-button.btn.btn-default-tertiary.text-danger{ 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) } } diff --git a/app/views/admin/users/_user_detail.html.haml b/app/views/admin/users/_user_detail.html.haml index 3bafd1cb396..05e387e6479 100644 --- a/app/views/admin/users/_user_detail.html.haml +++ b/app/views/admin/users/_user_detail.html.haml @@ -9,9 +9,10 @@ = render 'admin/users/user_listing_note', user: user - user_badges_in_admin_section(user).each do |badge| - - css_badge = "badge badge-#{badge[:variant]}" if badge[:variant].present? - %span{ class: css_badge } - = badge[:text] + - css_badge = "badge gl-badge sm badge-pill badge-#{badge[:variant]}" if badge[:variant].present? + %span.px-1.py-1 + %span{ class: css_badge } + = badge[:text] .row-second-line.str-truncated-100 = mail_to user.email, user.email, class: 'text-secondary' diff --git a/app/views/admin/users/_users.html.haml b/app/views/admin/users/_users.html.haml new file mode 100644 index 00000000000..57edb9abe90 --- /dev/null +++ b/app/views/admin/users/_users.html.haml @@ -0,0 +1,88 @@ +.top-area.scrolling-tabs-container.inner-page-scroll-tabs + .fade-left + = sprite_icon('chevron-lg-left', size: 12) + .fade-right + = sprite_icon('chevron-lg-right', size: 12) + %ul.nav-links.nav.nav-tabs.scrolling-tabs + = nav_link(html_options: { class: active_when(params[:filter].nil?) }) do + = link_to admin_users_path do + = s_('AdminUsers|Active') + %small.badge.badge-pill= limited_counter_with_delimiter(User.active_without_ghosts) + = nav_link(html_options: { class: active_when(params[:filter] == 'admins') }) do + = link_to admin_users_path(filter: "admins") do + = s_('AdminUsers|Admins') + %small.badge.badge-pill= limited_counter_with_delimiter(User.admins) + = nav_link(html_options: { class: "#{active_when(params[:filter] == 'two_factor_enabled')} filter-two-factor-enabled" }) do + = link_to admin_users_path(filter: 'two_factor_enabled') do + = s_('AdminUsers|2FA Enabled') + %small.badge.badge-pill= limited_counter_with_delimiter(User.with_two_factor) + = nav_link(html_options: { class: "#{active_when(params[:filter] == 'two_factor_disabled')} filter-two-factor-disabled" }) do + = link_to admin_users_path(filter: 'two_factor_disabled') do + = s_('AdminUsers|2FA Disabled') + %small.badge.badge-pill= limited_counter_with_delimiter(User.without_two_factor) + = nav_link(html_options: { class: active_when(params[:filter] == 'external') }) do + = link_to admin_users_path(filter: 'external') do + = s_('AdminUsers|External') + %small.badge.badge-pill= limited_counter_with_delimiter(User.external) + = nav_link(html_options: { class: active_when(params[:filter] == 'blocked') }) do + = link_to admin_users_path(filter: "blocked") do + = s_('AdminUsers|Blocked') + %small.badge.badge-pill= limited_counter_with_delimiter(User.blocked) + = nav_link(html_options: { class: "#{active_when(params[:filter] == 'blocked_pending_approval')} filter-blocked-pending-approval" }) do + = link_to admin_users_path(filter: "blocked_pending_approval"), data: { qa_selector: 'pending_approval_tab' } do + = s_('AdminUsers|Pending approval') + %small.badge.badge-pill= limited_counter_with_delimiter(User.blocked_pending_approval) + = nav_link(html_options: { class: active_when(params[:filter] == 'deactivated') }) do + = link_to admin_users_path(filter: "deactivated") do + = s_('AdminUsers|Deactivated') + %small.badge.badge-pill= limited_counter_with_delimiter(User.deactivated) + = nav_link(html_options: { class: active_when(params[:filter] == 'wop') }) do + = link_to admin_users_path(filter: "wop") do + = s_('AdminUsers|Without projects') + %small.badge.badge-pill= limited_counter_with_delimiter(User.without_projects) + .nav-controls + = render_if_exists 'admin/users/admin_email_users' + = render_if_exists 'admin/users/admin_export_user_permissions' + = link_to s_('AdminUsers|New user'), new_admin_user_path, class: 'btn gl-button btn-success btn-search float-right' + +.filtered-search-block.row-content-block.border-top-0 + = form_tag admin_users_path, method: :get do + - if params[:filter].present? + = hidden_field_tag "filter", h(params[:filter]) + .search-holder + .search-field-holder.gl-mb-4 + = search_field_tag :search_query, params[:search_query], placeholder: s_('AdminUsers|Search by name, email or username'), class: 'form-control search-text-input js-search-input', spellcheck: false, data: { qa_selector: 'user_search_field' } + - if @sort.present? + = hidden_field_tag :sort, @sort + = sprite_icon('search', css_class: 'search-icon') + = button_tag s_('AdminUsers|Search users') if Rails.env.test? + .dropdown.user-sort-dropdown + = label_tag 'Sort by', nil, class: 'label-bold' + - toggle_text = @sort.present? ? users_sort_options_hash[@sort] : sort_title_name + = dropdown_toggle(toggle_text, { toggle: 'dropdown' }) + %ul.dropdown-menu.dropdown-menu-right + %li.dropdown-header + = s_('AdminUsers|Sort by') + %li + - users_sort_options_hash.each do |value, title| + = link_to admin_users_path(sort: value, filter: params[:filter], search_query: params[:search_query]) do + = title + +- if Feature.enabled?(:vue_admin_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') } } +- 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 + += paginate @users, theme: "gitlab" + += render partial: 'admin/users/modals' diff --git a/app/views/admin/users/index.html.haml b/app/views/admin/users/index.html.haml index cef16b1881e..8da0c7f4300 100644 --- a/app/views/admin/users/index.html.haml +++ b/app/views/admin/users/index.html.haml @@ -1,92 +1,17 @@ - page_title _("Users") -.top-area.scrolling-tabs-container.inner-page-scroll-tabs - .fade-left - = sprite_icon('chevron-lg-left', size: 12) - .fade-right - = sprite_icon('chevron-lg-right', size: 12) - %ul.nav-links.nav.nav-tabs.scrolling-tabs - = nav_link(html_options: { class: active_when(params[:filter].nil?) }) do - = link_to admin_users_path do - = s_('AdminUsers|Active') - %small.badge.badge-pill= limited_counter_with_delimiter(User.active_without_ghosts) - = nav_link(html_options: { class: active_when(params[:filter] == 'admins') }) do - = link_to admin_users_path(filter: "admins") do - = s_('AdminUsers|Admins') - %small.badge.badge-pill= limited_counter_with_delimiter(User.admins) - = nav_link(html_options: { class: "#{active_when(params[:filter] == 'two_factor_enabled')} filter-two-factor-enabled" }) do - = link_to admin_users_path(filter: 'two_factor_enabled') do - = s_('AdminUsers|2FA Enabled') - %small.badge.badge-pill= limited_counter_with_delimiter(User.with_two_factor) - = nav_link(html_options: { class: "#{active_when(params[:filter] == 'two_factor_disabled')} filter-two-factor-disabled" }) do - = link_to admin_users_path(filter: 'two_factor_disabled') do - = s_('AdminUsers|2FA Disabled') - %small.badge.badge-pill= limited_counter_with_delimiter(User.without_two_factor) - = nav_link(html_options: { class: active_when(params[:filter] == 'external') }) do - = link_to admin_users_path(filter: 'external') do - = s_('AdminUsers|External') - %small.badge.badge-pill= limited_counter_with_delimiter(User.external) - = nav_link(html_options: { class: active_when(params[:filter] == 'blocked') }) do - = link_to admin_users_path(filter: "blocked") do - = s_('AdminUsers|Blocked') - %small.badge.badge-pill= limited_counter_with_delimiter(User.blocked) - = nav_link(html_options: { class: "#{active_when(params[:filter] == 'blocked_pending_approval')} filter-blocked-pending-approval" }) do - = link_to admin_users_path(filter: "blocked_pending_approval"), data: { qa_selector: 'pending_approval_tab' } do - = s_('AdminUsers|Pending approval') - %small.badge.badge-pill= limited_counter_with_delimiter(User.blocked_pending_approval) - = nav_link(html_options: { class: active_when(params[:filter] == 'deactivated') }) do - = link_to admin_users_path(filter: "deactivated") do - = s_('AdminUsers|Deactivated') - %small.badge.badge-pill= limited_counter_with_delimiter(User.deactivated) - = nav_link(html_options: { class: active_when(params[:filter] == 'wop') }) do - = link_to admin_users_path(filter: "wop") do - = s_('AdminUsers|Without projects') - %small.badge.badge-pill= limited_counter_with_delimiter(User.without_projects) - .nav-controls - = render_if_exists 'admin/users/admin_email_users' - = render_if_exists 'admin/users/admin_export_user_permissions' - = link_to s_('AdminUsers|New user'), new_admin_user_path, class: 'btn gl-button btn-success btn-search float-right' +%ul.nav-links.nav-tabs.nav.js-users-tabs{ role: 'tablist' } + %li.nav-item.js-users-tab-item{ role: 'presentation' } + %a.nav-link{ href: '#users', class: active_when(params[:tab] != 'cohorts'), data: { toggle: 'tab' }, role: 'tab' } + = s_('AdminUsers|Users') + %li.nav-item.js-users-tab-item{ role: 'presentation' } + %a.nav-link{ href: '#cohorts', class: active_when(params[:tab] == 'cohorts'), data: { toggle: 'tab', track: { event: 'i_analytics_cohorts', action: 'click_tab' } }, role: 'tab' } + = s_('AdminUsers|Cohorts') -.filtered-search-block.row-content-block.border-top-0 - = form_tag admin_users_path, method: :get do - - if params[:filter].present? - = hidden_field_tag "filter", h(params[:filter]) - .search-holder - .search-field-holder.gl-mb-4 - = search_field_tag :search_query, params[:search_query], placeholder: s_('AdminUsers|Search by name, email or username'), class: 'form-control search-text-input js-search-input', spellcheck: false, data: { qa_selector: 'user_search_field' } - - if @sort.present? - = hidden_field_tag :sort, @sort - = sprite_icon('search', css_class: 'search-icon') - = button_tag s_('AdminUsers|Search users') if Rails.env.test? - .dropdown.user-sort-dropdown - = label_tag 'Sort by', nil, class: 'label-bold' - - toggle_text = @sort.present? ? users_sort_options_hash[@sort] : sort_title_name - = dropdown_toggle(toggle_text, { toggle: 'dropdown' }) - %ul.dropdown-menu.dropdown-menu-right - %li.dropdown-header - = s_('AdminUsers|Sort by') - %li - - users_sort_options_hash.each do |value, title| - = link_to admin_users_path(sort: value, filter: params[:filter], search_query: params[:search_query]) do - = title +.tab-content + .tab-pane{ id: 'users', class: ('active' if params[:tab] != 'cohorts') } + = render 'users' + .tab-pane{ id: 'cohorts', class: ('active' if params[:tab] == 'cohorts') } + = render 'cohorts' -- if Feature.enabled?(:vue_admin_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') } } -- 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' } - .table-section.section-40{ role: 'rowheader' }= _('Name') - .table-section.section-10{ role: 'rowheader' }= _('Projects') - .table-section.section-15{ role: 'rowheader' }= _('Created on') - .table-section.section-15{ role: 'rowheader' }= _('Last activity') - = render partial: 'admin/users/user', collection: @users - -= paginate @users, theme: "gitlab" - -= render partial: 'admin/users/modals' diff --git a/app/views/admin/users/show.html.haml b/app/views/admin/users/show.html.haml index 26f78ea4d6a..c7ec3ab66d7 100644 --- a/app/views/admin/users/show.html.haml +++ b/app/views/admin/users/show.html.haml @@ -138,10 +138,10 @@ .col-md-6 - unless @user == current_user - if can_force_email_confirmation?(@user) - .card.border-info - .card-header.bg-info.text-white + .gl-card.border-info.gl-mb-5 + .gl-card-header.bg-info.text-white Confirm user - .card-body + .gl-card-body - if @user.unconfirmed_email.present? - email = " (#{@user.unconfirmed_email})" %p This user has an unconfirmed email address#{email}. You may force a confirmation. @@ -152,19 +152,19 @@ - unless @user.internal? - if @user.deactivated? - .card.border-info - .card-header.bg-info.text-white + .gl-card.border-info.gl-mb-5 + .gl-card-header.bg-info.text-white Reactivate this user - .card-body + .gl-card-body = render partial: 'admin/users/user_activation_effects' %br %button.btn.gl-button.btn-info.js-confirm-modal-button{ data: user_activation_data(@user) } = s_('AdminUsers|Activate user') - elsif @user.can_be_deactivated? - .card.border-warning - .card-header.bg-warning.text-white + .gl-card.border-warning.gl-mb-5 + .gl-card-header.bg-warning.text-white Deactivate this user - .card-body + .gl-card-body = user_deactivation_effects %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.')) } @@ -174,10 +174,10 @@ = render 'admin/users/approve_user', user: @user = render 'admin/users/reject_pending_user', user: @user - else - .card.border-info - .card-header.gl-bg-blue-500.gl-text-white + .gl-card.border-info.gl-mb-5 + .gl-card-header.gl-bg-blue-500.gl-text-white This user is blocked - .card-body + .gl-card-body %p A blocked user cannot: %ul %li Log in @@ -189,7 +189,7 @@ = render 'admin/users/block_user', user: @user - if @user.access_locked? - .card.border-info + .card.border-info.gl-mb-5 .card-header.bg-info.text-white This account has been locked .card-body @@ -197,15 +197,15 @@ %br = 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? - .card.border-danger - .card-header.bg-danger.text-white + .gl-card.border-danger.gl-mb-5 + .gl-card-header.bg-danger.text-white = s_('AdminUsers|Delete user') - .card-body + .gl-card-body - if @user.can_be_removed? && can?(current_user, :destroy_user, @user) %p Deleting a user has the following effects: = render 'users/deletion_guidance', user: @user %br - %button.delete-user-button.btn.gl-button.btn-danger{ data: { 'gl-modal-action': 'delete', + %button.js-delete-user-modal-button.btn.gl-button.btn-danger{ 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) } } @@ -221,10 +221,10 @@ %p You don't have access to delete this user. - .card.border-danger - .card-header.bg-danger.text-white + .gl-card.border-danger + .gl-card-header.bg-danger.text-white = s_('AdminUsers|Delete user and contributions') - .card-body + .gl-card-body - if can?(current_user, :destroy_user, @user) %p This option deletes the user and any contributions that @@ -235,7 +235,7 @@ the user, and projects in them, will also be removed. Commits to other projects are unaffected. %br - %button.delete-user-button.btn.gl-button.btn-danger{ data: { 'gl-modal-action': 'delete-with-contributions', + %button.js-delete-user-modal-button.btn.gl-button.btn-danger{ 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: @user.name } } |