Sha256: 794d3ae8eb2ed2d915e6ce24472628e02b0029855c407e1ccf1a78558387d1ba

Contents?: true

Size: 1.1 KB

Versions: 4

Compression:

Stored size: 1.1 KB

Contents

<%%= turbo_frame_tag "<%= class_name.pluralize.underscore %>", target: '_top' do %>
  <%%= 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 %>
<%% end %>

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
tybo-0.2.5 lib/generators/bo/templates/item.html.erb
tybo-0.2.4 lib/generators/bo/templates/item.html.erb
tybo-0.2.2 lib/generators/bo/templates/item.html.erb
tybo-0.2.0 lib/generators/bo/templates/item.html.erb