2010-05-09 12:44:53 +00:00
|
|
|
- content_for :head do
|
2010-12-14 17:00:12 +00:00
|
|
|
= include_javascripts :image_picker, :edit_page
|
|
|
|
= include_stylesheets :editable_elements, :fancybox
|
2010-05-09 12:44:53 +00:00
|
|
|
|
2010-04-25 00:33:38 +00:00
|
|
|
= f.foldable_inputs :name => :information do
|
2010-07-23 23:57:18 +00:00
|
|
|
|
2010-04-25 00:33:38 +00:00
|
|
|
= f.input :title
|
2010-07-23 23:57:18 +00:00
|
|
|
|
2010-05-02 23:33:17 +00:00
|
|
|
- if not @page.index? and not @page.not_found?
|
|
|
|
= f.input :parent_id, :as => :select, :collection => parent_pages_options, :include_blank => false
|
2010-07-23 23:57:18 +00:00
|
|
|
|
2010-07-16 20:36:07 +00:00
|
|
|
= f.input :slug, :required => false, :hint => @page.slug.blank? ? ' ' : @page.url, :input_html => { :data_url => get_path_admin_pages_url, :disabled => @page.index? || @page.not_found? }, :wrapper_html => { :style => "#{'display: none' if @page.templatized?}" }
|
2010-07-23 23:57:18 +00:00
|
|
|
|
2011-01-06 14:48:41 +00:00
|
|
|
= f.custom_input :templatized, :css => 'toggle', :style => "#{'display: none' if @page.redirect?}" do
|
2010-07-16 20:36:07 +00:00
|
|
|
= f.check_box :templatized
|
2010-07-23 23:57:18 +00:00
|
|
|
|
2010-07-16 20:36:07 +00:00
|
|
|
= f.input :content_type_id, :as => :select, :collection => current_site.content_types.all.to_a, :include_blank => false, :wrapper_html => { :style => "#{'display: none' unless @page.templatized?}" }
|
2010-07-23 23:57:18 +00:00
|
|
|
|
2010-04-25 00:33:38 +00:00
|
|
|
= f.custom_input :published, :css => 'toggle' do
|
|
|
|
= f.check_box :published
|
2010-07-23 23:57:18 +00:00
|
|
|
|
2011-01-06 14:48:41 +00:00
|
|
|
= f.custom_input :redirect, :css => 'toggle', :style => "#{'display: none' if @page.templatized?}" do
|
|
|
|
= f.check_box :redirect
|
|
|
|
|
|
|
|
= f.input :cache_strategy, :as => :select, :collection => options_for_page_cache_strategy, :include_blank => false, :wrapper_html => { :style => "#{'display: none' if @page.redirect?}" }
|
|
|
|
|
|
|
|
= f.input :redirect_url, :required => true, :wrapper_html => { :style => "#{'display: none' unless @page.redirect?}" }
|
2010-07-23 23:57:18 +00:00
|
|
|
|
2010-08-28 00:00:05 +00:00
|
|
|
= render 'editable_elements', :page => @page
|
2010-08-27 15:40:03 +00:00
|
|
|
|
2010-08-21 22:48:24 +00:00
|
|
|
= f.foldable_inputs :name => :raw_template do
|
2010-08-08 13:16:32 +00:00
|
|
|
= f.custom_input :value, :css => 'code full', :with_label => false do
|
2010-08-21 22:48:24 +00:00
|
|
|
= f.label :raw_template
|
2010-08-08 13:16:32 +00:00
|
|
|
%code{ :class => 'html' }
|
2010-08-21 22:48:24 +00:00
|
|
|
= f.text_area :raw_template
|
2010-08-28 00:00:05 +00:00
|
|
|
= f.errors_on :template
|
|
|
|
.more
|
|
|
|
= link_to t('admin.image_picker.link'), admin_theme_assets_path, :id => 'image-picker-link'
|