Files
mozo-backend/app/views/suppliers/tables/index.html.slim
T
2013-01-17 10:28:05 +01:00

29 lines
1.3 KiB
Plaintext

- model_class = Table
div.page-header= title :index, model_class
.well
- if @tables.any?
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"=t 'helpers.actions'
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=l table.created_at, format: :short
td.actions
= link_to t('helpers.links.edit'), [:edit, :suppliers, table], class: 'btn btn-mini'
'
= link_to t("helpers.links.destroy"), [:suppliers, table], method: :delete, data: {confirm: are_you_sure? }, class: 'btn btn-mini btn-danger'
- 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('supplier.tables.qr_codes.link'), qr_codes_suppliers_tables_path, class: 'btn btn-info'