Sha256: 76e1514824b0d640112c1128ba81371d2ebe9d6d7bb7715ccafb1e76c4447a67
Contents?: true
Size: 1.9 KB
Versions: 4
Compression:
Stored size: 1.9 KB
Contents
= 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 => "Give this page a title" = 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.<br>#{('This page is currently reachable via ' + link_to(current_url.gsub(f.object.slug, '<strong>' + f.object.slug + '</strong>').html_safe, current_url)) if current_url }".html_safe = f.input :meta_description, :hint => "A one or two sentence summary of this page. Appears on Google search results underneath the page title." - if EffectivePages.pages.length == 1 = f.input :template, :as => :hidden, :value => EffectivePages.pages.first - else = f.input :template, :as => :select, :collection => EffectivePages.pages, :include_blank => false - if EffectivePages.layouts.length == 1 = f.input :layout, :as => :hidden, :value => EffectivePages.layouts.first - else = f.input :layout, :as => :select, :collection => EffectivePages.layouts, :include_blank => false - if defined?(EffectiveRoles) and 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' - if defined?(EffectiveRegions) = f.button :submit, 'Save and Edit Content' = link_to 'Cancel', effective_pages.admin_pages_path
Version data entries
4 entries across 4 versions & 1 rubygems