app/views/admin/pages/_form.html.haml in locomotive_cms-0.0.3.3 vs app/views/admin/pages/_form.html.haml in locomotive_cms-0.0.4.beta1
- old
+ new
@@ -1,39 +1,34 @@
- content_for :head do
- = javascript_include_tag 'admin/plugins/codemirror/codemirror', 'admin/plugins/wslide', 'admin/pages', 'admin/page_parts'
- = stylesheet_link_tag 'admin/page_parts'
+ = javascript_include_tag 'admin/plugins/tiny_mce/tinymce', 'admin/plugins/codemirror/codemirror', 'admin/pages', 'admin/editable_elements'
+ = stylesheet_link_tag 'admin/editable_elements'
+ = image_picker_include_tags
= f.foldable_inputs :name => :information do
-
+
= f.input :title
-
- = f.input :layout_id, :as => :select, :collection => current_site.layouts.all.to_a, :input_html => { :data_url => admin_layout_page_parts_url('_id_to_replace_') }
-
+
- if not @page.index? and not @page.not_found?
= f.input :parent_id, :as => :select, :collection => parent_pages_options, :include_blank => false
-
+
= 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?}" }
-
+
= f.custom_input :templatized, :css => 'toggle' do
= f.check_box :templatized
-
+
= 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?}" }
-
+
= f.custom_input :published, :css => 'toggle' do
= f.check_box :published
-
+
= f.input :cache_strategy, :as => :select, :collection => options_for_page_cache_strategy, :include_blank => false
-
-#page-parts
- .nav
- - @page.parts.each_with_index do |part, index|
- = link_to content_tag(:span, part.name), "#parts-#{index + 1}", :id => "control-part-#{part.slug}", :class => "part-#{index} #{'on' if index == 0}", :style => "#{'display: none' if part.disabled?}"
- .clear
- .wrapper
- %ul{ :id => "parts" }
- = f.fields_for :parts do |g|
- %li{ :style => "#{'display: none' if g.object.disabled?}" }
- %code= g.text_area :value
- = g.hidden_field :name
- = g.hidden_field :slug
- = g.hidden_field :disabled, :class => 'disabled'
+= render 'editable_elements', :page => @page
+
+= f.foldable_inputs :name => :raw_template do
+ = f.custom_input :value, :css => 'code full', :with_label => false do
+ = f.label :raw_template
+ %code{ :class => 'html' }
+ = f.text_area :raw_template
+ = f.errors_on :template
+ .more
+ = link_to t('admin.image_picker.link'), admin_theme_assets_path, :id => 'image-picker-link'
\ No newline at end of file