-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
En marco lógico indicadores de resultado con turbo en lugar de coccon…
- Loading branch information
Showing
3 changed files
with
83 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
49 changes: 30 additions & 19 deletions
49
app/views/cor1440_gen/proyectosfinancieros/_indicadorpf_campos.html.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,36 @@ | ||
<% ##f.object = Indicadorpf.new() if !f.object %> | ||
<tr class='nested-fields'> | ||
<td> | ||
<%= turbo_frame_tag "indicadorpf_#{f.index}", class: 'div-tabla-fila nested-fields' do %> | ||
<% f.object = Cor1440Gen::Indicadorpf.new() if !f.object %> | ||
<% f.object.proyectofinanciero_id = params[:proyectofinanciero][:id] if !f.object.proyectofinanciero_id %> | ||
<div class="div-tabla-celda"> | ||
<%= f.association :resultadopf, | ||
collection: Cor1440Gen::Resultadopf.where(proyectofinanciero_id: | ||
f.object.proyectofinanciero_id), | ||
collection: Cor1440Gen::Resultadopf.where( | ||
proyectofinanciero_id: | ||
f.object.proyectofinanciero_id | ||
), | ||
label: false, | ||
label_method: lambda { | ||
|t| (t.objetivopf ? t.objetivopf.numero : '') + t.numero } | ||
%> | ||
</td> | ||
<td> | ||
label_method: :numero | ||
%> | ||
</div> | ||
<div class="div-tabla-celda"> | ||
<%= f.input :numero, label: false %> | ||
</td> | ||
<td> | ||
</div> | ||
<div class="div-tabla-celda"> | ||
<%= f.input :indicador, as: :text, input_html: { rows: 3 }, label: false %> | ||
</td> | ||
<td> | ||
</div> | ||
<div class="div-tabla-celda"> | ||
<%= f.input :id, as: :hidden %> | ||
<%= link_to_remove_association t("Eliminar"), f, | ||
:class => 'btn btn-sm btn-danger', "data-existing" => true %> | ||
<div><%= f.error_notification %></div> | ||
</td> | ||
</tr> | ||
|
||
<%= f.submit "Eliminar", | ||
formaction: cor1440_gen.eliminar_indicadorpf_proyectofinanciero_path( | ||
id: f.object.id, index: f.index || params[:index] | ||
), | ||
formmethod: :delete, | ||
formnovalidate: true, | ||
class: 'btn btn-sm btn-danger', | ||
data: { | ||
turbo_frame: "indicadorpf_#{f.index}", | ||
disable_with: false | ||
} %> | ||
<div><%= f.error_notification %></div> | ||
</div> | ||
<% end %> |