= form_for [:admin, @table], html: {class: 'form-horizontal' } do |f| = render 'error_messages', target: @table .form-row .form-label= f.label :number .form-field= f.number_field :number .form-row class=(@table.errors[:supplier_id].any? ? 'error' : nil) .form-label= f.label :supplier_id, Supplier.model_name.human, class: 'control-label' .form-field= f.select :supplier_id, options_for_select(@suppliers.map{|a| [a.name, a.id]}), include_blank: nil /.form-actions = f.submit nil, class: 'btn btn-primary' ' = link_to t("helpers.links.cancel"), admin_tables_path, class: 'btn' /.form-row: .form-actions = f.submit @submit || update_button_text(f.object), class: 'button' = link_to t("helpers.links.cancel"), admin_tables_path, class: 'btn' - content_for :page_links do ul li= f.submit @submit || update_button_text(f.object), class: 'button' li= link_to link_to_index_content(Table), [:admin, Table], class: 'to-index-button'