progress today, clicking and fixing
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
- model_class = Order
|
||||
div.page-header= title :index, model_class
|
||||
- title :index, model_class
|
||||
- if @orders.any?
|
||||
table.table.table-striped
|
||||
thead
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
- model_class = ProductCategory
|
||||
.page-header= title :index, model_class
|
||||
- title :index, model_class
|
||||
- if @product_categories.any?
|
||||
table.table.table-striped
|
||||
thead
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
- model_class = Product
|
||||
.page-header= title :index, model_class
|
||||
- title :index, model_class
|
||||
- if @products.any?
|
||||
table.table.table-striped
|
||||
thead
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
- model_class = Section
|
||||
.page-header= title :index, model_class
|
||||
- title :index, model_class
|
||||
- if @sections.any?
|
||||
table.table.table-striped
|
||||
thead
|
||||
|
||||
@@ -1,11 +1,19 @@
|
||||
= simple_form_for [:admin, @table], html: {class: 'form-horizontal' } do |f|
|
||||
= form_for [:admin, @table], html: {class: 'form-horizontal' } do |f|
|
||||
= render 'error_messages', target: @table
|
||||
= f.input :number
|
||||
.control-group class=(@table.errors[:supplier_id].any? ? 'error' : nil)
|
||||
= f.label :supplier_id, Supplier.model_name.human, class: 'control-label'
|
||||
.controls
|
||||
= f.select :supplier_id, options_for_select(@suppliers.map{|a| [a.name, a.id]}), include_blank: nil
|
||||
.form-actions
|
||||
.form-row
|
||||
.form-label= f.label :number
|
||||
.form-field= f.number_field :number
|
||||
.form-row class=(@table.errors[:supplier_id].any? ? 'error' : nil)
|
||||
.form-label= f.label :supplier_id, Supplier.model_name.human, class: 'control-label'
|
||||
.form-field= f.select :supplier_id, options_for_select(@suppliers.map{|a| [a.name, a.id]}), include_blank: nil
|
||||
/.form-actions
|
||||
= f.submit nil, class: 'btn btn-primary'
|
||||
'
|
||||
= link_to t("helpers.links.cancel"), admin_tables_path, class: 'btn'
|
||||
/.form-row: .form-actions
|
||||
= f.submit @submit || update_button_text(f.object), class: 'button'
|
||||
= link_to t("helpers.links.cancel"), admin_tables_path, class: 'btn'
|
||||
- content_for :page_links do
|
||||
ul
|
||||
li= f.submit @submit || update_button_text(f.object), class: 'button'
|
||||
li= link_to link_to_index_content(Table), [:admin, Table], class: 'to-index-button'
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
- model_class = Table
|
||||
.page-header= title :edit, model_class
|
||||
= render 'form'
|
||||
- title :edit, model_class
|
||||
= render 'form'
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
- model_class = Table
|
||||
div.page-header= title :index, model_class
|
||||
- title :index, model_class
|
||||
- if @tables.any?
|
||||
table.table.table-striped
|
||||
thead
|
||||
@@ -20,5 +20,8 @@ div.page-header= title :index, model_class
|
||||
= link_to t("helpers.links.destroy"), [:admin, table], 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_table_path, class: 'btn btn-primary'
|
||||
/= link_to t("helpers.links.new"), new_admin_table_path, class: 'btn btn-primary'
|
||||
|
||||
- content_for :page_links do
|
||||
ul
|
||||
li= link_to link_to_new_content(Table), new_admin_table_path, class: 'record-new-button'
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
- model_class = Table
|
||||
.page-header
|
||||
= title :new, model_class
|
||||
- title :edit, model_class
|
||||
= render 'form'
|
||||
|
||||
Reference in New Issue
Block a user