- model_class = Order - title :index, model_class - if @orders.any? table.table.table-striped thead tr th= model_class.human_attribute_name(:state) th= Supplier.model_name.human th= model_class.human_attribute_name(:created_at) th=t 'helpers.actions.title' tbody - @orders.each do |order| tr td= link_to order.state, [:admin, order] td= link_to_if order.supplier.present?, order.supplier.try(:name), [:admin, order.supplier] td=l order.created_at, format: :short td = link_to t('helpers.links.edit'), [:edit, :admin, order], class: 'btn btn-mini' ' = link_to t("helpers.links.destroy"), [:admin, order], 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_order_path, class: 'btn btn-primary'