• <% if structure.structure_type.present? %> <% if structure.centraliza? %>
    <%= structure.structure_type.abrev %> <%=structure.order %> <%= raw structure.content %>
    <% if structure.versions.present? %>
    <%= nested_structures_site structure.new_structure.hash_tree %> <%#= debug structure.new_structure %>
    <%= link_to "Redação dada pela #{structure.law.law_type.name} n° #{structure.law.number}/#{structure.law.year}", law_details_path(structure.law, :type_view => :consolidada) %>
    <%= "Redação dada pela #{structure.law.law_type.name} n° #{structure.law.number}/#{structure.law.year}" %>
    <% end %> <% if structure.repealed %> <% @law_repealed = Law.find structure.repealed_law_id %>
    <%= link_to "Revogado pela #{@law_repealed.law_type.name} n° #{@law_repealed.number}/#{@law_repealed.year}", law_details_path(@law_repealed, :type_view => :consolidada) %>
    <%= "Revogado pela #{@law_repealed.law_type.name} n° #{@law_repealed.number}/#{@law_repealed.year}" %>
    <% end %> <% else %>
    <%= structure.structure_type.abrev %> <%=structure.order %> - <%= raw structure.content %>
    <%= link_to "Redação adicionada pelass #{structure.new_law.law_type.name} n° #{structure.new_law.number}/#{structure.new_law.year}", law_details_path(structure.new_law, :type_view => :consolidada) if structure.new_law_id.present? %>
    <%= "Redação adicionada pelass #{structure.new_law.law_type.name} n° #{structure.new_law.number}/#{structure.new_law.year}" if structure.new_law_id.present? %>
    <% if structure.versions.present? %>
    <%= nested_structures_site structure.new_structure.hash_tree %>
    <%= link_to "Redação dada pela #{structure.new_structure.first.law.law_type.name} n° #{structure.new_structure.first.law.number}/#{structure.new_structure.first.law.year}", law_details_path(structure.new_structure.first.law, :type_view => :consolidada) %>
    <%= "Redação dada pela #{structure.new_structure.first.law.law_type.name} n° #{structure.new_structure.first.law.number}/#{structure.new_structure.first.law.year}" %>
    <% end %> <% if structure.repealed %> <% @law_repealed = Law.find structure.repealed_law_id %>
    <%= link_to "Revogado pela #{@law_repealed.law_type.name} n° #{@law_repealed.number}/#{@law_repealed.year}", law_details_path(@law_repealed, :type_view => :consolidada) %>
    <%= "Revogado pela #{@law_repealed.law_type.name} n° #{@law_repealed.number}/#{@law_repealed.year}" %>
    <% end %> <% end %> <% else %> <% if structure.centraliza? %>
    <%=structure.order %> <%= raw structure.content %>
    <% if !structure.versions.empty? %>
    <%= nested_structures_site structure.new_structure.hash_tree %>
    <%= link_to "Redação dada pela #{structure.new_structure.first.law.law_type.name} n° #{structure.new_structure.first.law.number}/#{structure.new_structure.first.law.year}", law_details_path(structure.new_structure.first.law, :type_view => :consolidada) %>
    <%= "Redação dada pela #{structure.new_structure.first.law.law_type.name} n° #{structure.new_structure.first.law.number}/#{structure.new_structure.first.law.year}" %>
    <% end %> <% else %>
    <%=structure.order %> <%= raw structure.content %>
    <%= link_to "Redação adicionada pela #{structure.new_law.law_type.name} n° #{structure.new_law.number}/#{structure.new_law.year}", law_details_path(structure.new_law, :type_view => :consolidada) if structure.new_law_id.present? %>
    <%= "Redação adicionada pela #{structure.new_law.law_type.name} n° #{structure.new_law.number}/#{structure.new_law.year}" if structure.new_law_id.present? %>
    <% if !structure.versions.empty? %>
    <%= nested_structures_site structure.new_structure.hash_tree %>
    <%= link_to "Redação dada pela #{structure.new_structure.first.law.law_type.name} n° #{structure.new_structure.first.law.number}/#{structure.new_structure.first.law.year}", law_details_path(structure.new_structure.first.law, :type_view => :consolidada) %>
    <%= "Redação dada pela #{structure.new_structure.first.law.law_type.name} n° #{structure.new_structure.first.law.number}/#{structure.new_structure.first.law.year}" %>
    <% end %> <% end %> <% end %>