summaryrefslogtreecommitdiff
path: root/app/views/users
diff options
context:
space:
mode:
authorEvyW <evy_mcr@hotmail.com>2015-09-22 15:39:29 -0500
committerEvyW <evy_mcr@hotmail.com>2015-09-22 15:39:29 -0500
commit0af541e20e4343d20dd89cb73ef1d2f01f5c55f6 (patch)
tree5fe8450286dca47728dab7c3ca81f506fc5530f9 /app/views/users
parent5da852740580ba0e48dbab04c43750de843bf131 (diff)
commit user haml
Diffstat (limited to 'app/views/users')
-rw-r--r--app/views/users/_user.html.haml36
1 files changed, 32 insertions, 4 deletions
diff --git a/app/views/users/_user.html.haml b/app/views/users/_user.html.haml
index 583d22f..2d2f262 100644
--- a/app/views/users/_user.html.haml
+++ b/app/views/users/_user.html.haml
@@ -1,4 +1,32 @@
-%tr
- %td= link_to user.login, user
- %td= l(user.created_at, :format => :short)
- %td= l(user.updated_at, :format => :short)
+ %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")}"}