Add some view structure
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
-# DEPRICATED
|
||||
= form_for [:suppliers, @section], html: {class: 'form-horizontal' } do |f|
|
||||
= render 'error_messages', target: @section
|
||||
.control-group class=(@section.errors[:title].any? ? 'error' : nil)
|
||||
@@ -12,10 +13,4 @@
|
||||
= f.label :height, class: 'control-label'
|
||||
.controls
|
||||
= f.text_field :height, class: ['text_field', :numeric]
|
||||
.form-actions
|
||||
= f.submit nil, class: 'btn btn-primary'
|
||||
- unless f.object.new_record?
|
||||
'
|
||||
= link_to t('supplier.tables.qr_codes.link'), qr_codes_suppliers_tables_path(section_id: @section.id), class: 'btn btn-info', data: {t: 'tables.qr_codes.link'}
|
||||
'
|
||||
= link_to t("helpers.links.cancel"), suppliers_sections_path, class: 'btn'
|
||||
= f.supplier_form_actions
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
-# DEPRICATED
|
||||
- model_class = Section
|
||||
.page-header
|
||||
= title :edit, model_class
|
||||
|
||||
@@ -1,30 +1,27 @@
|
||||
- model_class = Section
|
||||
.page-header= title :index, model_class
|
||||
.well
|
||||
- if @sections.any?
|
||||
table.table
|
||||
thead
|
||||
- if @sections.any?
|
||||
table.table
|
||||
thead
|
||||
tr
|
||||
th.link data-t='attributes.section.title' = model_class.human_attribute_name(:title)
|
||||
th.table-info data-t='models.plural.table' = Table.model_name.human_plural
|
||||
th.numeric data-t='attributes.section.width' = model_class.human_attribute_name(:width)
|
||||
th.numeric data-t='attributes.section.height' = model_class.human_attribute_name(:height)
|
||||
th.actions data-t='helpers.actions.title' = t 'helpers.actions.title'
|
||||
tbody
|
||||
- @sections.each do |section|
|
||||
tr
|
||||
th.link data-t='attributes.section.title' = model_class.human_attribute_name(:title)
|
||||
th.table-info data-t='models.plural.table' = Table.model_name.human_plural
|
||||
th.numeric data-t='attributes.section.width' = model_class.human_attribute_name(:width)
|
||||
th.numeric data-t='attributes.section.height' = model_class.human_attribute_name(:height)
|
||||
th.actions data-t='helpers.actions.title' = t 'helpers.actions.title'
|
||||
tbody
|
||||
- @sections.each do |section|
|
||||
tr
|
||||
td.link= link_to section.title, [:suppliers, section]
|
||||
td.table-info
|
||||
span.table-count= section.tables.size
|
||||
span.active-table-count= (@active_table_ids & section.tables.map(&:id)).size
|
||||
td.numeric= section.width
|
||||
td.numeric= section.height
|
||||
td.actions
|
||||
= link_to t('supplier.tables.qr_codes.link'), qr_codes_suppliers_tables_path(section_id: section.id), class: 'btn btn-mini btn-info', data: {t: 'tables.qr_codes.link'}
|
||||
'
|
||||
= link_to t("helpers.links.destroy"), [:suppliers, section], method: :delete, data: {confirm: are_you_sure?, t: 'helpers.links.destroy'}, class: 'btn btn-mini btn-danger'
|
||||
- else
|
||||
= no_content_given model_class
|
||||
.form-actions
|
||||
= link_to new_suppliers_section_path, class: 'form-action-new'
|
||||
span data-t="helpers.links.new"
|
||||
td.link= link_to section.title, [:suppliers, section]
|
||||
td.table-info
|
||||
span.table-count= section.tables.size
|
||||
span.active-table-count= (@active_table_ids & section.tables.map(&:id)).size
|
||||
td.numeric= section.width
|
||||
td.numeric= section.height
|
||||
td.actions
|
||||
= link_to t('supplier.tables.qr_codes.link'), qr_codes_suppliers_tables_path(section_id: section.id), class: 'btn btn-mini btn-info', data: {t: 'tables.qr_codes.link'}
|
||||
'
|
||||
= link_to t("helpers.links.destroy"), [:suppliers, section], method: :delete, data: {confirm: are_you_sure?, t: 'helpers.links.destroy'}, class: 'btn btn-mini btn-danger'
|
||||
- else
|
||||
= no_content_given model_class
|
||||
= supplier_form_actions :new, for: :sections
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
-# DEPRICATED
|
||||
- model_class = Section
|
||||
.page-header
|
||||
h1 data-t='section.manage_tables.title' data-t-attributes=%|{"title":"#{@section.title}"}|
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
-# DEPRICATED
|
||||
- model_class = Section
|
||||
.page-header
|
||||
= title :new, model_class
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
-# DEPRICATED
|
||||
- model_class = Section
|
||||
- content_for :head do
|
||||
= javascript_include_tag 'supplier/app/application'
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
-# DEPRICATED
|
||||
ul#table-actions-list
|
||||
- if @list
|
||||
- if @list.needs_help?
|
||||
|
||||
Reference in New Issue
Block a user