Implemented ability of admins to manually confirm users
This commit is contained in:
parent
6c2dc92b84
commit
c50e8c0466
7 changed files with 90 additions and 16 deletions
|
|
@ -6,7 +6,7 @@
|
|||
%th #
|
||||
%th E-Mail
|
||||
%th Date registered
|
||||
%th Status
|
||||
%th Confirmed?
|
||||
- recent_users.each_with_index do |user, index|
|
||||
%tbody
|
||||
%tr
|
||||
|
|
@ -14,10 +14,12 @@
|
|||
%td= link_to user.email, admin_user_path(user.id)
|
||||
%td= user.created_at.strftime('%m/%d/%Y')
|
||||
%td
|
||||
- if user.confirmed?
|
||||
%span.label.label-success Confirmed
|
||||
-else
|
||||
%span.label.label-danger Unconfirmed
|
||||
= check_box_tag user.id, user.id, user.confirmed?,
|
||||
method: :patch,
|
||||
url: "/admin/users/#{user.id}/toggle_confirmation?user[to_confirm]=",
|
||||
class: 'switch-checkbox',
|
||||
readonly: true,
|
||||
data: { size: 'small', on_color: 'success', off_color: 'warning', on_text: 'Yes', off_text: 'No' }
|
||||
- else
|
||||
%h5.text-warning.text-center
|
||||
No sign ups!
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue