From c5fdfcd39d5cae2bde9ad6e1feb6899197bd5cda Mon Sep 17 00:00:00 2001 From: Pavel Chipiga Date: Thu, 10 Nov 2011 01:50:42 +0200 Subject: [PATCH] Fix sessions layout meta tags. Refs #2162 --- Gemfile | 1 + Gemfile.lock | 3 +++ app/views/devise/confirmations/new.html.haml | 2 +- app/views/devise/passwords/edit.html.haml | 2 +- app/views/devise/passwords/new.html.haml | 2 +- app/views/devise/registrations/edit.html.haml | 2 +- app/views/devise/registrations/new.html.haml | 2 +- app/views/devise/sessions/new.html.haml | 2 +- app/views/layouts/sessions.html.haml | 2 +- 9 files changed, 11 insertions(+), 7 deletions(-) diff --git a/Gemfile b/Gemfile index a8a1c6fc5..7d88f31ad 100644 --- a/Gemfile +++ b/Gemfile @@ -18,6 +18,7 @@ gem "yui-compressor", "0.9.5" # Higher versions depends on Platform gem which co gem 'ancestry', '~> 1.2.4' gem 'paperclip', "~> 2.3" gem "will_paginate", "~> 3.0.2" +gem 'meta-tags', '~> 1.2.4', :require => 'meta_tags' gem "russian" gem "grit" diff --git a/Gemfile.lock b/Gemfile.lock index 7d9f1060e..328c1479e 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -122,6 +122,8 @@ GEM i18n (>= 0.4.0) mime-types (~> 1.16) treetop (~> 1.4.8) + meta-tags (1.2.4) + actionpack mime-types (1.17.2) multi_json (1.0.3) multi_xml (0.4.1) @@ -284,6 +286,7 @@ DEPENDENCIES hirb hpricot jammit + meta-tags (~> 1.2.4) mysql2 (<= 0.2.9) oa-openid (~> 0.3.2) omniauth (~> 0.3.2) diff --git a/app/views/devise/confirmations/new.html.haml b/app/views/devise/confirmations/new.html.haml index feaf26526..64e59130c 100644 --- a/app/views/devise/confirmations/new.html.haml +++ b/app/views/devise/confirmations/new.html.haml @@ -1,5 +1,5 @@ .block - %h2= t("devise.confirmations.resend_header") + %h2= title t("devise.confirmations.resend_header") .content - if resource.errors.present? .flash diff --git a/app/views/devise/passwords/edit.html.haml b/app/views/devise/passwords/edit.html.haml index 78969c1a1..324238cf4 100644 --- a/app/views/devise/passwords/edit.html.haml +++ b/app/views/devise/passwords/edit.html.haml @@ -1,5 +1,5 @@ .block - %h2= t('devise.passwords.edit') + %h2= title t('devise.passwords.edit') .content - if resource.errors.present? .flash diff --git a/app/views/devise/passwords/new.html.haml b/app/views/devise/passwords/new.html.haml index b25bb7320..a4ac16821 100644 --- a/app/views/devise/passwords/new.html.haml +++ b/app/views/devise/passwords/new.html.haml @@ -1,5 +1,5 @@ .block - %h2= t('devise.passwords.link') + %h2= title t('devise.passwords.link') .content - if resource.errors.present? .flash diff --git a/app/views/devise/registrations/edit.html.haml b/app/views/devise/registrations/edit.html.haml index 5f5f7d40b..c7162c8ae 100644 --- a/app/views/devise/registrations/edit.html.haml +++ b/app/views/devise/registrations/edit.html.haml @@ -1,5 +1,5 @@ #block-signup.block - %h2 #{t("devise.registrations.edit")} #{resource_name.to_s.humanize} + %h2= title (t("devise.registrations.edit") + ' ' + resource_name.to_s.humanize) .content = form_for(resource, :as => resource_name, :url => registration_path(resource_name), :html => { :method => :put, :class => "form" }) do |f| - if resource.errors.present? diff --git a/app/views/devise/registrations/new.html.haml b/app/views/devise/registrations/new.html.haml index 56b44e7cf..aeddc6958 100644 --- a/app/views/devise/registrations/new.html.haml +++ b/app/views/devise/registrations/new.html.haml @@ -1,5 +1,5 @@ #block-signup.block - %h2= t("devise.registrations.sign_up_header") + %h2= title t("devise.registrations.sign_up_header") .content = form_for(resource, :as => resource_name, :url => registration_path(resource_name), :html => { :class => "form" }) do |f| - if resource.errors.present? diff --git a/app/views/devise/sessions/new.html.haml b/app/views/devise/sessions/new.html.haml index 7605731e2..ef74f8b0b 100644 --- a/app/views/devise/sessions/new.html.haml +++ b/app/views/devise/sessions/new.html.haml @@ -1,5 +1,5 @@ #block-login.block - %h2= t("layout.sessions.sign_in_header") + %h2= title t("layout.sessions.sign_in_header") .content.login - if flash.present? .flash diff --git a/app/views/layouts/sessions.html.haml b/app/views/layouts/sessions.html.haml index 12a33b652..055710952 100644 --- a/app/views/layouts/sessions.html.haml +++ b/app/views/layouts/sessions.html.haml @@ -1,7 +1,7 @@ !!! %html %head - %title= t("layout.global_header") + = display_meta_tags :site => APP_CONFIG['project_name'] = render :partial => "layouts/javascripts" -#= include_stylesheets :sessions = stylesheet_link_tag "web-app-theme/base.css", "web-app-theme/themes/default/style.css", "web-app-theme/override.css"