57 lines
2.7 KiB
Text
57 lines
2.7 KiB
Text
.gl-responsive-table-row{ role: 'row' }
|
|
.table-section.section-40
|
|
.table-mobile-header{ role: 'rowheader' }
|
|
= _('Name')
|
|
.table-mobile-content
|
|
= render 'user_detail', user: user
|
|
.table-section.section-25
|
|
.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)
|
|
.table-section.section-20.table-button-footer
|
|
.table-action-buttons
|
|
= link_to _('Edit'), edit_admin_user_path(user), id: "edit_#{dom_id(user)}", class: 'btn btn-default'
|
|
- unless user == current_user
|
|
%button.dropdown-new.btn.btn-default{ type: 'button', data: { toggle: 'dropdown' } }
|
|
= icon('cog')
|
|
= icon('caret-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?
|
|
= link_to _('Unblock'), unblock_admin_user_path(user), method: :put
|
|
- else
|
|
= link_to _('Block'), block_admin_user_path(user), data: { confirm: "#{s_('AdminUsers|User will be blocked').upcase}! #{_('Are you sure')}?" }, method: :put
|
|
- 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)
|
|
%li.divider
|
|
- if user.can_be_removed?
|
|
%li
|
|
%button.delete-user-button.btn.text-danger{ data: { toggle: 'modal',
|
|
target: '#delete-user-modal',
|
|
delete_user_url: admin_user_path(user),
|
|
block_user_url: block_admin_user_path(user),
|
|
username: sanitize_name(user.name),
|
|
delete_contributions: false }, type: 'button' }
|
|
= s_('AdminUsers|Delete user')
|
|
|
|
%li
|
|
%button.delete-user-button.btn.text-danger{ data: { toggle: 'modal',
|
|
target: '#delete-user-modal',
|
|
delete_user_url: admin_user_path(user, hard_delete: true),
|
|
block_user_url: block_admin_user_path(user),
|
|
username: sanitize_name(user.name),
|
|
delete_contributions: true }, type: 'button' }
|
|
= s_('AdminUsers|Delete user and contributions')
|