.widget .clearfix div style="margin-bottom: 30px;" - if @obra.possui_garantia? && !@obra.esta_concluida? && logado_na_obra? =< botao_com_permissao new_obra_garantia_da_obra_path(obra_id: @obra), {acao: :create}, { \ texto: ' Adicionar Garantia', class_icone:'icone-cadastrar', } header h5 ' Lista de span.fw-semi-bold Garantidas da Obra .widget-body - if @obra.garantias_da_obra.empty? h6 Nenhum registro encontrado. - else .table-responsive table.table.table-hover thead tr th width="20%" # th width="30%" Forma de Garantia th width="30%" Situação th width="5" th width="20" tbody - @obra.garantias_da_obra.order(:id).each do |garantia_da_obra| tr td = garantia_da_obra.id td = garantia_da_obra.localizar(:forma_de_garantia) td = garantia_da_obra.localizar(:situacao) td - if garantia_da_obra.garantia_nao_devolvida? i.fa.fa-exclamation-circle.text-danger data-toggle="tooltip" title="Essa garantia está Em Aberta, caso já esteja devolvida, altera sua situação!" td - if logado_na_obra? = link_to garantia_da_obra, class: "btn btn-default btn-sm mb-xs", title: "Ver Detalhes" do i.icone-detalhar - if garantia_da_obra.aberta? = botao_com_permissao edit_obra_garantia_da_obra_path(garantia_da_obra), {acao: :update}, { \ class_icone:'icone-editar', params: { \ class: 'btn btn-default btn-sm mb-xs', title: "Editar", }, } = botao_com_permissao garantia_da_obra, {acao: :destroy}, { \ class_icone:'icone-excluir', params: { \ method: :delete, data: { confirm: 'Tem certeza?' }, class: 'btn btn-default btn-sm mb-xs', title: "Apagar", }, }