diff --git a/app/views/admin/current_sites/_form.html.haml b/app/views/admin/current_sites/_form.html.haml index 17c082f7..79f633de 100644 --- a/app/views/admin/current_sites/_form.html.haml +++ b/app/views/admin/current_sites/_form.html.haml @@ -4,8 +4,8 @@ = f.foldable_inputs :name => :information, :style => "#{'display: none' unless @site.new_record?}" do = f.input :name, :required => false -= f.foldable_inputs :name => :meta do - += f.foldable_inputs :name => :seo do + = f.input :seo_title = f.input :meta_keywords = f.input :meta_description diff --git a/config/locales/admin_ui.en.yml b/config/locales/admin_ui.en.yml index ee3b7fd2..f6f7fa35 100644 --- a/config/locales/admin_ui.en.yml +++ b/config/locales/admin_ui.en.yml @@ -101,7 +101,7 @@ en: updated_at: updated at edit: show: show - help: "The page title can be updated by clicking it." + help: "The page title can be updated by clicking it. To apply your changes, click on the \"Update\" button." ask_for_title: "Please type the new page title" form: delete_file: Delete file @@ -211,8 +211,8 @@ en: new_item: new item form: order_by: - created_at: 'By "created at" date' - updated_at: 'By "updated at" date' + created_at: 'By creation date' + updated_at: 'By updating date' position_in_list: Manually order_direction: asc: Ascending diff --git a/config/locales/admin_ui.fr.yml b/config/locales/admin_ui.fr.yml index 54166717..c37fb767 100644 --- a/config/locales/admin_ui.fr.yml +++ b/config/locales/admin_ui.fr.yml @@ -101,7 +101,7 @@ fr: updated_at: Mise à jour le edit: show: voir - help: "Le titre de la page est modifiable en cliquant dessus." + help: "Le titre de la page est modifiable en cliquant dessus. Pour appliquer votre modification, cliquez après sur le bouton \"Modifier\"" ask_for_title: "Veuillez entrer le nouveau titre" form: delete_file: Supprimer fichier @@ -210,7 +210,7 @@ fr: new_item: nouvel élément form: order_by: - created_at: 'Par date création' + created_at: 'Par date de création' updated_at: 'Par date de mise à jour' position_in_list: Manuellement order_direction: diff --git a/config/locales/formtastic.en.yml b/config/locales/formtastic.en.yml index e1a34711..496f0e52 100644 --- a/config/locales/formtastic.en.yml +++ b/config/locales/formtastic.en.yml @@ -57,12 +57,13 @@ en: templatized: "Use the page as a template for a model you defined." listed: "Control whether to show the page from generated menus." content_type_id: "The type of content this page will be a template for." - seo_title: "Define a page title which should be used as the value for the title tag in the head section." + seo_title: "Define a page title which should be used as the value for the title tag in the head section. Leave it empty if you want to use the default value from the site settings." meta_keywords: "Overrides the site's meta keywords used within the head tag of the page. They are separated by a comma." meta_description: "Overrides the site's meta description used within the head tag of the page." snippet: slug: "You need to know it in order to insert the snippet inside a page" site: + seo_title: "Define a global value here which should be used as the value for the title tag in the head section." meta_keywords: "Meta keywords used within the head tag of the page. They are separated by a comma. Required for SEO." meta_description: "Meta description used within the head tag of the page. Required for SEO." domain_name: "ex: locomotiveapp.org" diff --git a/config/locales/formtastic.fr.yml b/config/locales/formtastic.fr.yml index cfd53f07..d8d0f98e 100644 --- a/config/locales/formtastic.fr.yml +++ b/config/locales/formtastic.fr.yml @@ -59,7 +59,7 @@ fr: templatized: "Utilise la page comme un template pour un modèle défini." listed: "Controle si la page doit être visible depuis les menus automatiquement générés." content_type_id: "Le type du contenu pour lequel cette page est un template." - seo_title: "Définit un titre de page à mettre dans la balise TITLE de la page." + seo_title: "Définit un titre de page à mettre dans la balise TITLE de la page. Laissez le blanc pour utiliser la valeur par défaut (voir configuration du site)." meta_keywords: "Redéfinit les mots-clés du site. Utilisés à l'intérieur de la balise HEAD. Ils sont séparés par une virgule." meta_description: "Redéfinit la description du site. Utilisée à l'intérieur de la balise HEAD." snippet: diff --git a/doc/TODO b/doc/TODO index ca0752c1..91d406d3 100644 --- a/doc/TODO +++ b/doc/TODO @@ -28,9 +28,9 @@ x issue #57: seo page title x issue #56 x tweak ui: form, quick link to edit a model in the popup menu x Has_one => group by in the select -- better hints: - - notify the user that after changing the page title, they still have to click "update" for the change to be saved - - created_by ASC => "Creation date ascending" +x better hints: + x notify the user that after changing the page title, they still have to click "update" for the change to be saved + x created_by ASC => "Creation date ascending" - cancan: authors / designers - convert existing templates (the 2 of the themes section) - bug heroku: unable to upload a new file diff --git a/lib/locomotive/session_store.rb b/lib/locomotive/session_store.rb index ec99407c..d4139ef0 100644 --- a/lib/locomotive/session_store.rb +++ b/lib/locomotive/session_store.rb @@ -54,7 +54,7 @@ module ActionDispatch def destroy(env) session = @@session_class.first(:conditions => { :_id => env[SESSION_RECORD_KEY].id }) - session.destroy + session.try(:destroy) env[SESSION_RECORD_KEY] = nil end