<% if (INLINE_FORMS_TREE_INDENT rescue true) %>
<% else %>
<% end %>
<%= render :partial => "inline_forms/tree",
:locals => { :parent_class => @object.class,
:parent_id => @object.id,
:attribute => attribute } %>
<% else %>
<% if form_element == :associated -%>
<% if (INLINE_FORMS_ASSOCIATED_INDENT rescue true) %>
<% else %>
<% end %>
<%= render :partial => "inline_forms/list",
:locals => { :parent_class => @object.class,
:parent_id => @object.id,
:attribute => attribute,
:form_element => form_element } %>
<% else %>
<% if form_element == :has_one %>
<%= render :partial => "inline_forms/list",
:locals => { :parent_class => @object.class,
:parent_id => @object.id,
:attribute => attribute,
:form_element => form_element } %>
<% else %>
<% if @object.has_validations_for?(attribute) -%>
<%= @object.class.human_attribute_name(attribute) -%>
<% else %>
<%= @object.class.human_attribute_name(attribute) -%>
<% end %>
<%= send("#{form_element}_show", @object, attribute) -%>
<% end %>
<% end %>
<% end %>
<% end %>
<% end %>
<% end %>
<% if can? :list_versions, @object %>
<% css_class_id = "#{@object.class.name.underscore}_#{@object.id}_versions" -%>
<%= render 'versions' %>
<% end %>