Skip to content
Extraits de code Groupes Projets
Valider 0c622779 rédigé par danielgrippi's avatar danielgrippi
Parcourir les fichiers

add add to aspect dropdown on notifications page

parent d7980978
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -18,6 +18,7 @@ class NotificationsController < ApplicationController ...@@ -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 @@ ...@@ -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 @@ ...@@ -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)
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter