Sha256: dbc07757097798b820da06ac6b2e7ce717074541a4508803d167243b8d2f7144

Contents?: true

Size: 1009 Bytes

Versions: 9

Compression:

Stored size: 1009 Bytes

Contents

<%%= render(FormComponent.new(item: <%= class_name.underscore %>)) do |form| %>
  <%% current_page = if <%= class_name.underscore %>.persisted?
                     { label: I18n.t('bo.show'), path: <%= "#{options[:namespace]}_#{class_name.underscore}_path(#{class_name.underscore})"%> }
                   else
                     { label: I18n.t('bo.<%= class_name.underscore %>.new').capitalize, path: <%= "new_#{options[:namespace]}_#{class_name.underscore}_path" %> }
                   end
    form.with_title(<%= class_name.underscore %>.persisted? ? <%= class_name.underscore %>.<%=bo_model_title(bo_model)%> : I18n.t('bo.<%= class_name.underscore %>.new').capitalize)
    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

9 entries across 9 versions & 1 rubygems

Version Path
tybo-0.1.2 lib/generators/bo/templates/item.html.erb
tybo-0.1.0 lib/generators/bo/templates/item.html.erb
tybo-0.0.40 lib/generators/bo/templates/item.html.erb
tybo-0.0.39 lib/generators/bo/templates/item.html.erb
tybo-0.0.38 lib/generators/bo/templates/item.html.erb
tybo-0.0.37 lib/generators/bo/templates/item.html.erb
tybo-0.0.36 lib/generators/bo/templates/item.html.erb
tybo-0.0.35 lib/generators/bo/templates/item.html.erb
tybo-0.0.34 lib/generators/bo/templates/item.html.erb