summaryrefslogtreecommitdiff
path: root/app/views/users/_user.html.haml
blob: e34de701c0bbcc942040d022d99e7cb968781839 (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
    = simple_date(user.created_at)
  %td
    = simple_date(user.updated_at)
  %td
    - if user.enabled
      %button.btn.btn-sm.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-sm.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")}"}