Merge pull request #3821 from diasp/feature/notification-images
Add images to notifications
This commit is contained in:
commit
4793ee5d5a
5 changed files with 18 additions and 2 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@
|
|||
|
||||
.media
|
||||
.bd
|
||||
= person_image_tag note.actors.first, :thumb_medium
|
||||
= notification_message_for(note)
|
||||
%div
|
||||
%time
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue