Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
vtamara committed Aug 7, 2023
1 parent 5fe936a commit 50029a7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 18 deletions.
17 changes: 6 additions & 11 deletions app/views/sivel2_gen/casos/_index_tabla.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -90,22 +90,17 @@
<% vcaso = Sivel2Gen::Caso.where(id: caso.caso_id).take %>
<% if can?(:solocambiaretiquetas, Sivel2Gen::Caso) ||
can?(:solocambiaretiquetas, caso) %>
<%= link_to 'Cambiar etiquetas',
sivel2_gen.edit_caso_path(caso.caso_id), :class => 'btn btn-sm' %>
<%= render partial: 'msip/modelos/boton_editar',
locals: {registro: vcaso, mas_clases: 'btn-sm'} %>
<% elsif vcaso && can?(:edit, vcaso) %>
<%= link_to t('.edit', :default => t("helpers.links.edit")),
sivel2_gen.edit_caso_path(caso.caso_id),
"data-turbo": false,
:class => 'btn btn-sm' %>
<%= render partial: 'msip/modelos/boton_editar',
locals: {registro: vcaso, mas_clases: 'btn-sm'} %>
<% end %>
<%= render partial: 'sivel2_gen/casos/index_mas_acciones',
locals: {caso: caso, registro: caso} %>
<% if vcaso && can?(:destroy, vcaso) %>
<%= link_to t('.destroy', :default => t("helpers.links.destroy")),
sivel2_gen.caso_path(caso.caso_id),
:method => :delete,
:data => { :confirm => t('.confirm', :default => t("helpers.links.confirm", :default => 'Está seguro(a)?')) },
:class => 'btn btn-sm btn-danger' %>
<%= render partial: 'msip/modelos/boton_eliminar',
locals: {registro: vcaso, mas_clases: 'btn-sm'} %>
<% end %>
</td>
</tr>
Expand Down
11 changes: 4 additions & 7 deletions app/views/sivel2_gen/casos/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,8 @@
<div class="offset-md-0 col-md-1">
<% if @conscaso.size > 0 && current_usuario &&
can?(:new, Sivel2Gen::Caso) %>
<%= link_to t('.new', :default => t("helpers.links.new")),
sivel2_gen.new_caso_path,
:class => 'btn btn-primary'
%>
<%= render partial: 'msip/modelos/boton_nuevo',
locals: {ruta: sivel2_gen.new_caso_path} %>
<% end %>
</div>
<div class="offset-md-3 col-md-1">
Expand Down Expand Up @@ -90,7 +88,6 @@
<% end %>
</div>
<% if current_usuario && can?(:new, Sivel2Gen::Caso) %>
<%= link_to t('.new', :default => t("helpers.links.new")),
sivel2_gen.new_caso_path,
:class => 'btn btn-primary' %>
<%= render partial: 'msip/modelos/boton_nuevo',
locals: {ruta: sivel2_gen.new_caso_path} %>
<% end %>

0 comments on commit 50029a7

Please sign in to comment.