div style="margin: 20px !important" - if esta_autorizado?(:edit) - if @centro_de_custo.present? = link_to edit_controladoria_centro_de_custo_path(@centro_de_custo), class: "btn btn-default btn-sm" do i.icone-cadastrar ' Adicionar/Remover Itens - else = link_to controladoria_editar_primeiro_nivel_na_unidade_gestora_path(@unidade_gestora) + "?flag=unidade_gestora", class: "btn btn-default btn-sm" do i.icone-cadastrar ' Adicionar/Remover Itens .widget header> h5 ' Lista de span.fw-semi-bold Centro de Custos .widget-body - if centro_de_custos.empty? h6 Nenhum registro encontrado. - else .table-responsive table.table.table-hover.table-striped.table-bordered thead tr th.text-center width='150' Código th Descrição th.text-center width="250" Quantidade de Registros th.text-center width="100" Status th width="100" tbody - centro_de_custos.order(:codigo).each do |centro_de_custo| tr td.text-center = centro_de_custo.codigo td = centro_de_custo.descricao td.text-center = centro_de_custo.centro_de_custos_filhos.size td.text-center - if centro_de_custo.ativo? span.label.label-success ==< (centro_de_custo.status_i18n).try(:upcase) - else span.label.label-danger ==< (centro_de_custo.status_i18n).try(:upcase) td = link_to controladoria_centro_de_custo_path(centro_de_custo), class: "btn btn-default btn-sm mb-xs", title: "Ver Detalhes" do i.icone-detalhar = botao_com_permissao edit_controladoria_centro_de_custo_path(centro_de_custo), {acao: :update}, { \ class_icone:'icone-cadastrar', params: {class: 'btn btn-default btn-sm mb-xs', title: "Adicionar"}, }