<%- attributes.each do |attribute| -%> <%- if @beautiful_attributes.include?(attribute.name + ':richtext') then -%>
<%%= f.label :<%= attribute.name %>, t(:<%= attribute.name %>, :default => "<%= attribute.name.capitalize %>"), :class => "control-label" %>
<%%= f.text_area :<%= attribute.name %>, :class => "richtext-editor" %>
<% for type in richtext_type %> <%% hashradio = {:id => "<%= attribute.name %>-<%= type %>", :class => "select-richtext", 'data-editor' => 'markItUp<%= singular_table_name.capitalize %>_<%= attribute.name.downcase %>', 'data-spleditor' => '<%= singular_table_name %>_<%= attribute.name %>' } %> <%% hashradio[:checked] = "checked" if @<%= singular_table_name %>.<%= attribute.name %>_typetext == "<%= type %>" %> <% end %>
<%% rttype = @<%= singular_table_name %>.<%= attribute.name %>_typetext.to_s %> <%% if not rttype.blank? then %> <%% end %> <%- elsif @beautiful_attributes.include?(attribute.name + ':wysiwyg') then -%>
<%%= f.label :<%= attribute.name %>, t(:<%= attribute.name %>, :default => "<%= attribute.name.capitalize %>"), :class => "control-label" %>
<%%= f.text_area :<%= attribute.name %>, :class => "wysiwyg-editor" %>
<%%= f.hidden_field :<%= attribute.name %>_typetext, :value => "html" %> <%- elsif @beautiful_attributes.include?(attribute.name + ':references') then -%>
<%%= f.label :<%= attribute.name %>, t(:<%= attribute.name %>, :default => "<%= attribute.name.capitalize %>"), :class => "control-label" %>
<%%= f.collection_select :<%= attribute.name %>_id, <%= attribute.name.camelcase %>.all, :id, :caption, :include_blank => true %>
<%- elsif @beautiful_attributes.include?(attribute.name + ':price') then -%>
<%%= f.label :<%= attribute.name %>, t(:<%= attribute.name %>, :default => "<%= attribute.name.capitalize %>"), :class => "control-label" %>
$<%%= f.<%= attribute.field_type %> :<%= attribute.name %> %>
<%- elsif @beautiful_attributes.include?(attribute.name + ':date') then -%>
<%%= f.label :<%= attribute.name %>, t(:<%= attribute.name %>, :default => "<%= attribute.name.capitalize %>"), :class => "control-label" %>
" /> " /> " /> <%%= f.text_field :<%= attribute.name %>, :class => "dpicker" %>
<%- elsif @beautiful_attributes.include?(attribute.name + ':datetime') then -%>
<%%= f.label :<%= attribute.name %>, t(:<%= attribute.name %>, :default => "<%= attribute.name.capitalize %>"), :class => "control-label" %>
" /> " /> " /> <%%= f.text_field :<%= attribute.name %>, :class => "dpicker" %>
" /> " /> <%%= f.text_field :<%= attribute.name %>, :class => "tpicker" %>
<%- elsif @beautiful_attributes.include?(attribute.name + ':color') then -%>
<%%= f.label :<%= attribute.name %>, t(:<%= attribute.name %>, :default => "<%= attribute.name.capitalize %>"), :class => "control-label" %>
" data-color-format="rgba"> <%%= f.<%= attribute.field_type %> :<%= attribute.name %> %>
<%- else -%>
<%%= f.label :<%= attribute.name %>, t(:<%= attribute.name %>, :default => "<%= attribute.name.capitalize %>"), :class => "control-label" %>
<%%= f.<%= attribute.field_type %> :<%= attribute.name %><%= ', :rows => 5' if attribute.field_type == :text_area %> %>
<%- end -%> <%- end -%>