From d672c0b94652589dcc99e211f22f14005a847cb1 Mon Sep 17 00:00:00 2001 From: Dirk Kelly Date: Tue, 1 Feb 2011 15:08:56 +0800 Subject: [PATCH] moved content type above the templated option to avoid content jumps, added some translations --- app/views/admin/pages/_form.html.haml | 8 ++++---- config/locales/formtastic.en.yml | 1 + 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/app/views/admin/pages/_form.html.haml b/app/views/admin/pages/_form.html.haml index 785666ee..6e4944a3 100644 --- a/app/views/admin/pages/_form.html.haml +++ b/app/views/admin/pages/_form.html.haml @@ -10,16 +10,16 @@ = 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.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 :templatized, :css => 'toggle', :style => "#{'display: none' if @page.redirect?}" 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.custom_input :unlisted, :css => 'toggle', :style => "#{'display: none' if @page.templatized?}" do + = f.custom_input :unlisted, :css => 'toggle', :style => "#{'display: none' if @page.templatized? || @page.redirect?}" do = f.check_box :unlisted = f.custom_input :redirect, :css => 'toggle', :style => "#{'display: none' if @page.templatized?}" do diff --git a/config/locales/formtastic.en.yml b/config/locales/formtastic.en.yml index edfb15d2..bdcaa5c8 100644 --- a/config/locales/formtastic.en.yml +++ b/config/locales/formtastic.en.yml @@ -44,6 +44,7 @@ en: cache_strategy: "Cache the page for better performance. The 'Simple' choice is a good compromise." templatized: "Use the page as a template for a model you defined." unlisted: "Hide the page from any generated menus, it will still be accessible directly" + content_type_id: "The type of content this page will be a template for" snippet: slug: "You need to know it in order to insert the snippet inside a page" site: