line 51 of _notification.html.haml line 57 of _notifications.html.haml
This commit is contained in:
parent
b8c0032986
commit
f564ef724e
|
@ -55,16 +55,10 @@
|
||||||
%h6.media-heading.notification--dropdown-user
|
%h6.media-heading.notification--dropdown-user
|
||||||
= user_screen_name notification.target.user
|
= user_screen_name notification.target.user
|
||||||
.notification--dropdown-text
|
.notification--dropdown-text
|
||||||
/ TODO: holy fuck I'm not going to touch this with locales for now, this one will be complicated.
|
- if notification.target.answer.user == current_user
|
||||||
commented on
|
= raw t('views.notifications.comment.body', content: link_to(t('views.notifications.comment.your', user: user_screen_name(current_user, false, false)), show_user_answer_path(username: notification.target.user.screen_name, id: notification.target.answer.id)), time: time_tooltip(notification.target))
|
||||||
%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 }}
|
- elsif notification.target.user == notification.target.answer.user
|
||||||
- if notification.target.answer.user == current_user
|
= raw t('views.notifications.comment.body', content: link_to(t('views.notifications.comment.their', user: user_screen_name(notification.target.answer.user, false, false)), show_user_answer_path(username: notification.target.user.screen_name, id: notification.target.answer.id)), time: time_tooltip(notification.target))
|
||||||
your
|
- else
|
||||||
- elsif notification.target.user == notification.target.answer.user
|
= raw t('views.notifications.comment.body', content: link_to(t('views.notifications.comment.user', user: user_screen_name(notification.target.user, false, false)), show_user_answer_path(username: notification.target.user.screen_name, id: notification.target.answer.id)), time: time_tooltip(notification.target))
|
||||||
their
|
|
||||||
- else
|
|
||||||
= user_screen_name(notification.target.answer.user, false, false) + "'s"
|
|
||||||
answer
|
|
||||||
= time_ago_in_words notification.target.created_at
|
|
||||||
ago
|
|
||||||
%li= link_to "#{t('views.notifications.show')}#{t('views.notifications.mark') if notifications.pluck(:new).any?}", notifications_path
|
%li= link_to "#{t('views.notifications.show')}#{t('views.notifications.mark') if notifications.pluck(:new).any?}", notifications_path
|
||||||
|
|
|
@ -48,18 +48,11 @@
|
||||||
%h6.media-heading.notification--user
|
%h6.media-heading.notification--user
|
||||||
= user_screen_name notification.target.user
|
= user_screen_name notification.target.user
|
||||||
%p.notification--text
|
%p.notification--text
|
||||||
/ TODO: holy fuck I'm not going to touch this with locales for now, this one will be complicated.
|
- if notification.target.answer.user == current_user
|
||||||
commented on
|
= raw t('views.notifications.comment.body', content: link_to(t('views.notifications.comment.your', user: user_screen_name(current_user, false, false)), show_user_answer_path(username: notification.target.user.screen_name, id: notification.target.answer.id)), time: time_tooltip(notification.target))
|
||||||
%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 }}
|
- elsif notification.target.user == notification.target.answer.user
|
||||||
- if notification.target.answer.user == current_user
|
= raw t('views.notifications.comment.body', content: link_to(t('views.notifications.comment.their', user: user_screen_name(notification.target.answer.user, false, false)), show_user_answer_path(username: notification.target.user.screen_name, id: notification.target.answer.id)), time: time_tooltip(notification.target))
|
||||||
your
|
- else
|
||||||
- elsif notification.target.user == notification.target.answer.user
|
= raw t('views.notifications.comment.body', content: link_to(t('views.notifications.comment.user', user: user_screen_name(notification.target.user, false, false)), show_user_answer_path(username: notification.target.user.screen_name, id: notification.target.answer.id)), time: time_tooltip(notification.target))
|
||||||
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
|
.notification--icon
|
||||||
%i.fa.fa-comments
|
%i.fa.fa-comments
|
||||||
|
|
|
@ -32,9 +32,15 @@ en:
|
||||||
relationship:
|
relationship:
|
||||||
body: "followed you %{time} ago"
|
body: "followed you %{time} ago"
|
||||||
smile:
|
smile:
|
||||||
body: "smiled at %{content} %{time} ago" # content v
|
body: "smiled at %{content} %{time} ago" # see below for 'content' vvvv
|
||||||
answer: "your answer" # content if smile
|
answer: "your answer" # content if smile, 'smiled at your answer'
|
||||||
comment: "your comment" # content if commentsmile
|
comment: "your comment" # content if commentsmile, 'smiled at your comment'
|
||||||
|
comment:
|
||||||
|
body: 'commented on %{content} %{time} ago' # see below for 'content' vvvv
|
||||||
|
your: 'your answer' # 'commented on your answer'
|
||||||
|
their: 'their answer' # 'commented on their answer'
|
||||||
|
user: '#{user}\'s answer' # 'commented on user's asnwer'
|
||||||
|
# all three have the 'user' variable
|
||||||
tabs:
|
tabs:
|
||||||
all: "All notifications"
|
all: "All notifications"
|
||||||
answer: "Answers"
|
answer: "Answers"
|
||||||
|
|
Loading…
Reference in New Issue