app/views/msip/modelos/show.html.erb in msip-2.2.0.alfa3 vs app/views/msip/modelos/show.html.erb in msip-2.2.0.beta1
- old
+ new
@@ -9,17 +9,20 @@
<% end %>
</h1>
</div>
<dl class="dl-horizontal">
+ <% #debugger %>
<% atributos_show.each do |atr| %>
<% #debugger %>
<% vatr = atr.to_s.gsub(/[^a-z_A-Z0-9]/, '') %>
<% rutap1 = "#{clase.pluralize.underscore}/show_campo_#{vatr}" %>
<% rutap1a = "admin/#{clase.pluralize.underscore}/show_campo_#{vatr}" %>
<% rutap2 = "#{clase.pluralize.underscore}/show_#{vatr}" %>
<% rutap2a = "admin/#{clase.pluralize.underscore}/show_#{vatr}" %>
+ <% (ri, rm, rd)=clase.pluralize.underscore.rpartition("/") %>
+ <% rutap3a = "#{ri}/admin/#{rd}/show_#{vatr}" %>
<% if lookup_context.find_all(rutap1, [], true).any? %>
<dt><strong><%= model_class.human_attribute_name(atr) %>:</strong></dt>
<dd> <%= render partial: rutap1 %> </dd>
<% elsif lookup_context.find_all(rutap1a, [], true).any? %>
<dt><strong><%= model_class.human_attribute_name(atr) %>:</strong></dt>
@@ -28,9 +31,12 @@
<dt><strong><%= model_class.human_attribute_name(atr) %>:</strong></dt>
<dd> <%= render partial: rutap2 %> </dd>
<% elsif lookup_context.find_all(rutap2a, [], true).any? %>
<dt><strong><%= model_class.human_attribute_name(atr) %>:</strong></dt>
<dd> <%= render partial: rutap2a %> </dd>
+ <% elsif lookup_context.find_all(rutap3a, [], true).any? %>
+ <dt><strong><%= model_class.human_attribute_name(atr) %>:</strong></dt>
+ <dd> <%= render partial: rutap3a %> </dd>
<% else %>
<% p = @registro.presenta(atr) %>
<% if p && p.to_s.length > 0 %>
<dt><strong><%= model_class.human_attribute_name(atr) %>:</strong></dt>
<dd>