flash stylings
git-svn-id: http://svn.barleysodas.com/barleysodas/trunk@89 0f7b21a7-9e3a-4941-bbeb-ce5c7c368fa7master
parent
d4505fc3fd
commit
06b6b75a72
|
@ -110,7 +110,8 @@ class ApplicationController < ActionController::Base
|
||||||
|
|
||||||
# allow the chance to make a new one if you GET the URL, but not for Style
|
# allow the chance to make a new one if you GET the URL, but not for Style
|
||||||
if request.get? and obj.nil? and obj_type != 'styles'
|
if request.get? and obj.nil? and obj_type != 'styles'
|
||||||
flash[:info] = "The #{obj_name} was not found, would you like to make it?"
|
flash[:notice] =
|
||||||
|
"The #{obj_name} was not found, would you like to make it?"
|
||||||
redirect_to :action => 'new', :new_title => tfu
|
redirect_to :action => 'new', :new_title => tfu
|
||||||
return
|
return
|
||||||
elsif obj.nil?
|
elsif obj.nil?
|
||||||
|
|
|
@ -11,13 +11,13 @@ class SessionsController < ApplicationController
|
||||||
session[:people_id] = @people.id
|
session[:people_id] = @people.id
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.html {
|
format.html {
|
||||||
flash[:info] = "Welcome, #{@people.title}"
|
flash[:notice] = "Welcome, #{@people.title}"
|
||||||
if session[:request_url]
|
if session[:request_url]
|
||||||
t_url = session[:request_url]
|
t_url = session[:request_url]
|
||||||
session[:request_url] = nil
|
session[:request_url] = nil
|
||||||
redirect_to t_url
|
redirect_to t_url
|
||||||
else
|
else
|
||||||
redirect_to '/'
|
redirect_to pages_path
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
format.xml { head :ok }
|
format.xml { head :ok }
|
||||||
|
@ -37,7 +37,8 @@ class SessionsController < ApplicationController
|
||||||
|
|
||||||
def destroy
|
def destroy
|
||||||
reset_session
|
reset_session
|
||||||
redirect_to '/'
|
flash[:notice] = 'You have logged out.'
|
||||||
|
redirect_to pages_path
|
||||||
end
|
end
|
||||||
|
|
||||||
protected
|
protected
|
||||||
|
|
|
@ -417,3 +417,63 @@
|
||||||
font-size: 1.1em;
|
font-size: 1.1em;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* form errors */
|
||||||
|
.fieldWithErrors {
|
||||||
|
border: 1px solid #F00;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* flash hash styles */
|
||||||
|
#notice {
|
||||||
|
padding-top: 6px;
|
||||||
|
padding-bottom: 6px;
|
||||||
|
padding-left: 6px;
|
||||||
|
background-color: #F7F4D5;
|
||||||
|
border-top: 1px solid #666;
|
||||||
|
border-bottom: 1px solid #666;
|
||||||
|
color: #333;
|
||||||
|
font-weight: bold;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#error {
|
||||||
|
padding-top: 6px;
|
||||||
|
padding-bottom: 6px;
|
||||||
|
padding-left: 6px;
|
||||||
|
background-color: #FFCCCC;
|
||||||
|
border-top: 1px solid #666;
|
||||||
|
border-bottom: 1px solid #666;
|
||||||
|
color: #333;
|
||||||
|
font-weight: bold;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#errorExplanation {
|
||||||
|
width: 400px;
|
||||||
|
border: 2px solid red;
|
||||||
|
padding: 7px;
|
||||||
|
padding-bottom: 12px;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
background-color: #f0f0f0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#errorExplanation h2 {
|
||||||
|
text-align: left;
|
||||||
|
font-weight: bold;
|
||||||
|
padding: 5px 5px 5px 15px;
|
||||||
|
font-size: 12px;
|
||||||
|
margin: -7px;
|
||||||
|
background-color: #c00;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
#errorExplanation p {
|
||||||
|
color: #333;
|
||||||
|
margin-bottom: 0;
|
||||||
|
padding: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#errorExplanation ul li {
|
||||||
|
font-size: 12px;
|
||||||
|
list-style: square;
|
||||||
|
}
|
||||||
|
|
|
@ -16,7 +16,7 @@ body {
|
||||||
#container {
|
#container {
|
||||||
max-width: 795px;
|
max-width: 795px;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
margin: 0 auto; padding: 0;
|
margin: 0 auto; padding: 10px 0 0 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#header {
|
#header {
|
||||||
|
|
Reference in New Issue