Sha256: 6a8fb91ade02d22a4519582a1f2e147e109f81802540d5fe60fc4ae8e9cda689

Contents?: true

Size: 767 Bytes

Versions: 7

Compression:

Stored size: 767 Bytes

Contents

Trestle.resource(:<%= plural_name %>, model: Trestle.config.auth.user_class, scope: Auth) do
  menu do
    group :configuration, priority: :last do
      item :<%= plural_name %>, icon: "fa fa-users"
    end
  end

  table do
    column :avatar, header: false do |administrator|
      avatar_for(administrator)
    end
    column :email, link: true
    column :first_name
    column :last_name
    actions do |a|
      a.delete unless a.instance == current_user
    end
  end

  form do |administrator|
    text_field :email

    row do
      col(sm: 6) { text_field :first_name }
      col(sm: 6) { text_field :last_name }
    end

    row do
      col(sm: 6) { password_field :password }
      col(sm: 6) { password_field :password_confirmation }
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
trestle-auth-0.3.0 lib/generators/trestle/auth/admin/templates/admin.rb.erb
trestle-auth-0.2.5 lib/generators/trestle/auth/admin/templates/admin.rb.erb
trestle-auth-0.2.4 lib/generators/trestle/auth/admin/templates/admin.rb.erb
trestle-auth-0.2.3 lib/generators/trestle/auth/admin/templates/admin.rb.erb
trestle-auth-0.2.2 lib/generators/trestle/auth/admin/templates/admin.rb.erb
trestle-auth-0.2.1 lib/generators/trestle/auth/admin/templates/admin.rb.erb
trestle-auth-0.2.0 lib/generators/trestle/auth/admin/templates/admin.rb.erb