blob: 268c7d3b2b88092196c408bafd59fc3f4ab2bd5a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
- @show_navigation = false
= search :users
%table.table.table-striped.table-bordered
%thead
%tr
%th
= t(:username)
%th
= t(:created)
%th
= t(:updated)
%th
= t("actions.toggle_user")
%tbody
- @users.each do |user|
%tr
%td
= link_to user.username, user
%td
= user.created_at.strftime("%d %b, %Y, %H:%M")
%td
= user.updated_at.strftime("%d %b, %Y, %H:%M")
%td
- if user.enabled
%button.btn.btn-default{:"data-toggle" => "modal", :"data-target" => "#user-form-#{user.id}", :type => "button"}
= t("actions.disable_user")
.modal.fade.hide{:id => "user-form-#{user.id}"}
.modal-dialog
.modal-content
.modal-header
%button.close{:"data-dismiss" => "modal"} ×
= t("actions.confirm_user_deactivation", username: user.username)
.modal-footer
= form_tag deactivate_user_path(user) do
%input.btn.btn-default.btn-danger{:type => "submit", :value => "#{t("actions.disable_user")}"}
- else
%button.btn.btn-default{:"data-toggle" => "modal", :"data-target" => "#user-form-#{user.id}", :type => "button"}
= t("actions.enable_user")
.modal.fade.hide{:id => "user-form-#{user.id}"}
.modal-dialog
.modal-content
.modal-header
%button.close{:"data-dismiss" => "modal"} ×
= t("actions.confirm_user_activation", username: user.username)
.modal-footer
= form_tag enable_user_path(user) do
%input.btn.btn-default.btn-danger{:type => "submit", :value => "#{t("actions.enable_user")}"}
|