Retrospring/app/views/notifications/index.html.haml

59 lines
1.9 KiB
Plaintext
Raw Normal View History

2014-12-09 14:07:04 -08:00
.container.j2-page
= render 'notification_tabs'
.col-md-9.col-xs-12.col-sm-9
%ul.list-group
2014-12-14 05:34:51 -08:00
- Notification.for(current_user).each do |notification|
%li.list-group-item
.media
.pull-left
2014-12-14 05:41:44 -08:00
%img.notification--img{src: gravatar_url(notification.target.user)}
2014-12-14 05:34:51 -08:00
.media-body
2014-12-14 05:41:44 -08:00
%h6.media-heading.notification--user
= user_screen_name notification.target.user
2014-12-14 05:34:51 -08:00
- case notification.target_type
- when "Answer"
%p.notification--text
answered
%a{href: show_user_answer_path(username: notification.target.user.screen_name, id: notification.target.id)}
your question
= time_ago_in_words notification.target.created_at
ago
.notification--icon
%i.fa.fa-exclamation
2014-12-09 14:07:04 -08:00
%li.list-group-item
.media
.pull-left
%img.notification--img
.media-body
%h6.media-heading.notification--user
username
%p.notification--text
followed you!
.notification--icon
%i.fa.fa-users
%li.list-group-item
.media
.pull-left
%img.notification--img
.media-body
%h6.media-heading.notification--user
username
%p.notification--text
smiled at
%a your answer
some time ago!
.notification--icon
%i.fa.fa-smile-o
%li.list-group-item
.media
.pull-left
%img.notification--img
.media-body
%h6.media-heading.notification--user
username
%p.notification--text
commented
%a your answer
some time ago!
.notification--icon
%i.fa.fa-comments