28 lines
1.0 KiB
Plaintext
28 lines
1.0 KiB
Plaintext
- model_class = Table
|
|
- title :index, model_class
|
|
- if @tables.any?
|
|
table.table.table-striped
|
|
thead
|
|
tr
|
|
th= model_class.human_attribute_name(:number)
|
|
th= Supplier.model_name.human
|
|
th= model_class.human_attribute_name(:created_at)
|
|
th=t 'helpers.actions.title'
|
|
tbody
|
|
- @tables.each do |table|
|
|
tr
|
|
td= link_to table.number, [:admin, table]
|
|
td= link_to table.supplier.name, [:admin, table.supplier]
|
|
td=l table.created_at, format: :short
|
|
td
|
|
= link_to t('helpers.links.edit'), [:edit, :admin, table], class: 'btn btn-mini'
|
|
'
|
|
= link_to t("helpers.links.destroy"), [:admin, table], method: :delete, data: {confirm: are_you_sure? }, class: 'btn btn-mini btn-danger'
|
|
- else
|
|
= no_content_given model_class
|
|
/= link_to t("helpers.links.new"), new_admin_table_path, class: 'btn btn-primary'
|
|
|
|
- content_for :page_links do
|
|
ul
|
|
li= link_to link_to_new_content(Table), new_admin_table_path, class: 'record-new-button'
|