Skip to content
Extraits de code Groupes Projets
Valider 1ff644c1 rédigé par Steffen van Bergerem's avatar Steffen van Bergerem
Parcourir les fichiers

Fix mobile notifications

parent cc585805
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -41,7 +41,7 @@ class NotificationsController < ApplicationController ...@@ -41,7 +41,7 @@ class NotificationsController < ApplicationController
pager.replace(result) pager.replace(result)
end end
@notifications.each do |note| @notifications.each do |note|
note.note_html = render_to_string( :partial => 'notification.html', :locals => { :note => note } ) note.note_html = render_to_string( :partial => 'notification', :locals => { :note => note } )
end end
@group_days = @notifications.group_by{|note| note.created_at.strftime('%Y-%m-%d')} @group_days = @notifications.group_by{|note| note.created_at.strftime('%Y-%m-%d')}
......
.notification_element{:data=>{:guid => note.id, :type => (Notification.types.key(note.type) || '')}, :class => (note.unread ? "unread" : "read")}
.pull-right.unread-toggle
%i.entypo.eye{ :title => (note.unread ? t('notifications.index.mark_read') : t('notifications.index.mark_unread')) }
= person_image_tag note.actors.first, :thumb_small
.notification_message
= notification_message_for(note)
%div= timeago(note.created_at)
...@@ -87,12 +87,19 @@ describe NotificationsController, :type => :controller do ...@@ -87,12 +87,19 @@ describe NotificationsController, :type => :controller do
expect(Nokogiri(response.body).css('.aspect_membership')).to be_empty expect(Nokogiri(response.body).css('.aspect_membership')).to be_empty
end end
it "should provide a contacts menu for start sharing notifications" do it "should provide a contacts menu for start sharing notifications" do
eve.share_with(alice.person, eve.aspects.first) eve.share_with(alice.person, eve.aspects.first)
get :index, "per_page" => 5 get :index, "per_page" => 5
expect(Nokogiri(response.body).css('.aspect_membership')).not_to be_empty expect(Nokogiri(response.body).css('.aspect_membership')).not_to be_empty
end end
it 'succeeds on mobile' do
eve.share_with(alice.person, eve.aspects.first)
get :index, :format => :mobile
expect(response).to be_success
end
end end
describe "filter notifications" do describe "filter notifications" do
......
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