<%% content_for :body do %>
<%%=raw @page.content_for(Refinery::Pages.default_parts.first.to_sym) %> <%%= form_for [refinery, :<%= namespacing.underscore %>, @<%= singular_name %>] do |f| %> <%%= render '/refinery/admin/error_messages', :object => @<%= singular_name %>, :include_object_name => true %> <% string_fields = string_attributes.map(&:name) -%> <% attributes.each do |attribute| %>
<%%= f.label :<%= attribute.name %> %> <% case attribute.refinery_type when :string -%> <%%= f.text_field :<%= attribute.name %> %> <% when :text -%> <%%= f.text_area :<%= attribute.name %>, :rows => 8 %> <% when :radio -%> <%% Refinery::<%= namespacing %>::<%= class_name %>::<%= attribute.name.pluralize.upcase %>.each do |value, name| %> <%%= f.radio_button :<%= attribute.name %>, (name || value), :value => value %> <%%= f.label :"<%= attribute.name %>_#{(name || value)}", value.humanize %> <%% end %> <% when :checkbox -%> <%%= f.check_box :<%= attribute.name %> %> <% when :select -%> <%%= f.select :<%= attribute.name %>, Refinery::<%= namespacing %>::<%= class_name %>::<%= attribute.name.pluralize.upcase %>, :include_blank => true %> <% when :datetime -%> <%%= f.datetime_select :<%= attribute.name %> %> <% when :date -%> <%%= f.date_select :<%= attribute.name %> %> <% when :time -%> <%%= f.time_select :<%= attribute.name %> %> <% end -%>
<% end %>
<%%= f.submit t('.send') %>
<%% end %>
<%% end %> <%%= render '/refinery/content_page' %>