<%- attributes.each do |attribute| -%> <%- if @beautiful_attributes.include?(attribute.name + ':richtext') then -%>
<%%= f.label :<%= attribute.name %>, <%= i18n_t_a(singular_table_name, 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 %>, <%= i18n_t_a(singular_table_name, attribute.name) %>.capitalize, :class => "control-label" %> <%%= f.text_area :<%= attribute.name %>, :class => "wysiwyg-editor form-control" %>
<%%= f.hidden_field :<%= attribute.name %>_typetext, :value => "html" %> <%- elsif @beautiful_attributes.include?(attribute.name + ':references') then -%>
<%%= f.label :<%= attribute.name %>, <%= i18n_t_a(singular_table_name, attribute.name) %>.capitalize, :class => "control-label" %> <%%= f.collection_select :<%= attribute.name %>_id, <%= attribute.name.camelcase %>.all, :id, :caption, { :include_blank => true }, { :class => "form-control" } %>
<%- elsif @beautiful_attributes.include?(attribute.name + ':price') then -%>
<%%= f.label :<%= attribute.name %>, <%= i18n_t_a(singular_table_name, attribute.name) %>.capitalize, :class => "control-label" %>
$<%%= f.<%= attribute.field_type %> :<%= attribute.name %>, :class => "form-control" %>
<%- elsif @beautiful_attributes.include?(attribute.name + ':date') then -%>
<%%= f.label :<%= attribute.name %>, <%= i18n_t_a(singular_table_name, attribute.name) %>.capitalize, :class => "control-label" %> " /> " /> " />
<%%= f.text_field :<%= attribute.name %>, :value => (begin @<%= singular_table_name %>.<%= attribute.name %>.strftime("%d/%m/%Y") rescue "" end), :class => "dpicker form-control" %>
<%- elsif @beautiful_attributes.include?(attribute.name + ':datetime') then -%>
<%%= f.label :<%= attribute.name %>, <%= i18n_t_a(singular_table_name, attribute.name) %>.capitalize, :class => "control-label" %> " /> " /> " />
<%%= f.text_field :<%= attribute.name %>, :value => (begin @<%= singular_table_name %>.<%= attribute.name %>.strftime("%d/%m/%Y") rescue "" end), :class => "dpicker form-control" %>
" /> " />
<%%= f.text_field :<%= attribute.name %>, :value => (begin @<%= singular_table_name %>.<%= attribute.name %>.strftime("%H:%M") rescue "" end), :class => "tpicker form-control" %>
<%- elsif @beautiful_attributes.include?(attribute.name + ':color') then -%>
<%%= f.label :<%= attribute.name %>, <%= i18n_t_a(singular_table_name, attribute.name) %>.capitalize, :class => "control-label" %>
" data-color-format="rgba"> <%%= f.<%= attribute.field_type %> :<%= attribute.name %>, :class => "form-control" %>
<%- else -%>
<%%= f.label :<%= attribute.name %>, <%= i18n_t_a(singular_table_name, attribute.name) %>.capitalize, :class => "control-label" %> <%%= f.<%= attribute.field_type %> :<%= attribute.name %><%= ', :rows => 5' if attribute.field_type == :text_area %>, :class => "form-control" %>
<%- end -%> <%- end -%>