FogBugz #122: Kein Menü auf den Loginseiten

This commit is contained in:
Roland Jesse 2012-04-04 22:24:44 +02:00
parent 0ad98d0dd3
commit b1ae0c4a21
4 changed files with 56 additions and 9 deletions

View file

@ -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

View file

@ -1,11 +1,3 @@
<div class="row">
<div class="fourcol">&nbsp;</div>
<div class="fourcol">
<h2 class="login">Sign in</h2>
</div>
<div class="fourcol">&nbsp;</div>
</div>
<div class="row">
<div class="fourcol">&nbsp;</div>
<div class="fourcol login">

View file

@ -0,0 +1,49 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<title>Contact-o-Rama - <%= yield(:title) %></title>
<%= stylesheet_link_tag "reset.css", :media => "screen, projection" %>
<%= stylesheet_link_tag "1140" %>
<!--[if lte IE 9]>
<%= stylesheet_link_tag "ie.css" %>
<![endif]-->
<%= stylesheet_link_tag "layout" %>
<%= javascript_include_tag :defaults %>
<%= csrf_meta_tag %>
</head>
<body>
<div class="header_new">
<div align="center"><span class="logo_contact">Contact</span><span class="logo_o-rama">-o-Rama</span></div>
</div>
<div class="container">
<% unless flash.empty? %>
<div class="row">
<div class="fourcol">&nbsp;</div>
<div class="fourcol flash">
<%# examples: flash[:error] (:notice, ...), needs: respective css 'id' elements %>
<% flash.each do | key, msg | %>
<%= content_tag(:p, msg, :id => key) if flash[key] %>
<% end %>
</div>
<div class="fourcol">&nbsp;</div>
</div>
<% end %>
<%= yield %>
<%# Footer %>
<div class="row">
<div class="twelvecol" id="footer">
<span class="copyright">&copy; 2012 <a href="http://tailorama.com/">Tailorama</a></span>
&middot;
<span class="imprint"><a href="http://tailorama.de/impressum/">imprint</a></span>
</div>
</div>
</div> <%# end container %>
</body>
</html>

View file

@ -183,7 +183,7 @@ font-weight: 400;
/* Login form */
.login {
margin-top: 10px;
margin-top: 50px;
}
#user_new {
background-attachment: scroll;