Add some view structure
This commit is contained in:
@@ -8,7 +8,4 @@
|
||||
= 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('supplier.tables.has_no_section')}]"
|
||||
.form-actions
|
||||
= f.submit nil, class: 'btn btn-primary save-table-button'
|
||||
'
|
||||
= link_to t("helpers.links.cancel"), suppliers_tables_path, class: 'btn'
|
||||
= f.supplier_form_actions
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
- model_class = Table
|
||||
.page-header
|
||||
= title :edit, model_class
|
||||
= render 'form'
|
||||
= render 'form'
|
||||
|
||||
@@ -30,8 +30,6 @@ div.page-header= title :index, model_class
|
||||
- else
|
||||
= no_content_given model_class
|
||||
|
||||
.form-actions
|
||||
= link_to new_suppliers_table_path, class: 'form-action-new'
|
||||
span data-t="helpers.links.new"
|
||||
= supplier_form_actions :new, for: :tables do
|
||||
= link_to qr_codes_suppliers_tables_path(params.slice(:from_number, :to_number)), class: 'form-action-qr-codes', target: :_blank
|
||||
span data-t="tables.qr_codes.link"
|
||||
|
||||
@@ -7,11 +7,4 @@ dl.dl-horizontal.show-list
|
||||
- if @table.section.present?
|
||||
dt= Section.model_name.human
|
||||
dd= link_to @table.section.title, [:suppliers, @table.section]
|
||||
//= supplier_form_actions :index, :edit, :destroy, object: @table, for: :tables
|
||||
.form-actions
|
||||
= link_to [:suppliers, :tables], class: 'form-action-index'
|
||||
span data-t="helpers.links.index"
|
||||
= link_to [:edit, :suppliers, @table], class: 'form-action-edit'
|
||||
span data-t="helpers.links.edit"
|
||||
= link_to [:suppliers, @table], method: :delete, data: {confirm: are_you_sure? }, class: 'form-action-destroy'
|
||||
span data-t="helpers.links.destroy"
|
||||
= supplier_form_actions :index, :edit, :destroy, object: @table, for: :tables
|
||||
|
||||
Reference in New Issue
Block a user