big refactor for test and admin namespace
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
= simple_form_for [:admin, @user], html: {class: 'form-horizontal' } do |f|
|
||||
= render 'error_messages', target: @user
|
||||
= f.input :email
|
||||
.form-actions
|
||||
= f.submit nil, class: 'btn btn-primary'
|
||||
'
|
||||
= link_to t("helpers.links.cancel"), admin_users_path, class: 'btn'
|
||||
@@ -0,0 +1,3 @@
|
||||
- model_class = User
|
||||
.page-header= title :edit, model_class
|
||||
= render 'form'
|
||||
@@ -0,0 +1,22 @@
|
||||
- model_class = User
|
||||
.page-header= title :index, model_class
|
||||
- if @users.any?
|
||||
table.table.table-striped
|
||||
thead
|
||||
tr
|
||||
th= model_class.human_attribute_name(:email)
|
||||
th= model_class.human_attribute_name(:created_at)
|
||||
th=t 'helpers.actions'
|
||||
tbody
|
||||
- @users.each do |user|
|
||||
tr
|
||||
td= link_to user.email, [:admin, user]
|
||||
td=l user.created_at, format: :short
|
||||
td
|
||||
= link_to t('helpers.links.edit'), [:edit, :admin, user], class: 'btn btn-mini'
|
||||
'
|
||||
= link_to t("helpers.links.destroy"), [:admin, user], method: :delete, data: {confirm: are_you_sure? }, class: 'btn btn-mini btn-danger'
|
||||
- else
|
||||
= no_content_given model_class
|
||||
= link_to t("helpers.links.new"), new_admin_user_path, class: 'btn btn-primary'
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
- model_class = User
|
||||
.page-header
|
||||
= title :new, model_class
|
||||
= render 'form'
|
||||
@@ -0,0 +1,31 @@
|
||||
- model_class = User
|
||||
.page-header= title :show, @user
|
||||
|
||||
dl.dl-horizontal.show-list
|
||||
dt= model_class.human_attribute_name(:email)
|
||||
dd= @user.email
|
||||
dt= model_class.human_attribute_name(:encrypted_password)
|
||||
dd= @user.encrypted_password
|
||||
dt= model_class.human_attribute_name(:remember_created_at)
|
||||
dd= @user.remember_created_at
|
||||
dt= model_class.human_attribute_name(:reset_password_token)
|
||||
dd= @user.reset_password_token
|
||||
dt= model_class.human_attribute_name(:reset_password_sent_at)
|
||||
dd= @user.reset_password_sent_at
|
||||
dt= model_class.human_attribute_name(:sign_in_count)
|
||||
dd= @user.sign_in_count
|
||||
dt= model_class.human_attribute_name(:current_sign_in_at)
|
||||
dd= @user.current_sign_in_at
|
||||
dt= model_class.human_attribute_name(:last_sign_in_at)
|
||||
dd= @user.last_sign_in_at
|
||||
dt= model_class.human_attribute_name(:current_sign_in_ip)
|
||||
dd= @user.current_sign_in_ip
|
||||
dt= model_class.human_attribute_name(:last_sign_in_ip)
|
||||
dd= @user.last_sign_in_ip
|
||||
|
||||
.form-actions
|
||||
= link_to t("helpers.links.back"), admin_users_path, class: 'btn'
|
||||
'
|
||||
= link_to t('helpers.links.edit'), [:edit, :admin, @user], class: 'btn'
|
||||
'
|
||||
= link_to t("helpers.links.destroy"), [:admin, @user], method: :delete, data: {confirm: are_you_sure? }, class: 'btn btn-danger'
|
||||
Reference in New Issue
Block a user