- model_class = Table div.page-header= title :index, model_class .well - if @tables.any? table.table thead tr th.link= model_class.human_attribute_name(:number) th.link= Section.model_name.human th.timestamp= model_class.human_attribute_name(:created_at) th.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'