= simple_form_for [:admin, :<%= namespaced_path.split('_').drop(1).join('_') %>, @<%= singular_table_name %>] do |f| .container .row .col-lg-2 = link_to admin_<%= namespaced_path.split('_').drop(1).join('_') %>_<%= plural_table_name %>_path, 'data-position': 'bottom', 'data-tooltip': t('keppler.actions.back') do .arrow-back.btn.btn-default %i.fa.fa-angle-left = t('keppler.actions.back') .row .col-lg-12 .box.slice-box .box-header.with-border %h3.box-title <%= singular_table_name.humanize %> .box-tools.pull-right %a.btn.btn-box-tool{'data-widget': 'collapse', type: 'button'} %i.fa.fa-minus .box-body %table.table.table-bordered %tbody .form-padding <%- attributes.each_with_index do |attribute, index| -%> .col-xs-12 <%- if @singular_attachments.include?(attribute.name) -%> = f.input :<%= attribute.name %>, as: :keppler_file # , max_size: 225 <%- elsif @plural_attachments.include?(attribute.name) -%> = f.input :<%= attribute.name %>, as: :keppler_file, multiple: true # , max_size: 225 <%- elsif attribute.reference? -%> = f.association :<%= attribute.name %>, include_blank: false <%- elsif attribute.type.eql?('text') -%> = f.input :<%= attribute.name %>, input_html: { ckeditor: { toolbar: 'mini' } } <%- elsif attribute.type.eql?('date') -%> = f.input :<%= attribute.name %>, as: :string, input_html: { class: 'datepicker' } <%- elsif attribute.type.eql?('boolean') -%> = f.input :<%= attribute.name %>, as: :keppler_boolean <%- elsif %w[position deleted_at].include?(attribute.name) || attribute.type.eql?('timestamp') -%> = f.input :<%= attribute.name %>, as: :hidden <%- elsif %w[integer float decimal].include?(attribute.type) -%> = f.input :<%= attribute.name %>, input_html: { min: 0 } <%- elsif attribute.type.eql?('binary') || attribute.type.eql?('string') -%> = f.input :<%= attribute.name %>, as: :string <%- else -%> = f.input :<%= attribute.name %> <%- end -%> <%- end -%> .col-xs-12 .pull-right = f.button :submit, t('keppler.actions.save'), name: '_save', class: 'btn-primary' = f.button :submit, t('keppler.actions.save_and_add_another'), name: '_add_other'