Commit e6da51d9 authored by Jonne Haß's avatar Jonne Haß

Merge pull request #5766 from svbergerem/fix-mobile-notifications

Fix mobile notifications
parents cc585805 1ff644c1
......@@ -41,7 +41,7 @@ class NotificationsController < ApplicationController
pager.replace(result)
end
@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
@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
expect(Nokogiri(response.body).css('.aspect_membership')).to be_empty
end
it "should provide a contacts menu for start sharing notifications" do
eve.share_with(alice.person, eve.aspects.first)
get :index, "per_page" => 5
expect(Nokogiri(response.body).css('.aspect_membership')).not_to be_empty
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
describe "filter notifications" do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment