From 1db856c0fe14966ab1bcb89214a887cff9346520 Mon Sep 17 00:00:00 2001 From: Georg G Date: Tue, 21 Apr 2015 15:46:43 +0200 Subject: [PATCH] fixed dropdown text for comments --- app/views/layouts/_notifications.html.haml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/app/views/layouts/_notifications.html.haml b/app/views/layouts/_notifications.html.haml index 7c272aa4..6eb6db5f 100644 --- a/app/views/layouts/_notifications.html.haml +++ b/app/views/layouts/_notifications.html.haml @@ -59,7 +59,13 @@ .notification--dropdown-text 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 }} - your answer + - 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 = time_ago_in_words notification.target.created_at ago %li= link_to "Show all notifications#{" and mark them as read" if notifications.pluck(:new).any?}", notifications_path \ No newline at end of file