From 60e9405bb71cef461a4bc2d6a5d706a558a9dc32 Mon Sep 17 00:00:00 2001 From: Jacopo Date: Mon, 10 Apr 2017 17:51:15 +0200 Subject: Improve text on todo list when the todo action comes from yourself Improved todo message when an issue is assigned to yourself. - The new message when an user assign to himself an issue or a mr is: "You assigned issue xx to yourself" - The new message when an user adds a todo to himself is: "You added a todo for issue xx" - The new message when and user mention himself is: "You mentioned yourself on issue xx" - The new message when an user directly address himself is: "You directly addressed yourself on issue xx" - The new message when an user mark himself as an approver is: "You set yourself as an approver for merge request xx" --- app/helpers/events_helper.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'app/helpers/events_helper.rb') diff --git a/app/helpers/events_helper.rb b/app/helpers/events_helper.rb index 5f5c76d3722..960111ca045 100644 --- a/app/helpers/events_helper.rb +++ b/app/helpers/events_helper.rb @@ -10,11 +10,12 @@ module EventsHelper 'deleted' => 'icon_trash_o' }.freeze - def link_to_author(event) + def link_to_author(event, self_added: false) author = event.author if author - link_to author.name, user_path(author.username), title: author.name + name = self_added ? 'You' : author.name + link_to name, user_path(author.username), title: name else event.author_name end -- cgit v1.2.3