add add to aspect dropdown on notifications page
This commit is contained in:
parent
d7980978fa
commit
0c62277961
3 changed files with 6 additions and 1 deletions
|
|
@ -18,6 +18,7 @@ class NotificationsController < ApplicationController
|
||||||
end
|
end
|
||||||
|
|
||||||
def index
|
def index
|
||||||
|
@aspect = :notification
|
||||||
@notifications = Notification.find(:all, :conditions => {:recipient_id => current_user.id},
|
@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
|
: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')) }
|
@group_days = @notifications.group_by{|note| I18n.l(note.updated_at, :format => I18n.t('date.formats.fullmonth_day')) }
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@
|
||||||
- for aspect in @all_aspects
|
- for aspect in @all_aspects
|
||||||
= aspect_dropdown_list_item(aspect, contact, person)
|
= 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
|
%li.newItem
|
||||||
.add_aspect
|
.add_aspect
|
||||||
= link_to "Add a new aspect", new_aspect_path(:person_id => person.id), :rel => 'facebox'
|
= link_to "Add a new aspect", new_aspect_path(:person_id => person.id), :rel => 'facebox'
|
||||||
|
|
|
||||||
|
|
@ -18,6 +18,10 @@
|
||||||
.span-8.notifications_for_day
|
.span-8.notifications_for_day
|
||||||
- notes.each do |note|
|
- notes.each do |note|
|
||||||
.stream_element{:data=>{:guid => note.id}, :class => "#{note.unread ? 'unread' : ''}"}
|
.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
|
%span.from
|
||||||
= notification_people_link(note)
|
= notification_people_link(note)
|
||||||
= object_link(note)
|
= object_link(note)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue