add images to notifications

This commit is contained in:
Diaspora Europe 2013-01-09 10:40:12 +01:00
parent 414e29f23e
commit c8ddba6b3e
5 changed files with 18 additions and 2 deletions

View file

@ -24,6 +24,7 @@
* Mark all unread post-related notifications as read, if one of this gets opened. [#3787](https://github.com/diaspora/diaspora/pull/3787)
* Add flash-notice when sending messages to non-contacts. [#3723](https://github.com/diaspora/diaspora/pull/3723)
* Re-add hovercards [#3802](https://github.com/diaspora/diaspora/pull/3802)
* Add images to notifications [#3821](https://github.com/diaspora/diaspora/pull/3821)
## Bug Fixes

View file

@ -375,6 +375,14 @@ ul.as-selections
img
:max-width 100%
.bd
> img
:height 30px
:width 30px
:float left
:margin
:right 10px
.stream_photo
:float left
:margin

View file

@ -1,6 +1,6 @@
.notification_element{:data=>{:guid => n.id}, :class => (n.unread ? "unread" : "read")}
%img{:src => n.actors.first.image_url(:thumb_medium)}
= notification_message_for(n)
= person_image_tag n.actors.first, :thumb_medium
= notification_message_for(n)
%div
%time
= timeago(n.created_at)

View file

@ -24,6 +24,7 @@
.media
.bd
= person_image_tag note.actors.first, :thumb_medium
= notification_message_for(note)
%div
%time

View file

@ -75,6 +75,12 @@ describe NotificationsController do
FactoryGirl.create(:notification, :recipient => alice, :target => @post)
end
it 'succeeds' do
get :index
response.should be_success
assigns[:notifications].count.should == 1
end
it 'succeeds for notification dropdown' do
get :index, :format => :json
response.should be_success