diff --git a/app/controllers/notifications_controller.rb b/app/controllers/notifications_controller.rb index 84c30ab06..2e6786321 100644 --- a/app/controllers/notifications_controller.rb +++ b/app/controllers/notifications_controller.rb @@ -18,6 +18,7 @@ class NotificationsController < ApplicationController end def index + @aspect = :notification @notifications = Notification.find(:all, :conditions => {:recipient_id => current_user.id}, :order => 'updated_at desc', :include => [:target, {:actors => :profile}]).paginate :page => params[:page], :per_page => 25 @group_days = @notifications.group_by{|note| I18n.l(note.updated_at, :format => I18n.t('date.formats.fullmonth_day')) } diff --git a/app/views/contacts/_aspect_dropdown.html.haml b/app/views/contacts/_aspect_dropdown.html.haml index 22ee0d9d5..8e56a475e 100644 --- a/app/views/contacts/_aspect_dropdown.html.haml +++ b/app/views/contacts/_aspect_dropdown.html.haml @@ -12,7 +12,7 @@ - for aspect in @all_aspects = aspect_dropdown_list_item(aspect, contact, person) - - if defined?(@aspect) && ( @aspect == :profile || @aspect == :tag || @aspect == :search) + - if defined?(@aspect) && ( @aspect == :profile || @aspect == :tag || @aspect == :search || @aspect == :notification) %li.newItem .add_aspect = link_to "Add a new aspect", new_aspect_path(:person_id => person.id), :rel => 'facebox' diff --git a/app/views/notifications/index.html.haml b/app/views/notifications/index.html.haml index 9c4b1828d..05f83c9cf 100644 --- a/app/views/notifications/index.html.haml +++ b/app/views/notifications/index.html.haml @@ -18,6 +18,10 @@ .span-8.notifications_for_day - notes.each do |note| .stream_element{:data=>{:guid => note.id}, :class => "#{note.unread ? 'unread' : ''}"} + - if note.type == "Notifications::StartedSharing" + .right + = render 'contacts/aspect_dropdown', :contact => current_user.contact_for(note.target), :person => note.target, :hang => 'left' + %span.from = notification_people_link(note) = object_link(note)