summaryrefslogtreecommitdiff
path: root/app/views/users/_user.html.haml
blob: 1cabcf525a51f588d607e33625cdf0805b7416d8 (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
%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")}"}