.container-fluid.bg_light .row .col-md-12 .page_header %h1 #{t('admin.actions.index.title', model_label_plural: 'Pessoas')} .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 = link_to t('admin.misc.add_new'), new_admin_institucional_person_path, class: 'btn btn-default submit_buttons' - @groups.each do |group| -if group.institucional_persons.count > 0 %div#table_group=group.name %table.table.table-condensed.table-striped.institucional_persons_table %thead %tr %th #{t('activerecord.attributes.institucional_person.name').titleize} %th #{t('activerecord.attributes.institucional_person.role').titleize} %th %tbody.institucional_persons_order{"data-url" => sort_admin_institucional_person_index_path} - @institucionalPersons.each_with_index do |institucionalPerson, index| -if institucionalPerson.institucional_persons_group_id == group.id %tr{id: 'institucional_'+institucionalPerson.id.gsub('-','#')} %td= institucionalPerson.name %td= institucionalPerson.role %td - if institucionalPerson.published? = button_to unpublish_admin_institucional_person_path(institucionalPerson), method: :patch, data:{confirm: "Deseja mesmo despublicar #{institucionalPerson.name}"}, class: 'publish_button' do %i.fa.fa-eye-slash.fa-fw.fa-inverse - else = button_to publish_admin_institucional_person_path(institucionalPerson), method: :patch, data:{confirm: "Deseja mesmo publicar #{institucionalPerson.name}"}, class: 'publish_button' do %i.fa.fa-eye.fa-fw.fa-inverse = link_to edit_admin_institucional_person_path(institucionalPerson) do %i.fa.fa-pencil.fa-fw.fa-inverse = button_to admin_institucional_person_path(institucionalPerson), method: :delete, data:{confirm: "Deseja mesmo excluir #{institucionalPerson.name} - #{institucionalPerson.institucional_persons_group.name}"} do %i.fa.fa-times.fa-fw.fa-inverse