From b1ae0c4a21983229e47dbe325b6297d01df068b2 Mon Sep 17 00:00:00 2001 From: Roland Jesse Date: Wed, 4 Apr 2012 22:24:44 +0200 Subject: [PATCH] =?UTF-8?q?FogBugz=20#122:=20Kein=20Men=C3=BC=20auf=20den?= =?UTF-8?q?=20Loginseiten?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/application_controller.rb | 6 +++ app/views/devise/sessions/new.html.erb | 8 ---- app/views/layouts/login.html.erb | 49 +++++++++++++++++++++++ public/stylesheets/layout.css | 2 +- 4 files changed, 56 insertions(+), 9 deletions(-) create mode 100644 app/views/layouts/login.html.erb diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 581285b..baba889 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -1,5 +1,6 @@ class ApplicationController < ActionController::Base protect_from_forgery + layout :layout_by_resource # Setup the locale based on the domain name used to access the website before_filter :set_locale @@ -12,4 +13,9 @@ class ApplicationController < ActionController::Base this_domain_ext = request.host.split('.').last I18n.locale = params[:locale] || DEFAULT_LANGUAGE_BY_DOMAIN[this_domain_ext] || 'en' end + + # Selects a layout different from layouts/application for some special pages. + def layout_by_resource + devise_controller? ? 'login' : 'application' + end end diff --git a/app/views/devise/sessions/new.html.erb b/app/views/devise/sessions/new.html.erb index d0d70c5..3a3befa 100644 --- a/app/views/devise/sessions/new.html.erb +++ b/app/views/devise/sessions/new.html.erb @@ -1,11 +1,3 @@ -
-
 
-
- -
-
 
-
-