End of week commit
This commit is contained in:
@@ -1,11 +1,13 @@
|
||||
= form_for [:suppliers, @table], html: {class: 'form-horizontal' } do |f|
|
||||
= render 'error_messages', target: @table
|
||||
.control-group class=(@table.errors[:number].any? ? 'error' : nil)
|
||||
= f.label :number, class: 'control-label', data: {t: 'attributes.table.number'}
|
||||
.controls
|
||||
= f.text_field :number, class: 'text_field'
|
||||
.control-group class=(@table.errors[:section_id].any? ? 'error' : nil)
|
||||
= f.label :section_id, Section.model_name.human, class: 'control-label', data: {t: 'models.section'}
|
||||
.controls
|
||||
.form-row class=(@table.errors[:number].any? ? 'error' : nil)
|
||||
.form-label
|
||||
= f.label :number
|
||||
.form-field
|
||||
= f.number_field :number
|
||||
.form-row class=(@table.errors[:section_id].any? ? 'error' : nil)
|
||||
.form-label
|
||||
= f.label :section_id, Section.model_name.human, class: 'control-label', data: {t: 'models.section'}
|
||||
.form-field
|
||||
= f.collection_select :section_id, current_supplier.sections, :id, :title, include_blank: "[#{t('supplier.tables.has_no_section')}]"
|
||||
= f.supplier_form_actions
|
||||
|
||||
@@ -6,7 +6,7 @@ div.page-header= title :index, model_class
|
||||
label.number for="filter-to_number" data-t="attributes.table.to_number"
|
||||
input#filter-to_number.number type="number" size=4 value=params[:to_number] name="to_number"
|
||||
'
|
||||
= submit_tag 'Filter'
|
||||
= submit_tag 'Filter', class: 'apply-filter'
|
||||
- if @tables.any?
|
||||
= paginate @tables
|
||||
table.table
|
||||
|
||||
@@ -1,10 +1,13 @@
|
||||
- model_class = Table
|
||||
.page-header= title :show, @table
|
||||
|
||||
dl.dl-horizontal.show-list
|
||||
dt= model_class.human_attribute_name(:number)
|
||||
dd= @table.number
|
||||
- if @table.section.present?
|
||||
dt= Section.model_name.human
|
||||
dd= link_to @table.section.title, [:suppliers, @table.section]
|
||||
.display-row
|
||||
.display-label
|
||||
span data-t='attributes.table.number'
|
||||
.display-field
|
||||
span= @table.number
|
||||
- if @table.section.present?
|
||||
.display-row
|
||||
.display-label
|
||||
span data-t='models.section'
|
||||
.display-field
|
||||
span= link_to @table.section.title, [:suppliers, @table.section]
|
||||
= supplier_form_actions :index, :edit, :destroy, object: @table, for: :tables
|
||||
|
||||
Reference in New Issue
Block a user