<%%# Displays a detailed view of the <%= instance_name %> %> <%%# Display Flash Message if any only in case of ajax request %> <%% if request.xhr? %> <%%= render :partial=>"layouts/common/flash_message" %> <%% end %>
<%%= @<%= instance_name %>.<%= main_string_field %> %>
<%- string_fields.each do |name| -%> <%- next if name == main_string_field -%>
<%%= content_tag :span, "<%= name.titleize %>:", :style=>"font-weight:bold", :class=>"five columns push_one" %> <%%= content_tag :span, @<%= instance_name %>.<%= name %>, :class=>"six columns ext-color-grey" %>
<%- end -%> <%- string_fields.each do |name| -%> <% next if name == main_string_field %>
<%= name.titleize %>: <%%= link_to @<%= instance_name %>.<%= name %>, "#", :class=>"text-color-red" %>
<%- end -%> <% puts fields %> <%- fields.map{|name, type| name unless ["text", "string"].include?(type)}.compact.uniq.each do |name| -%>
<%= name.titleize %>: <%%= @<%= instance_name %>.<%= name %> %>
<%- end -%> <%- text_fields.each do |name| -%>
<%%= simple_format @<%= instance_name %>.<%= name %> %>
<%- end -%>