<%%= simple_form_for(@<%= name %>) do |f| %> <%%= f.error_notification %> <%%= f.input :email, autofocus: true %> <%%= f.input :name %> <%%= f.input :phone %> <%%= f.input :comment %> <%- if has_picture? -%> <%%= f.input :picture %> <%%= f.input :picture_cache, as: :hidden %> <%%- if @<%= name %>.picture? -%>
<%%= image_tag(@<%= name %>.picture_url(:thumb)) %>    
<%%- end -%> <%- end -%> <%%= f.input :theme %> <%%= f.input :active %> <%%= f.input :password %> <%%= f.input :password_confirmation %> <%%= f.input :status %> <%%= f.button :submit, class: 'btn btn-primary' %> <%%- if @<%= name %>.new_record? -%> <%%= link_to t('actions.back.index'), <%= table_name %>_path, class: 'btn btn-default' %> <%%- else -%> <%%= link_to t('actions.back.show'), @<%= name %>, class: 'btn btn-default' %> <%%= link_to t('actions.back.index'), <%= table_name %>_path, class: 'btn btn-default' %> <%%- end -%> <%% end %>