add add to aspect dropdown on notifications page

This commit is contained in:
danielgrippi 2011-05-17 14:40:57 -07:00
parent d7980978fa
commit 0c62277961
3 changed files with 6 additions and 1 deletions

View file

@ -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')) }

View file

@ -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'

View file

@ -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)