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)
|
* 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)
|
* 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)
|
* 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
|
## Bug Fixes
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -375,6 +375,14 @@ ul.as-selections
|
||||||
img
|
img
|
||||||
:max-width 100%
|
:max-width 100%
|
||||||
|
|
||||||
|
.bd
|
||||||
|
> img
|
||||||
|
:height 30px
|
||||||
|
:width 30px
|
||||||
|
:float left
|
||||||
|
:margin
|
||||||
|
:right 10px
|
||||||
|
|
||||||
.stream_photo
|
.stream_photo
|
||||||
:float left
|
:float left
|
||||||
:margin
|
:margin
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
.notification_element{:data=>{:guid => n.id}, :class => (n.unread ? "unread" : "read")}
|
.notification_element{:data=>{:guid => n.id}, :class => (n.unread ? "unread" : "read")}
|
||||||
%img{:src => n.actors.first.image_url(:thumb_medium)}
|
= person_image_tag n.actors.first, :thumb_medium
|
||||||
= notification_message_for(n)
|
= notification_message_for(n)
|
||||||
%div
|
%div
|
||||||
%time
|
%time
|
||||||
= timeago(n.created_at)
|
= timeago(n.created_at)
|
||||||
|
|
|
||||||
|
|
@ -24,6 +24,7 @@
|
||||||
|
|
||||||
.media
|
.media
|
||||||
.bd
|
.bd
|
||||||
|
= person_image_tag note.actors.first, :thumb_medium
|
||||||
= notification_message_for(note)
|
= notification_message_for(note)
|
||||||
%div
|
%div
|
||||||
%time
|
%time
|
||||||
|
|
|
||||||
|
|
@ -75,6 +75,12 @@ describe NotificationsController do
|
||||||
FactoryGirl.create(:notification, :recipient => alice, :target => @post)
|
FactoryGirl.create(:notification, :recipient => alice, :target => @post)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
it 'succeeds' do
|
||||||
|
get :index
|
||||||
|
response.should be_success
|
||||||
|
assigns[:notifications].count.should == 1
|
||||||
|
end
|
||||||
|
|
||||||
it 'succeeds for notification dropdown' do
|
it 'succeeds for notification dropdown' do
|
||||||
get :index, :format => :json
|
get :index, :format => :json
|
||||||
response.should be_success
|
response.should be_success
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue