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
Show 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 @@
...
@@ -87,8 +87,8 @@
.form-actions
.form-actions
-
if
@user
.
new_record?
-
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"
=
link_to
'Cancel'
,
admin_users_path
,
class:
"btn btn-cancel"
-
else
-
else
=
f
.
submit
'Save changes'
,
class:
"btn btn-success"
=
f
.
submit
'Save changes'
,
class:
"btn
gl-button
btn-success"
=
link_to
'Cancel'
,
admin_user_path
(
@user
),
class:
"btn btn-cancel"
=
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 @@
...
@@ -17,9 +17,9 @@
-
unless
user
.
internal?
-
unless
user
.
internal?
.table-section.section-20.table-button-footer
.table-section.section-20.table-button-footer
.table-action-buttons
.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
-
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
(
'settings'
)
=
sprite_icon
(
'chevron-down'
)
=
sprite_icon
(
'chevron-down'
)
%ul
.dropdown-menu.dropdown-menu-right
%ul
.dropdown-menu.dropdown-menu-right
...
@@ -32,13 +32,13 @@
...
@@ -32,13 +32,13 @@
-
elsif
user
.
blocked?
-
elsif
user
.
blocked?
=
link_to
_
(
'Unblock'
),
unblock_admin_user_path
(
user
),
method: :put
=
link_to
_
(
'Unblock'
),
unblock_admin_user_path
(
user
),
method: :put
-
else
-
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
),
url:
block_admin_user_path
(
user
),
username:
sanitize_name
(
user
.
name
)
}
}
username:
sanitize_name
(
user
.
name
)
}
}
=
s_
(
'AdminUsers|Block'
)
=
s_
(
'AdminUsers|Block'
)
-
if
user
.
can_be_deactivated?
-
if
user
.
can_be_deactivated?
%li
%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
),
url:
deactivate_admin_user_path
(
user
),
username:
sanitize_name
(
user
.
name
)
}
}
username:
sanitize_name
(
user
.
name
)
}
}
=
s_
(
'AdminUsers|Deactivate'
)
=
s_
(
'AdminUsers|Deactivate'
)
...
@@ -52,13 +52,13 @@
...
@@ -52,13 +52,13 @@
%li
.divider
%li
.divider
-
if
user
.
can_be_removed?
-
if
user
.
can_be_removed?
%li
%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
),
delete_user_url:
admin_user_path
(
user
),
block_user_url:
block_admin_user_path
(
user
),
block_user_url:
block_admin_user_path
(
user
),
username:
sanitize_name
(
user
.
name
)
}
}
username:
sanitize_name
(
user
.
name
)
}
}
=
s_
(
'AdminUsers|Delete user'
)
=
s_
(
'AdminUsers|Delete user'
)
%li
%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
),
delete_user_url:
admin_user_path
(
user
,
hard_delete:
true
),
block_user_url:
block_admin_user_path
(
user
),
block_user_url:
block_admin_user_path
(
user
),
username:
sanitize_name
(
user
.
name
)
}
}
username:
sanitize_name
(
user
.
name
)
}
}
...
...
app/views/admin/users/index.html.haml
View file @
61b35cc8
...
@@ -40,7 +40,7 @@
...
@@ -40,7 +40,7 @@
%small
.badge.badge-pill
=
limited_counter_with_delimiter
(
User
.
without_projects
)
%small
.badge.badge-pill
=
limited_counter_with_delimiter
(
User
.
without_projects
)
.nav-controls
.nav-controls
=
render_if_exists
'admin/users/admin_email_users'
=
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
.filtered-search-block.row-content-block.border-top-0
=
form_tag
admin_users_path
,
method: :get
do
=
form_tag
admin_users_path
,
method: :get
do
...
...
app/views/admin/users/show.html.haml
View file @
61b35cc8
...
@@ -54,7 +54,7 @@
...
@@ -54,7 +54,7 @@
%strong
{
class:
@user
.
two_factor_enabled?
?
'cgreen'
:
'cred'
}
%strong
{
class:
@user
.
two_factor_enabled?
?
'cgreen'
:
'cred'
}
-
if
@user
.
two_factor_enabled?
-
if
@user
.
two_factor_enabled?
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
-
else
Disabled
Disabled
...
@@ -146,7 +146,7 @@
...
@@ -146,7 +146,7 @@
-
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.
%br
%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'
=
render
'admin/users/user_detail_note'
...
@@ -157,7 +157,7 @@
...
@@ -157,7 +157,7 @@
.card-body
.card-body
=
render
partial:
'admin/users/user_activation_effects'
=
render
partial:
'admin/users/user_activation_effects'
%br
%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?
-
elsif
@user
.
can_be_deactivated?
.card.border-warning
.card.border-warning
.card-header.bg-warning.text-white
.card-header.bg-warning.text-white
...
@@ -165,7 +165,7 @@
...
@@ -165,7 +165,7 @@
.card-body
.card-body
=
render
partial:
'admin/users/user_deactivation_effects'
=
render
partial:
'admin/users/user_deactivation_effects'
%br
%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.'
,
content:
'You can always re-activate their account, their data will remain intact.'
,
url:
deactivate_admin_user_path
(
@user
),
url:
deactivate_admin_user_path
(
@user
),
username:
sanitize_name
(
@user
.
name
)
}
}
username:
sanitize_name
(
@user
.
name
)
}
}
...
@@ -181,7 +181,7 @@
...
@@ -181,7 +181,7 @@
%li
Log in
%li
Log in
%li
Access Git repositories
%li
Access Git repositories
%br
%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
-
else
.card.border-warning
.card.border-warning
.card-header.bg-warning.text-white
.card-header.bg-warning.text-white
...
@@ -189,7 +189,7 @@
...
@@ -189,7 +189,7 @@
.card-body
.card-body
=
render
partial:
'admin/users/user_block_effects'
=
render
partial:
'admin/users/user_block_effects'
%br
%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.'
,
content:
'You can always unblock their account, their data will remain intact.'
,
url:
block_admin_user_path
(
@user
),
url:
block_admin_user_path
(
@user
),
username:
sanitize_name
(
@user
.
name
)
}
}
username:
sanitize_name
(
@user
.
name
)
}
}
...
@@ -201,7 +201,7 @@
...
@@ -201,7 +201,7 @@
.card-body
.card-body
%p
This user has been temporarily locked due to excessive number of failed logins. You may manually unlock the account.
%p
This user has been temporarily locked due to excessive number of failed logins. You may manually unlock the account.
%br
%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.border-danger
.card-header.bg-danger.text-white
.card-header.bg-danger.text-white
...
@@ -211,7 +211,7 @@
...
@@ -211,7 +211,7 @@
%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
%br
%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
),
delete_user_url:
admin_user_path
(
@user
),
block_user_url:
block_admin_user_path
(
@user
),
block_user_url:
block_admin_user_path
(
@user
),
username:
sanitize_name
(
@user
.
name
)
}
}
username:
sanitize_name
(
@user
.
name
)
}
}
...
@@ -241,7 +241,7 @@
...
@@ -241,7 +241,7 @@
the user, and projects in them, will also be removed. Commits
the user, and projects in them, will also be removed. Commits
to other projects are unaffected.
to other projects are unaffected.
%br
%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
),
delete_user_url:
admin_user_path
(
@user
,
hard_delete:
true
),
block_user_url:
block_admin_user_path
(
@user
),
block_user_url:
block_admin_user_path
(
@user
),
username:
@user
.
name
}
}
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?
-
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