%li.list-group-item{class: (notification.new? ? 'list-group-item-warning' : '')} .media - case notification.target_type - when "Answer" .pull-left %img.img-rounded.notification--img{src: gravatar_url(notification.target.user)} .media-body %h6.media-heading.notification--user = user_screen_name notification.target.user %p.notification--text = raw t('views.notifications.answer.body', question: link_to(t('views.notifications.answer.question'), show_user_answer_path(username: notification.target.user.screen_name, id: notification.target.id)), time: time_tooltip(notification.target)) .notification--icon %i.fa.fa-exclamation - when "Relationship" .pull-left %img.img-rounded.notification--img{src: gravatar_url(notification.target.source)} .media-body %h6.media-heading.notification--user = user_screen_name notification.target.source %p.notification--text = raw t('views.notifications.relationship.body', time: time_tooltip(notification.target)) .notification--icon %i.fa.fa-users - when "Smile" .pull-left %img.img-rounded.notification--img{src: gravatar_url(notification.target.user)} .media-body %h6.media-heading.notification--user = user_screen_name notification.target.user %p.notification--text = raw t('views.notifications.smile.body', content: link_to(t('views.notifications.smile.answer'), show_user_answer_path(username: notification.target.user.screen_name, id: notification.target.answer.id)), time: time_tooltip(notification.target)) .notification--icon %i.fa.fa-smile-o - when "CommentSmile" .pull-left %img.img-rounded.notification--img{src: gravatar_url(notification.target.user)} .media-body %h6.media-heading.notification--user = user_screen_name notification.target.user %p.notification--text = raw t('views.notifications.smile.body', content: link_to(t('views.notifications.smile.comment'), show_user_answer_path(username: notification.target.user.screen_name, id: notification.target.answer.id)), time: time_tooltip(notification.target)) .notification--icon %i.fa.fa-smile-o - when "Comment" .pull-left %img.img-rounded.notification--img{src: gravatar_url(notification.target.user)} .media-body %h6.media-heading.notification--user = user_screen_name notification.target.user %p.notification--text / TODO: holy fuck I'm not going to touch this with locales for now, this one will be complicated. commented on %a{href: show_user_answer_path(username: notification.target.user.screen_name, id: notification.target.answer.id), title: "#{notification.target.answer.content[0..40]}...", data: { toggle: :tooltip, placement: :top }} - if notification.target.answer.user == current_user your - elsif notification.target.user == notification.target.answer.user their - else = user_screen_name(notification.target.answer.user, false, false) + "'s" answer %span{title: notification.target.created_at, data: { toggle: :tooltip, placement: :bottom }} = time_ago_in_words notification.target.created_at ago .notification--icon %i.fa.fa-comments