.container-fluid.bg_light .row .col-md-12 .page_header %h1 #{t('admin.actions.index.title', model_label_plural: content_type_name_plural)} .hr .row .col-md-12 .breadcrumb .row .col-md-12 %ul.nav.nav-tabs %li.nav-item = link_to '', class: 'nav-link active', method: :get do %i.fa.fa-list = t('admin.actions.index.menu').capitalize .row .col-md-12 .tab-content.list .tab-pane.fade.show.active %nav.navbar.navbar-light.bg-light.filter = simple_form_for t("activerecord.models.#{params[:type].underscore}.slug"), :url =>"/admin/"+t("activerecord.models.#{params[:type].underscore}.slugadm"), :method => :get, :id=>'form_filter', html: { class: "form-inline"} do |f| = f.input 'text', class: 'form-control mr-sm-2', placeholder: t('admin.misc.filter'), input_html: { name: 'q',value: params[:q]} = button_tag :button, class: 'btn btn-outline-success' do %i.fa.fa-refresh = t('admin.misc.refresh') = button_tag 'button', :type => 'button', class: 'btn btn-outline-danger', :onclick => 'location.href = ' + '"' + '/admin/'+t("activerecord.models.#{params[:type].underscore}.slugadm") + '"' do %i.fa.fa-times = link_to t('admin.misc.add_new'), new_content_type_path, class: 'btn btn-default submit_buttons' %div{:style => "overflow-x:auto"} %table.table.table-condensed.table-striped %thead %tr %th #{t('activerecord.attributes.content.published').titleize} %th #{t('activerecord.attributes.content.title').titleize} %th #{t('activerecord.attributes.application_record.slug').titleize} %th #{t('activerecord.attributes.application_record.created_at').titleize} %th #{t('activerecord.attributes.project.publish_date').titleize} %th %th %tbody - @contents.each do |content| %tr %td - if content.published? = button_to unpublish_content_type_path(content), method: :patch, data:{confirm: "Deseja mesmo despublicar #{content.title}"}, class: 'publish_button' do %i.fa.fa-eye-slash.fa-fw.fa-inverse - else = button_to publish_content_type_path(content), method: :patch, data:{confirm: "Deseja mesmo publicar #{content.title}"}, class: 'publish_button' do %i.fa.fa-eye.fa-fw.fa-inverse %td= content.title %td= content.slug %td= l(content.created_at, format: :short) - if(content.publish_date.nil?) %td - - else %td= l(content.publish_date, format: :short) %td = link_to edit_content_type_path(content) do %i.fa.fa-pencil.fa-fw.fa-inverse = link_to "/#{content.slug}", target: :blank do %i.fa.fa-camera.fa-inverse %td = button_to content_type_path(content), method: :delete, data:{confirm: "Deseja mesmo excluir #{content.title}"} do %i.fa.fa-times.fa-fw.fa-inverse .col-md-12 -if @contents.present? = paginate @contents, params: { controller: 'contents', action: 'of_type', type: @contents.first.type.tableize }