big refactor for test and admin namespace
This commit is contained in:
@@ -1,50 +0,0 @@
|
||||
= form_for @supplier, html: {class: 'form-horizontal' } do |f|
|
||||
= render 'error_messages', target: @supplier
|
||||
.control-group class=(@supplier.errors[:email].any? ? 'error' : nil)
|
||||
= f.label :email, class: 'control-label'
|
||||
.controls
|
||||
= f.text_field :email, class: 'text_field'
|
||||
.control-group class=(@supplier.errors[:encrypted_password].any? ? 'error' : nil)
|
||||
= f.label :encrypted_password, class: 'control-label'
|
||||
.controls
|
||||
= f.text_field :encrypted_password, class: 'text_field'
|
||||
.control-group class=(@supplier.errors[:remember_created_at].any? ? 'error' : nil)
|
||||
= f.label :remember_created_at, class: 'control-label'
|
||||
.controls
|
||||
= f.text_field :remember_created_at, class: 'text_field'
|
||||
.control-group class=(@supplier.errors[:reset_password_token].any? ? 'error' : nil)
|
||||
= f.label :reset_password_token, class: 'control-label'
|
||||
.controls
|
||||
= f.text_field :reset_password_token, class: 'text_field'
|
||||
.control-group class=(@supplier.errors[:reset_password_sent_at].any? ? 'error' : nil)
|
||||
= f.label :reset_password_sent_at, class: 'control-label'
|
||||
.controls
|
||||
= f.text_field :reset_password_sent_at, class: 'text_field'
|
||||
.control-group class=(@supplier.errors[:sign_in_count].any? ? 'error' : nil)
|
||||
= f.label :sign_in_count, class: 'control-label'
|
||||
.controls
|
||||
= f.text_field :sign_in_count, class: 'text_field'
|
||||
.control-group class=(@supplier.errors[:current_sign_in_at].any? ? 'error' : nil)
|
||||
= f.label :current_sign_in_at, class: 'control-label'
|
||||
.controls
|
||||
= f.text_field :current_sign_in_at, class: 'text_field'
|
||||
.control-group class=(@supplier.errors[:last_sign_in_at].any? ? 'error' : nil)
|
||||
= f.label :last_sign_in_at, class: 'control-label'
|
||||
.controls
|
||||
= f.text_field :last_sign_in_at, class: 'text_field'
|
||||
.control-group class=(@supplier.errors[:current_sign_in_ip].any? ? 'error' : nil)
|
||||
= f.label :current_sign_in_ip, class: 'control-label'
|
||||
.controls
|
||||
= f.text_field :current_sign_in_ip, class: 'text_field'
|
||||
.control-group class=(@supplier.errors[:last_sign_in_ip].any? ? 'error' : nil)
|
||||
= f.label :last_sign_in_ip, class: 'control-label'
|
||||
.controls
|
||||
= f.text_field :last_sign_in_ip, class: 'text_field'
|
||||
.control-group class=(@supplier.errors[:name].any? ? 'error' : nil)
|
||||
= f.label :name, class: 'control-label'
|
||||
.controls
|
||||
= f.text_field :name, class: 'text_field'
|
||||
.form-actions
|
||||
= f.submit nil, class: 'btn btn-primary'
|
||||
'
|
||||
= link_to t("helpers.links.cancel"), suppliers_path, class: 'btn'
|
||||
@@ -1,4 +0,0 @@
|
||||
- model_class = Supplier
|
||||
.page-header
|
||||
= title :edit, model_class
|
||||
= render 'form'
|
||||
@@ -1,42 +0,0 @@
|
||||
- model_class = Supplier
|
||||
div.page-header= title :index, model_class
|
||||
- if @suppliers.any?
|
||||
table.table.table-striped
|
||||
thead
|
||||
tr
|
||||
th= model_class.human_attribute_name(:email)
|
||||
th= model_class.human_attribute_name(:encrypted_password)
|
||||
th= model_class.human_attribute_name(:remember_created_at)
|
||||
th= model_class.human_attribute_name(:reset_password_token)
|
||||
th= model_class.human_attribute_name(:reset_password_sent_at)
|
||||
th= model_class.human_attribute_name(:sign_in_count)
|
||||
th= model_class.human_attribute_name(:current_sign_in_at)
|
||||
th= model_class.human_attribute_name(:last_sign_in_at)
|
||||
th= model_class.human_attribute_name(:current_sign_in_ip)
|
||||
th= model_class.human_attribute_name(:last_sign_in_ip)
|
||||
th= model_class.human_attribute_name(:name)
|
||||
th= model_class.human_attribute_name(:created_at)
|
||||
th=t 'helpers.actions'
|
||||
tbody
|
||||
- @suppliers.each do |supplier|
|
||||
tr
|
||||
td= link_to supplier.email, supplier
|
||||
td= supplier.encrypted_password
|
||||
td= supplier.remember_created_at
|
||||
td= supplier.reset_password_token
|
||||
td= supplier.reset_password_sent_at
|
||||
td= supplier.sign_in_count
|
||||
td= supplier.current_sign_in_at
|
||||
td= supplier.last_sign_in_at
|
||||
td= supplier.current_sign_in_ip
|
||||
td= supplier.last_sign_in_ip
|
||||
td= supplier.name
|
||||
td=l supplier.created_at, format: :short
|
||||
td
|
||||
= link_to t('helpers.links.edit'), [:edit, supplier], class: 'btn btn-mini'
|
||||
'
|
||||
= link_to t("helpers.links.destroy"), supplier, 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_supplier_path, class: 'btn btn-primary'
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
- model_class = Supplier
|
||||
.page-header
|
||||
= title :new, model_class
|
||||
= render 'form'
|
||||
@@ -1,33 +0,0 @@
|
||||
- model_class = Supplier
|
||||
.page-header= title :show, @supplier
|
||||
|
||||
dl.dl-horizontal.show-list
|
||||
dt= model_class.human_attribute_name(:email)
|
||||
dd= @supplier.email
|
||||
dt= model_class.human_attribute_name(:encrypted_password)
|
||||
dd= @supplier.encrypted_password
|
||||
dt= model_class.human_attribute_name(:remember_created_at)
|
||||
dd= @supplier.remember_created_at
|
||||
dt= model_class.human_attribute_name(:reset_password_token)
|
||||
dd= @supplier.reset_password_token
|
||||
dt= model_class.human_attribute_name(:reset_password_sent_at)
|
||||
dd= @supplier.reset_password_sent_at
|
||||
dt= model_class.human_attribute_name(:sign_in_count)
|
||||
dd= @supplier.sign_in_count
|
||||
dt= model_class.human_attribute_name(:current_sign_in_at)
|
||||
dd= @supplier.current_sign_in_at
|
||||
dt= model_class.human_attribute_name(:last_sign_in_at)
|
||||
dd= @supplier.last_sign_in_at
|
||||
dt= model_class.human_attribute_name(:current_sign_in_ip)
|
||||
dd= @supplier.current_sign_in_ip
|
||||
dt= model_class.human_attribute_name(:last_sign_in_ip)
|
||||
dd= @supplier.last_sign_in_ip
|
||||
dt= model_class.human_attribute_name(:name)
|
||||
dd= @supplier.name
|
||||
|
||||
.form-actions
|
||||
= link_to t("helpers.links.back"), suppliers_path, class: 'btn'
|
||||
'
|
||||
= link_to t('helpers.links.edit'), [:edit, @supplier], class: 'btn'
|
||||
'
|
||||
= link_to t("helpers.links.destroy"), @supplier, method: :delete, data: {confirm: are_you_sure? }, class: 'btn btn-danger'
|
||||
Reference in New Issue
Block a user