- content_for :navigation do = render partial: 'admin_navigation', locals: { active: :certificates } - content_for :title do Сертификаты - content_for :main do %table.table %thead %tr %th{:style => 'width: 100%'} Название %th %tbody - @certificates.each do |certificate| %tr %td %a{:href => edit_admin_certificate_path(certificate)}= certificate.title - if not certificate.published %span.label.label-warning Черновик %td = link_to admin_certificate_path(certificate), method: :delete, data: {confirm: 'Вы действительно хотите удалить сертификат "'+certificate.title+'"?'}, class: 'btn-dts-remove' do %span.glyphicon.glyphicon-remove = paginate @certificates, :theme => 'bootstrap', :window => 2 - content_for :manage do %a.btn.btn-default{:href => new_admin_certificate_path} Новый сертификат - content_for :filter do = search_form_for [:admin, @q] do |f| %fieldset .form-group = f.label :title_or_description_cont, 'Текст' = f.text_field :title_or_description_cont, class: 'form-control' .form-group = f.label :published_eq, 'Публикация' = f.select :published_eq, options_for_select([['Черновик', false], ['Опубликован', true]], f.object.published_eq), include_blank: true, class: 'form-control' = f.submit 'Фильтровать', :class => 'btn btn-default' %a.btn.btn-danger{ href: admin_certificates_path } Сбросить