38 lines
1.8 KiB
Plaintext
38 lines
1.8 KiB
Plaintext
- model_class = Table
|
|
div.page-header= title :index, model_class
|
|
= form_tag({}, method: :get) do
|
|
label.number for="filter-from_number" data-t="attributes.table.from_number"
|
|
input#filter-from_number.number type="number" size=4 value=params[:from_number] name="from_number"
|
|
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'
|
|
- if @tables.any?
|
|
= paginate @tables
|
|
table.table
|
|
thead
|
|
tr
|
|
th.link data-t="attributes.table.number"= model_class.human_attribute_name(:number)
|
|
th.link data-t="models.section"= Section.model_name.human
|
|
th.timestamp data-t="attributes.table.created_at"= model_class.human_attribute_name(:created_at)
|
|
th.actions data-t="helpers.actions.title"=t 'helpers.actions.title'
|
|
tbody
|
|
- @tables.each do |table|
|
|
tr
|
|
td.link= link_to table.number, [:suppliers, table]
|
|
td.link= link_to_if table.section.present?, table.section.try(:title), [:suppliers, table.section]
|
|
td.timestamp data-time=table.created_at.try(:utc).try(:iso8601)
|
|
td.actions
|
|
= link_to [:edit, :suppliers, table], class: 'table-edit' do
|
|
span data-title="helpers.links.edit"
|
|
= link_to [:suppliers, table], method: :delete, data: {confirm: are_you_sure? }, class: 'table-destroy' do
|
|
span data-title="helpers.links.destroy"
|
|
- else
|
|
= no_content_given model_class
|
|
|
|
.form-actions
|
|
= link_to new_suppliers_table_path, class: 'form-action-new'
|
|
span data-t="helpers.links.new"
|
|
= 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"
|