<% unless @skip %>
<%= h(@object._presentation) -%>
<%= close_link(@object, @update_span) -%>
<% end %>
<% attributes = @inline_forms_attribute_list || @object.inline_forms_attribute_list -%>
<% attributes.each do | attribute, name, form_element | -%>
<% puts "LOG: #{attribute}, #{form_element}" if Rails.env.development? %>
<% if cancan_disabled? || can?(:read, @object, attribute) %>
<% css_class_id = "#{@object.class.name.underscore}_#{@object.id}_#{attribute}" -%>
<% if form_element == :header %>
<% else %>
<% if form_element == :tree -%>
<%= render :partial => "inline_forms/tree",
:locals => { :parent_class => @object.class,
:parent_id => @object.id,
:attribute => attribute } %>
<% else %>
<% if form_element == :associated -%>
<%= 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 %>