diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index ed8dc8e3e..4542f29f1 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -15,6 +15,7 @@ class ApplicationController < ActionController::Base def set_contacts_notifications_and_status if user_signed_in? @aspect = nil + @object_aspect_ids = [] @all_aspects = current_user.aspects.fields(:name) @aspects_dropdown_array = @all_aspects.collect{|x| [x.to_s, x.id]} @notification_count = Notification.for(current_user, :unread =>true).all.count diff --git a/app/controllers/photos_controller.rb b/app/controllers/photos_controller.rb index dd68fd58b..85286b22b 100644 --- a/app/controllers/photos_controller.rb +++ b/app/controllers/photos_controller.rb @@ -147,6 +147,8 @@ class PhotosController < ApplicationController @parent = @photo end + @object_aspect_ids = @parent.aspects.map{|a| a.id} + comments_hash = Comment.hash_from_post_ids [@parent.id] person_hash = Person.from_post_comment_hash comments_hash @comment_hashes = comments_hash[@parent.id].map do |comment| diff --git a/app/controllers/status_messages_controller.rb b/app/controllers/status_messages_controller.rb index 6def50c66..0856aa73c 100644 --- a/app/controllers/status_messages_controller.rb +++ b/app/controllers/status_messages_controller.rb @@ -78,6 +78,9 @@ class StatusMessagesController < ApplicationController :person => person_hash[comment.person_id] } end + + @object_aspect_ids = @status_message.aspects.map{|a| a.id} + respond_with @status_message end end diff --git a/app/views/layouts/_header.html.haml b/app/views/layouts/_header.html.haml index e281f6dcc..2114dde09 100644 --- a/app/views/layouts/_header.html.haml +++ b/app/views/layouts/_header.html.haml @@ -45,7 +45,7 @@ = link_to t('_home'), root_path, :class => 'home_selector' - for aspect in @all_aspects - %li{:data=>{:guid=>aspect.id}, :class => ("selected" if current_aspect?(aspect))} + %li{:data=>{:guid=>aspect.id}, :class => ("selected" if @object_aspect_ids.include?(aspect.id))} = link_for_aspect(aspect, :class => 'aspect_selector') = link_to '▼', edit_aspect_path(aspect), :class => 'aspect_selector_edit' diff --git a/app/views/shared/_author_info.html.haml b/app/views/shared/_author_info.html.haml index 79685aaf0..ec7e11457 100644 --- a/app/views/shared/_author_info.html.haml +++ b/app/views/shared/_author_info.html.haml @@ -4,15 +4,6 @@ %h4 = person.name - - if post.public? - %span.arrow ➔ - %span.aspect_badge.public - =t('the_world') - - - elsif current_user.owns?(post) - %span.arrow ➔ - =aspect_badge(aspects_with_post(post.aspects, post)) - #person_nav_links = link_to t('layouts.header.view_profile'), person_path(person) = link_to t('_photos'), person_photos_path(person) diff --git a/public/stylesheets/sass/application.sass b/public/stylesheets/sass/application.sass index e0921309d..f90034bdb 100644 --- a/public/stylesheets/sass/application.sass +++ b/public/stylesheets/sass/application.sass @@ -1998,9 +1998,6 @@ h3,h4 :font :weight normal - &:hover - :color #eee - .aspects :position relative :margin @@ -2025,10 +2022,9 @@ h3,h4 .aspect_badge.single :background :color #999 - -.aspect_badge.all - :background - :color #ccc + &:hover + :background + :color #bbb .stream .avatar