From 78d5cbb22373464cefe1f1e80b457edefc66070e Mon Sep 17 00:00:00 2001 From: Oleksii Kriuchykhin Date: Mon, 13 Feb 2017 14:51:21 +0100 Subject: [PATCH] Add links to task completion notification [SCI-999] --- app/controllers/my_modules_controller.rb | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/app/controllers/my_modules_controller.rb b/app/controllers/my_modules_controller.rb index 99e6665e6..044d73231 100644 --- a/app/controllers/my_modules_controller.rb +++ b/app/controllers/my_modules_controller.rb @@ -370,12 +370,19 @@ class MyModulesController < ApplicationController if completed title = I18n.t('notifications.types.recent_changes') - message = I18n.t('notifications.task_completed', - user: current_user.name, + message = I18n.t( + 'notifications.task_completed', + user: current_user.full_name, module: @my_module.name, date: l(@my_module.completed_on, format: :full), - project: @project.name, - experiment: @my_module.experiment.name) + project: + view_context.link_to(@project.name, project_path(@project)), + experiment: + view_context.link_to( + @my_module.experiment.name, + canvas_experiment_path(@my_module.experiment) + ) + ) notification = Notification.create( type_of: :recent_changes,