Sha256: 7d5bf3ef67734c3559c29ff90ed63fb739e6720cc6e23e9ed2b958919bfb58d5
Contents?: true
Size: 1.43 KB
Versions: 2
Compression:
Stored size: 1.43 KB
Contents
- resource_title - if resource.try(:parent).present? - breadcrumbs label: resource.parent.name, url: polymorphic_path([:edit, :admin, resource.parent]) - breadcrumbs resource_name - breadcrumbs label: collection_name, url: admin_index_path(resource.class) = resource_header = adminos_form_for resource_form_object, wrapper: :admin do |f| .f .f__wrapper / Родительский элемент / Это лажа, но пока пусть будет так... - max_depth = f.object.class.const_get('MAX_DEPTH') rescue 0 - if f.object.respond_to?(:parent) && max_depth > 1 - f.object.parent_id = params[:parent_id] if action_name == 'new' = f.association :parent, wrapper: :select, input_html: { class: 'select2it' } = render 'fields', f: f .f-submit.f-submit--fixed .wrapper = f.button :submit, t('labels.admin.save'), class: 'btn btn-primary btn--done' /resource_button_value_main /= f.button :submit, 'Применить', type: 'button', name: 'stay_in_place', class: 'btn btn-secondary js-save-form' = f.button :submit, t('labels.admin.apply'), name: 'stay_in_place', class: 'btn btn-secondary' /resource_button_value_stay /= link_to resource_button_value_cancel, polymorphic_path([:admin, resource.class.name.underscore.pluralize]), class: 'btn btn-secondary' = render "shared/admin/back_button"
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
adminos-1.0.0.pre.rc.5 | lib/generators/templates/install/auto/app/views/admin/base/_form.slim |
adminos-1.0.0.pre.rc.4 | lib/generators/templates/install/auto/app/views/admin/base/_form.slim |