table.table
  thead
    tr
      th data-t='attributes.list.state' = List.human_attribute_name(:state)
      th data-t='attributes.list.needs_help' = List.human_attribute_name(:needs_help)
      th data-t='attributes.list.needs_payment' = List.human_attribute_name(:needs_payment)
      th data-t='attributes.list.closed_at' = List.human_attribute_name(:closed_at)
      th data-t='models.table' = Table.model_name.human
      th.currency data-t='attributes.list.price' = List.human_attribute_name(:price)
      th.timestamp data-t='attributes.list.created_at' = List.human_attribute_name(:created_at)
      th.actions data-t='helpers.actions.title' =t 'helpers.actions.title'
  tbody
    - lists.each do |list|
      tr
        td= link_to list.state, [:suppliers, list]
        td.boolean.needs_help
          span data-boolean=list.needs_help.to_s
        td.boolean.needs_payment
          span data-boolean=list.needs_payment.to_s
        td.timestamp data-time=list.closed_at.try(:utc).try(:iso8601)
        td= link_to_if list.table.present?, list.table_number, [:suppliers, list.table]
        td.currency= list.price.present? ? currency(list.price) : '...'
        td.timestamp data-time=list.created_at.utc.iso8601
        td.actions
          = link_to [:edit, :suppliers, list], class: 'table-edit' do
            span data-title="helpers.links.edit"
          = link_to [:suppliers, list], method: :delete, data: {confirm: are_you_sure? }, class: 'table-destroy' do
            span data-title="helpers.links.destroy"
