Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Got alert and notice displaying nicely and also admin button for admins

  • Loading branch information...
commit 8e8b261fa5ad831c441d2576345fb176e3a6fe76 1 parent eb108cb
stevetuckner@stewdle.com authored
View
12 app/views/layouts/application.html.haml
@@ -35,13 +35,21 @@
%ul.profile
%li.identity= "Hello " + current_user.name
+ - if current_user.admin?
+ %li= link_to "Admin", admin_path
%li= link_to "Logout", destroy_user_session_path
/%li= link_to "Edit Profile", edit_user_registration_path
%li= link_to "Edit Profile", edit_user_path(current_user)
%li{:style => "display:none;clear:right;"}
%ul{:style => "display:none;clear:both;"}
- .notice= notice
- .alert= alert
+
+ - unless notice.blank? && alert.blank?
+ .notices-and-alerts
+ .notices-and-alerts-inner
+ - unless notice.blank?
+ %span.notice= notice
+ - unless alert.blank?
+ %span.alert= alert
.content= yield
View
3  db/schema.rb
@@ -10,7 +10,7 @@
#
# It's strongly recommended to check this file into your version control system.
-ActiveRecord::Schema.define(:version => 20110531041251) do
+ActiveRecord::Schema.define(:version => 20110813154436) do
create_table "comments", :force => true do |t|
t.integer "user_id"
@@ -83,6 +83,7 @@
t.string "name"
t.float "rating"
t.integer "league_id"
+ t.string "roles"
end
add_index "users", ["email"], :name => "index_users_on_email", :unique => true
View
16 public/stylesheets/sass/partials/_layout.sass
@@ -12,6 +12,7 @@ body
//background: url(../images/radial.png) no-repeat 50% 0%, url(../images/bg.png) repeat 0% 0%
//background-color: #d95300
header
+
text-align: center
//background-color: rgba(0,0,0,0.25)
padding: 0
@@ -76,6 +77,21 @@ header
#border-top: 1px solid #444444
#border-left: 1px solid #444444
+.notices-and-alerts
+ background-color: $content_background_color
+ padding-top: 5px
+ padding-bottom: 5px
+ font-weight: bold
+ .notices-and-alerts-inner
+ text-align: center
+ padding: 5px
+ background-color: #FFFFFF
+ +border-radius(5px)
+ .notice
+ color: green
+ .alert
+ color: red
+
.content
width: 100%
background-color: $content_background_color
View
1  public/stylesheets/sass/partials/_styles.sass
@@ -335,6 +335,7 @@ caption
.button
font-size: 1.5em
+ line-height: 2.5em
padding: 5px
+border-radius(5px)
background-color: $tab_background_color
View
18 public/stylesheets/screen.css
@@ -286,6 +286,7 @@ caption {
.button {
font-size: 1.5em;
+ line-height: 2.5em;
padding: 5px;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
@@ -449,6 +450,23 @@ header {
#border-top: 1px solid #444444;
#border-left: 1px solid #444444; }
+.notices-and-alerts {
+ background-color: #770000;
+ padding-top: 5px;
+ padding-bottom: 5px;
+ font-weight: bold; }
+ .notices-and-alerts .notices-and-alerts-inner {
+ text-align: center;
+ padding: 5px;
+ background-color: white;
+ -moz-border-radius: 5px;
+ -webkit-border-radius: 5px;
+ border-radius: 5px; }
+ .notices-and-alerts .notices-and-alerts-inner .notice {
+ color: green; }
+ .notices-and-alerts .notices-and-alerts-inner .alert {
+ color: red; }
+
.content {
width: 100%;
background-color: #770000;
Please sign in to comment.
Something went wrong with that request. Please try again.