= simple_form_for(page, (EffectivePages.simple_form_options || {}).merge(url: (page.persisted? ? effective_pages.admin_page_path(page.id) : effective_pages.admin_pages_path))) do |f| = f.input :title, hint: 'The title of your page.', input_html: { maxlength: 255 } = f.input :draft, hint: 'Save this page as a draft. It will not be accessible on the website.' - if !f.object.new_record? || f.object.errors.include?(:slug) - current_url = (effective_pages.page_url(f.object) rescue nil) = f.input :slug, hint: "The slug controls this page's internet address. Be careful, changing the slug will break links that other websites may have to the old address.
#{('This page is currently reachable via ' + link_to(current_url.gsub(f.object.slug, '' + f.object.slug + '').html_safe, current_url)) if current_url }".html_safe - if EffectivePages.acts_as_asset_box = render partial: '/admin/pages/asset_box_fields', locals: { page: page, form: f, f: f } = render partial: '/admin/pages/additional_fields', locals: { page: page, form: f, f: f } = f.input :meta_description, hint: "A one or two sentence summary of this page. Appears on Google search results underneath the page title.", input_html: { maxlength: 150 } - if (templates = EffectivePages.templates).length == 1 = f.hidden_field :template, value: templates.first - else = f.input :template, as: (defined?(EffectiveFormInputs) ? :effective_select : :select), collection: templates - if (layouts = EffectivePages.layouts).length == 1 = f.hidden_field :layout, value: layouts.first - else = f.input :layout, as: (defined?(EffectiveFormInputs) ? :effective_select : :select), collection: layouts - if f.object.respond_to?(:roles) = f.input :roles, collection: EffectiveRoles.roles_collection(f.object), as: :check_boxes, hint: '* leave blank for a regular public page that anyone can view' .form-group .col-xs-12 .form-group .pull-right = f.button :submit, 'Save', data: { disable_with: 'Saving...' } - if defined?(EffectiveRegions) = f.button :submit, 'Save and Edit Content', data: { disable_with: 'Saving...' } = f.button :submit, 'Save and Add New', data: { disable_with: 'Saving...' } = link_to 'Cancel', effective_pages.admin_pages_path