Files
mozo-backend/app/views/suppliers/tables/index.html.slim
T
2013-10-07 23:00:01 +02:00

37 lines
1.9 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'
.well
- 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), tables_view_suppliers_section_path(table.section)
td.timestamp data-time=table.created_at.try(:utc).try(:iso8601)
td.actions
= 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', 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', data: {t: 'helpers.links.new'}
'
= link_to t('supplier.tables.qr_codes.link'), qr_codes_suppliers_tables_path, class: 'btn btn-info', data: {t: 'tables.qr_codes.link'}