Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
61b35cc8
Commit
61b35cc8
authored
Sep 10, 2020
by
Jose Vargas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add gl-button to admin/users dir
This adds the gl-button class to the haml views in admin/users
parent
d93fc08b
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
20 additions
and
20 deletions
+20
-20
app/views/admin/users/_form.html.haml
app/views/admin/users/_form.html.haml
+3
-3
app/views/admin/users/_user.html.haml
app/views/admin/users/_user.html.haml
+6
-6
app/views/admin/users/index.html.haml
app/views/admin/users/index.html.haml
+1
-1
app/views/admin/users/show.html.haml
app/views/admin/users/show.html.haml
+9
-9
ee/app/views/admin/users/_admin_email_users.html.haml
ee/app/views/admin/users/_admin_email_users.html.haml
+1
-1
No files found.
app/views/admin/users/_form.html.haml
View file @
61b35cc8
...
...
@@ -87,8 +87,8 @@
.form-actions
-
if
@user
.
new_record?
=
f
.
submit
'Create user'
,
class:
"btn btn-success"
=
f
.
submit
'Create user'
,
class:
"btn
gl-button
btn-success"
=
link_to
'Cancel'
,
admin_users_path
,
class:
"btn btn-cancel"
-
else
=
f
.
submit
'Save changes'
,
class:
"btn btn-success"
=
link_to
'Cancel'
,
admin_user_path
(
@user
),
class:
"btn btn-cancel"
=
f
.
submit
'Save changes'
,
class:
"btn
gl-button
btn-success"
=
link_to
'Cancel'
,
admin_user_path
(
@user
),
class:
"btn
gl-button
btn-cancel"
app/views/admin/users/_user.html.haml
View file @
61b35cc8
...
...
@@ -17,9 +17,9 @@
-
unless
user
.
internal?
.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'
=
link_to
_
(
'Edit'
),
edit_admin_user_path
(
user
),
id:
"edit_
#{
dom_id
(
user
)
}
"
,
class:
'btn
gl-button
btn-default'
-
unless
user
==
current_user
%button
.dropdown-new.btn.btn-default
{
type:
'button'
,
data:
{
toggle:
'dropdown'
}
}
%button
.dropdown-new.btn.
gl-button.
btn-default
{
type:
'button'
,
data:
{
toggle:
'dropdown'
}
}
=
sprite_icon
(
'settings'
)
=
sprite_icon
(
'chevron-down'
)
%ul
.dropdown-menu.dropdown-menu-right
...
...
@@ -32,13 +32,13 @@
-
elsif
user
.
blocked?
=
link_to
_
(
'Unblock'
),
unblock_admin_user_path
(
user
),
method: :put
-
else
%button
.btn
{
data:
{
'gl-modal-action'
:
'block'
,
%button
.btn
.gl-button.btn-default-tertiary
{
data:
{
'gl-modal-action'
:
'block'
,
url:
block_admin_user_path
(
user
),
username:
sanitize_name
(
user
.
name
)
}
}
=
s_
(
'AdminUsers|Block'
)
-
if
user
.
can_be_deactivated?
%li
%button
.btn
{
data:
{
'gl-modal-action'
:
'deactivate'
,
%button
.btn
.gl-button.btn-default-tertiary
{
data:
{
'gl-modal-action'
:
'deactivate'
,
url:
deactivate_admin_user_path
(
user
),
username:
sanitize_name
(
user
.
name
)
}
}
=
s_
(
'AdminUsers|Deactivate'
)
...
...
@@ -52,13 +52,13 @@
%li
.divider
-
if
user
.
can_be_removed?
%li
%button
.delete-user-button.btn.text-danger
{
data:
{
'gl-modal-action'
:
'delete'
,
%button
.delete-user-button.btn.
gl-button.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.text-danger
{
data:
{
'gl-modal-action'
:
'delete-with-contributions'
,
%button
.delete-user-button.btn.
gl-button.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
)
}
}
...
...
app/views/admin/users/index.html.haml
View file @
61b35cc8
...
...
@@ -40,7 +40,7 @@
%small
.badge.badge-pill
=
limited_counter_with_delimiter
(
User
.
without_projects
)
.nav-controls
=
render_if_exists
'admin/users/admin_email_users'
=
link_to
s_
(
'AdminUsers|New user'
),
new_admin_user_path
,
class:
'btn btn-success btn-search float-right'
=
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
...
...
app/views/admin/users/show.html.haml
View file @
61b35cc8
...
...
@@ -54,7 +54,7 @@
%strong
{
class:
@user
.
two_factor_enabled?
?
'cgreen'
:
'cred'
}
-
if
@user
.
two_factor_enabled?
Enabled
=
link_to
'Disable'
,
disable_two_factor_admin_user_path
(
@user
),
data:
{
confirm:
'Are you sure?'
},
method: :patch
,
class:
'btn btn-sm btn-remove float-right'
,
title:
'Disable Two-factor Authentication'
=
link_to
'Disable'
,
disable_two_factor_admin_user_path
(
@user
),
data:
{
confirm:
'Are you sure?'
},
method: :patch
,
class:
'btn
gl-button
btn-sm btn-remove float-right'
,
title:
'Disable Two-factor Authentication'
-
else
Disabled
...
...
@@ -146,7 +146,7 @@
-
email
=
" (
#{
@user
.
unconfirmed_email
}
)"
%p
This user has an unconfirmed email address
#{
email
}
. You may force a confirmation.
%br
=
link_to
'Confirm user'
,
confirm_admin_user_path
(
@user
),
method: :put
,
class:
"btn btn-info"
,
data:
{
confirm:
'Are you sure?'
,
qa_selector:
'confirm_user_button'
}
=
link_to
'Confirm user'
,
confirm_admin_user_path
(
@user
),
method: :put
,
class:
"btn
gl-button
btn-info"
,
data:
{
confirm:
'Are you sure?'
,
qa_selector:
'confirm_user_button'
}
=
render
'admin/users/user_detail_note'
...
...
@@ -157,7 +157,7 @@
.card-body
=
render
partial:
'admin/users/user_activation_effects'
%br
=
link_to
'Activate user'
,
activate_admin_user_path
(
@user
),
method: :put
,
class:
"btn btn-info"
,
data:
{
confirm:
'Are you sure?'
}
=
link_to
'Activate user'
,
activate_admin_user_path
(
@user
),
method: :put
,
class:
"btn
gl-button
btn-info"
,
data:
{
confirm:
'Are you sure?'
}
-
elsif
@user
.
can_be_deactivated?
.card.border-warning
.card-header.bg-warning.text-white
...
...
@@ -165,7 +165,7 @@
.card-body
=
render
partial:
'admin/users/user_deactivation_effects'
%br
%button
.btn.btn-warning
{
data:
{
'gl-modal-action'
:
'deactivate'
,
%button
.btn.
gl-button.
btn-warning
{
data:
{
'gl-modal-action'
:
'deactivate'
,
content:
'You can always re-activate their account, their data will remain intact.'
,
url:
deactivate_admin_user_path
(
@user
),
username:
sanitize_name
(
@user
.
name
)
}
}
...
...
@@ -181,7 +181,7 @@
%li
Log in
%li
Access Git repositories
%br
=
link_to
'Unblock user'
,
unblock_admin_user_path
(
@user
),
method: :put
,
class:
"btn btn-info"
,
data:
{
confirm:
'Are you sure?'
}
=
link_to
'Unblock user'
,
unblock_admin_user_path
(
@user
),
method: :put
,
class:
"btn
gl-button
btn-info"
,
data:
{
confirm:
'Are you sure?'
}
-
else
.card.border-warning
.card-header.bg-warning.text-white
...
...
@@ -189,7 +189,7 @@
.card-body
=
render
partial:
'admin/users/user_block_effects'
%br
%button
.btn.btn-warning
{
data:
{
'gl-modal-action'
:
'block'
,
%button
.btn.
gl-button.
btn-warning
{
data:
{
'gl-modal-action'
:
'block'
,
content:
'You can always unblock their account, their data will remain intact.'
,
url:
block_admin_user_path
(
@user
),
username:
sanitize_name
(
@user
.
name
)
}
}
...
...
@@ -201,7 +201,7 @@
.card-body
%p
This user has been temporarily locked due to excessive number of failed logins. You may manually unlock the account.
%br
=
link_to
'Unlock user'
,
unlock_admin_user_path
(
@user
),
method: :put
,
class:
"btn 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?'
}
.card.border-danger
.card-header.bg-danger.text-white
...
...
@@ -211,7 +211,7 @@
%p
Deleting a user has the following effects:
=
render
'users/deletion_guidance'
,
user:
@user
%br
%button
.delete-user-button.btn.btn-danger
{
data:
{
'gl-modal-action'
:
'delete'
,
%button
.delete-user-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
)
}
}
...
...
@@ -241,7 +241,7 @@
the user, and projects in them, will also be removed. Commits
to other projects are unaffected.
%br
%button
.delete-user-button.btn.btn-danger
{
data:
{
'gl-modal-action'
:
'delete-with-contributions'
,
%button
.delete-user-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
}
}
...
...
ee/app/views/admin/users/_admin_email_users.html.haml
View file @
61b35cc8
-
return
unless
send_emails_from_admin_area_feature_available?
=
link_to
s_
(
'AdminUsers|Send email to users'
),
admin_email_path
,
class:
'btn'
=
link_to
s_
(
'AdminUsers|Send email to users'
),
admin_email_path
,
class:
'btn
gl-button
'
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment