diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index ed8dc8e3ef01f22c409652d8ab78515d1f333a85..4542f29f17a60581e2f30217c296aa381951e10c 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 dd68fd58be35622add10a5cc13a797d19810b66f..85286b22b10eda641e641af18755d2f7102a8654 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 6def50c665c32ffa4a5a8697d0048a60f6281939..0856aa73c132a4d016856639404bb638dc79ee90 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 e281f6dccf7809a697919f5349ce403b4364d2d0..2114dde097ba4a3a0101a5031ab6d3d37f2c6250 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 79685aaf0685bfcdef7d230799883ea0a9c9389d..ec7e11457341bef054cf72ce9453b41699f6e7f1 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 e0921309dbbe0e11856139e064b1730f6f655a42..f90034bdb7daa0985c5334809d3a6e7361995767 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