summaryrefslogtreecommitdiff
path: root/app/views/admin/users/index.html.haml
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2015-07-01 22:26:14 -0700
committerStan Hu <stanhu@gmail.com>2015-07-02 04:22:51 -0700
commit3e738e3b9aeae5620116109258c4d4da84180e7e (patch)
treed433a56409141671d9c56e6bca3e0ce16f546ce5 /app/views/admin/users/index.html.haml
parent2ca7ffd094ae285823d1a00b8cf1a7d23b80a2a3 (diff)
downloadgitlab-ce-3e738e3b9aeae5620116109258c4d4da84180e7e.tar.gz
Add support for unlocking users in admin settings
Closes https://github.com/gitlabhq/gitlabhq/issues/9381
Diffstat (limited to 'app/views/admin/users/index.html.haml')
-rw-r--r--app/views/admin/users/index.html.haml2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/views/admin/users/index.html.haml b/app/views/admin/users/index.html.haml
index 9c1bec7c84d..b0d31170704 100644
--- a/app/views/admin/users/index.html.haml
+++ b/app/views/admin/users/index.html.haml
@@ -93,6 +93,8 @@
= link_to 'Unblock', unblock_admin_user_path(user), method: :put, class: "btn btn-xs btn-success"
- else
= link_to 'Block', block_admin_user_path(user), data: {confirm: 'USER WILL BE BLOCKED! Are you sure?'}, method: :put, class: "btn btn-xs btn-warning"
+ - if user.access_locked?
+ = link_to 'Unlock', unlock_admin_user_path(user), method: :put, class: "btn btn-xs btn-success", data: { confirm: 'Are you sure?' }
- if user.can_be_removed?
= link_to 'Destroy', [:admin, user], data: { confirm: "USER #{user.name} WILL BE REMOVED! All tickets linked to this user will also be removed! Maybe block the user instead? Are you sure?" }, method: :delete, class: "btn btn-xs btn-remove"
= paginate @users, theme: "gitlab"