supplier improvements
This commit is contained in:
@@ -1,13 +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'
|
||||
= 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, Supplier.model_name.human, class: 'control-label'
|
||||
= f.label :section_id, Section.model_name.human, class: 'control-label', data: {t: 'models.section'}
|
||||
.controls
|
||||
= f.collection_select :section_id, current_supplier.sections, :id, :title, include_blank: "[#{t('table.has_no_section')}]"
|
||||
= f.collection_select :section_id, current_supplier.sections, :id, :title, include_blank: "[#{t('supplier.tables.has_no_section')}]"
|
||||
.form-actions
|
||||
= f.submit nil, class: 'btn btn-primary'
|
||||
'
|
||||
|
||||
@@ -24,13 +24,13 @@ div.page-header= title :index, model_class
|
||||
td.link= link_to_if table.section.present?, table.section.try(:title), [:suppliers, table.section]
|
||||
td.timestamp data-time=table.created_at.utc.iso8601
|
||||
td.actions
|
||||
= link_to t('helpers.links.edit'), [:edit, :suppliers, table], class: 'btn btn-mini'
|
||||
= link_to t('helpers.links.edit'), [:edit, :suppliers, table], class: 'btn btn-mini', data: {t: 'helpers.links.edit'}
|
||||
'
|
||||
= link_to t("helpers.links.destroy"), [:suppliers, table], method: :delete, data: {confirm: are_you_sure? }, class: 'btn btn-mini btn-danger'
|
||||
= link_to t("helpers.links.destroy"), [:suppliers, table], method: :delete, data: {confirm: are_you_sure? }, class: 'btn btn-mini btn-danger', data: {t: 'helpers.links.destroy'}
|
||||
- else
|
||||
= no_content_given model_class
|
||||
|
||||
.form-actions
|
||||
= link_to t("helpers.links.new"), new_suppliers_table_path, class: 'btn btn-primary'
|
||||
= link_to t("helpers.links.new"), new_suppliers_table_path, class: 'btn btn-primary', data: {t: 'helpers.links.new'}
|
||||
'
|
||||
= link_to t('supplier.tables.qr_codes.link'), qr_codes_suppliers_tables_path, class: 'btn btn-info'
|
||||
= link_to t('supplier.tables.qr_codes.link'), qr_codes_suppliers_tables_path, class: 'btn btn-info', data: {t: 'tables.qr_codes.link'}
|
||||
|
||||
Reference in New Issue
Block a user