33 lines
1.3 KiB
Plaintext
33 lines
1.3 KiB
Plaintext
- model_class = List
|
|
div.page-header= title :index, model_class
|
|
- if @lists.any?
|
|
table.table.table-striped
|
|
thead
|
|
tr
|
|
th= model_class.human_attribute_name(:state)
|
|
th= model_class.human_attribute_name(:needs_help)
|
|
th= model_class.human_attribute_name(:needs_payment)
|
|
th= model_class.human_attribute_name(:closed_at)
|
|
th= Table.model_name.human
|
|
th= Supplier.model_name.human
|
|
th= model_class.human_attribute_name(:created_at)
|
|
th=t 'helpers.actions.title'
|
|
tbody
|
|
- @lists.each do |list|
|
|
tr
|
|
td= link_to list.state, [:admin, list]
|
|
td= show_boolean list.needs_help
|
|
td= show_boolean list.needs_payment
|
|
td= list.closed_at
|
|
td= link_to_if list.table.present?, list.table.try(:number), [:admin, list.table]
|
|
td= link_to list.supplier.name, [:admin, list.supplier]
|
|
td=l list.created_at, format: :short
|
|
td
|
|
= link_to t('helpers.links.edit'), [:edit, :admin, list], class: 'btn btn-mini'
|
|
'
|
|
= link_to t("helpers.links.destroy"), [:admin, list], 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_list_path, class: 'btn btn-primary'
|
|
|