.widget header> h5 ' Lista de span.fw-semi-bold Bens Patrimoniais - if @tipo_de_tela == "true" .widget-body - if @bens_patrimoniais.empty? h6 Nenhum registro encontrado. - else .table-responsive table.table.table-hover thead tr th Item th width="100 px" tbody - @bens_patrimoniais.each do |bem_patrimonial| tr td = bem_patrimonial.try(:item).try(:codigo_e_descricao) td.align-center = link_to base_show_lista_de_itens_no_patrimonio_path(bem_patrimonial.try(:item).try(:id)), class: "btn btn-default btn-sm mb-xs", title: "Ver Detalhes" do i.icone-detalhar = will_paginate@bens_patrimoniais, previous_label: "<", next_label: ">" - else .widget-body .table-responsive table.table.table-hover thead tr th Unidade Gestora th width="100 px" tbody - @bens_patrimoniais.sort_by{|bem| bem.unidade_gestora.codigo }.each do |bem| tr td = bem.unidade_gestora.codigo_e_nome td = link_to patrimonio_exibir_por_unidade_gestora_path(bem.unidade_gestora), class: "btn btn-default btn-sm mb-xs", title: "Ver Detalhes" do i.icone-detalhar = will_paginate@bens_patrimoniais, previous_label: "<", next_label: ">" javascript: $(document).ready(function() { }); $('.botao_bem_patrimonial').click(function() { console.log("click") var linha = $(this).closest('tr'); var bem_id = $(linha).attr('id').replace(/[^0-9]/g, ''); $('.bens_patrimoniais_' + bem_id).slideToggle(0.1); var classe = $(linha).find('f').attr('class'); if (classe.includes('left')) { $(linha).find('f').attr('class', 'glyphicon glyphicon-chevron-down'); } else { $(linha).find('f').attr('class', 'glyphicon glyphicon-chevron-left'); } });