Sha256: 90fc8fb3c935af4e14acfe5bbe4371129d281aea06786d2e6dd835fd67401cec

Contents?: true

Size: 1.7 KB

Versions: 73

Compression:

Stored size: 1.7 KB

Contents

- content_for :sidebar do
  .sidebar
    .content
      %h2 Users
      = link_to "New User", new_user_path, class: 'btn btn-block btn-primary'

= form_for @user, :builder => Tenon::FormBuilder do |f|
  = error_messages_for :user

  .fields.large
    .form-group
      = f.text_field :email, :autocomplete => "off"

    .form-group.bordered
      - if @user.persisted?
        = f.super_label :password, "New Password"
      - else
        = f.super_label :password
      = f.password_field :password, :autocomplete => "off"
    .form-group
      - if @user.persisted?
        = f.super_label :password_confirmation, "Confirm New Password"
      - else
        = f.super_label :password_confirmation, "Confirm Password"
      = f.password_field :password_confirmation

  .fields.small
    %h4.box-label Roles
    .explanation Roles define a user's abilities throughout the site.
    .box
      .form-group.inline
        - @roles.each do |role|
          - unless (role.title == "Super Admin" && !current_user.is_super_admin?) || (role.title == "Admin" && !current_user.is_admin?)
            = check_box_tag('user[role_ids][]', role.id, @user.role_ids.include?(role.id), class: 'tn-checkbox-right', id: "role_id_#{role.id}")
            %label{ for: "role_id_#{role.id}" }= role.title
            .spacer

    %h4.box-label Actions
    .box
      .content
        = f.check_box :approved, class: 'tn-checkbox-right'
        = f.super_label :approved, "Approved?"

      .content
        = f.submit "Save", :class => 'btn btn-block btn-comp'

      - if @user.persisted?
        %hr
        .content
          = link_to "Delete", @user, :data => {:method => :delete, :confirm => "Are you sure you want to delete this?"}, :class => 'delete-link'

Version data entries

73 entries across 73 versions & 1 rubygems

Version Path
tenon-1.0.74 app/views/tenon/users/_form.html.haml
tenon-1.0.73 app/views/tenon/users/_form.html.haml
tenon-1.0.72 app/views/tenon/users/_form.html.haml
tenon-1.0.71 app/views/tenon/users/_form.html.haml
tenon-1.0.70 app/views/tenon/users/_form.html.haml
tenon-1.0.69 app/views/tenon/users/_form.html.haml
tenon-1.0.68 app/views/tenon/users/_form.html.haml
tenon-1.0.67 app/views/tenon/users/_form.html.haml
tenon-1.0.66 app/views/tenon/users/_form.html.haml
tenon-1.0.65 app/views/tenon/users/_form.html.haml
tenon-1.0.64 app/views/tenon/users/_form.html.haml
tenon-1.0.63 app/views/tenon/users/_form.html.haml
tenon-1.0.62 app/views/tenon/users/_form.html.haml
tenon-1.0.61 app/views/tenon/users/_form.html.haml
tenon-1.0.60 app/views/tenon/users/_form.html.haml
tenon-1.0.59 app/views/tenon/users/_form.html.haml
tenon-1.0.57 app/views/tenon/users/_form.html.haml
tenon-1.0.56 app/views/tenon/users/_form.html.haml
tenon-1.0.55 app/views/tenon/users/_form.html.haml
tenon-1.0.54 app/views/tenon/users/_form.html.haml