diff --git a/app/controllers/photos_controller.rb b/app/controllers/photos_controller.rb index 85286b22b..f01e71a91 100644 --- a/app/controllers/photos_controller.rb +++ b/app/controllers/photos_controller.rb @@ -147,7 +147,10 @@ class PhotosController < ApplicationController @parent = @photo end - @object_aspect_ids = @parent.aspects.map{|a| a.id} + @object_aspect_ids = [] + if @parent.aspects + @object_aspect_ids = @parent.aspects.map{|a| a.id} + end comments_hash = Comment.hash_from_post_ids [@parent.id] person_hash = Person.from_post_comment_hash comments_hash diff --git a/app/views/aspects/index.html.haml b/app/views/aspects/index.html.haml index 84d36c436..e5d2d0504 100644 --- a/app/views/aspects/index.html.haml +++ b/app/views/aspects/index.html.haml @@ -25,13 +25,14 @@ /= info_text(t('.handle_explanation')) - if @notification_count > 0 || @request_count > 0 - - if @request_count > 0 - #new_requests + #new_requests + - if @request_count > 0 %h4 = new_request_link(@request_count) - - if @notification_count > 0 - #new_notifications + #new_notifications + - if @notification_count > 0 + = image_tag 'icons/mail_big.png', :height => 20, :width => 20, :style=>"margin-top:3px;" %h4 = new_notification_link(@notification_count) %hr diff --git a/public/stylesheets/sass/application.sass b/public/stylesheets/sass/application.sass index 3e42c35d8..158d46650 100644 --- a/public/stylesheets/sass/application.sass +++ b/public/stylesheets/sass/application.sass @@ -117,9 +117,10 @@ header :background :color #111 - :color rgba(30,30,30,0.98) + :color rgba(15,15,15,0.90) :background -webkit-gradient(linear, 0% 0%, 0% 100%, from(rgba(25,25,25,0.80)), to(rgba(0,0,0,0.98))) + :background -moz-linear-gradient(top, rgba(25,25,25,0.80), rgba(0,0,0,0.98)) :-webkit-box-shadow 0 1px 3px #111 :-moz-box-shadow 0 1px 2px #111 @@ -1989,6 +1990,7 @@ h3,h4 :padding 0 4px :margin :right 4px + :bottom 4px :-webkit-border-radius 3px :-moz-border-radius 3px @@ -2043,6 +2045,8 @@ h3,h4 .arrow, .aspect_badge :position relative + :margin + :bottom 0 .arrow :top -0.1em .aspect_badge @@ -2175,8 +2179,6 @@ ul.show_comments :position relative :top 4px - :margin - :bottom 2em :padding :bottom 1em @@ -2186,3 +2188,23 @@ ul.show_comments :padding :left 60px +#aspect_listings + :margin + :top 24px + +#new_notifications, +#new_requests + :position relative + + :margin + :bottom 10px + :top -8px + + h4 + :display inline + img + :position relative + :display inline + :margin + :right 4px + :top 5px diff --git a/spec/controllers/aspects_controller_spec.rb b/spec/controllers/aspects_controller_spec.rb index 01056e8ef..742c1c9fb 100644 --- a/spec/controllers/aspects_controller_spec.rb +++ b/spec/controllers/aspects_controller_spec.rb @@ -51,6 +51,7 @@ describe AspectsController do end it "returns all posts" do + @user.aspects.reload get :index assigns(:posts).length.should == 8 end