Sha256: 906790eee5722930b15ac2b602225b4e1cf173d48e23060390e6501d7d76bf05

Contents?: true

Size: 976 Bytes

Versions: 12

Compression:

Stored size: 976 Bytes

Contents

<%%= render(FormComponent.new(item: <%= class_name.underscore %>)) do |form| %>
  <%%
    current_page = if <%= class_name.underscore
  %>.persisted?
                     { label: "Détails", path: <%= "#{options[:namespace]}_#{class_name.underscore}_path(#{class_name.underscore})"%> }
                   else
                     { label: "Nouvelle <%= class_name.underscore %>", path: <%= "new_#{options[:namespace]}_#{class_name.underscore}_path" %> }
                   end
    form.with_title(<%= class_name.underscore %>.persisted? ? <%= class_name.underscore %>.<%=bo_model_title(bo_model)%> : 'Nouvelle <%= class_name.underscore %>')
    form.with_breadcrumb([
          { label: I18n.t('bo.<%= class_name.underscore %>.others').capitalize, path: <%= "#{options[:namespace]}_#{class_name.pluralize.underscore}_path"%> },
          current_page
        ])
  %>
    <br>
    <%%= render "form", <%= class_name.underscore %>: @<%= class_name.underscore %> %>
<%% end %>

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
tybo-0.0.15 lib/generators/bo/templates/item.html.erb
tybo-0.0.14 lib/generators/bo/templates/item.html.erb
tybo-0.0.13 lib/generators/bo/templates/item.html.erb
tybo-0.0.12 lib/generators/bo/templates/item.html.erb
tybo-0.0.11 lib/generators/bo/templates/item.html.erb
tybo-0.0.10 lib/generators/bo/templates/item.html.erb
tybo-0.0.9 lib/generators/bo/templates/item.html.erb
tybo-0.0.8 lib/generators/bo/templates/item.html.erb
tybo-0.0.7 lib/generators/bo/templates/item.html.erb
tybo-0.0.6 lib/generators/bo/templates/item.html.erb
tybo-0.0.5 lib/generators/bo/templates/item.html.erb
tybo-0.0.4 lib/generators/bo/templates/item.html.erb