section.widget = render 'cabecalho' .row .col-md-3.col-sm-3 style="text-align: center;" = widget_small titulo: "Quantidade Total de Obras", valor: @obras_gerais.count, color_text: "text-white", tipo: "primary" .col-md-3.col-sm-3 = widget_small titulo: "Investimento Total", valor: @obras_gerais.sum(&:valor).try(:real_contabil), color_text: "text-white", tipo: "primary" .col-md-3.col-sm-3 = widget_small titulo: "Valor Total por Convênios", valor: @obras_gerais.joins(:transferencias).where(obra_transferencias: {tipo: Obra::Transferencia.tipos[:convenio]}).sum('obra_transferencias.valor_total').try(:real_contabil), color_text: "text-white", tipo: "primary" .col-md-3.col-sm-3 = widget_small titulo: "Valor Total por Oper. de Crédito", valor: @obras_gerais.joins(:operacoes_de_credito).sum('obra_operacoes_de_credito.valor_total').try(:real_contabil), color_text: "text-white", tipo: "primary" .row .col-md-3.col-sm-3 style="text-align: center;" = widget_small titulo: "Obras Não Iniciadas", valor: @obras_gerais.nao_iniciadas.count, color_text: "text-white", tipo: "info" .col-md-3.col-sm-3 style="text-align: center;" = widget_small titulo: "Obras Paralisadas", valor: @obras_gerais.paralisadas.count, color_text: "text-white", tipo: "danger" .col-md-3.col-sm-3 style="text-align: center;" = widget_small titulo: "Em andamento", valor: @obras_gerais.iniciadas_e_nao_concluidas.count, color_text: "text-white", tipo: "warning" .col-md-3.col-sm-3 style="text-align: center;" = widget_small titulo: "Obras Concluídas", valor: @obras_gerais.concluidas.count, color_text: "text-white", tipo: "success" == render 'filtros' == render 'grid'