31 lines
1.4 KiB
Plaintext
31 lines
1.4 KiB
Plaintext
/- model_class = Section
|
|
/.page-header= title :index, model_class
|
|
- content_for :head do
|
|
= javascript_include_tag 'supplier/app/application'
|
|
/- 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
|
|
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 polymorphic_path([:qr_codes, :suppliers, :tables], section_id: section.id), class: 'table-qr-codes' do
|
|
span data-title="helpers.links.qr_codes"
|
|
= link_to [:suppliers, section], method: :delete, data: {confirm: are_you_sure? }, class: 'table-destroy' do
|
|
span data-title="helpers.links.destroy"
|
|
/- else
|
|
= no_content_given model_class
|
|
/= supplier_form_actions :new, for: :sections
|