<%- attributes.each do |attribute| -%> <%- if @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 -%>