From bbae98625f4013084ba5059e7837d0e49535cea5 Mon Sep 17 00:00:00 2001 From: Antonio Terceiro Date: Tue, 30 Dec 2008 14:33:21 -0300 Subject: [PATCH] ActionItem628: linking directly to the URL where pending tasks can be solved. --- app/models/add_friend.rb | 2 +- app/models/approve_article.rb | 2 +- app/models/task_mailer.rb | 3 ++- app/views/task_mailer/target_notification.rhtml | 3 +++ 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/app/models/add_friend.rb b/app/models/add_friend.rb index 6b0e529..7bed2e5 100644 --- a/app/models/add_friend.rb +++ b/app/models/add_friend.rb @@ -27,7 +27,7 @@ class AddFriend < Task def target_notification_message description + "\n\n" + - _('You need to login to %{system} in order to accept %{requestor} as your friend. You can use the address below to do that.') % { :system => target.environment.name, :requestor => requestor.name } + _('You need to login to %{system} in order to accept %{requestor} as your friend.') % { :system => target.environment.name, :requestor => requestor.name } end end diff --git a/app/models/approve_article.rb b/app/models/approve_article.rb index a2f6660..960e906 100644 --- a/app/models/approve_article.rb +++ b/app/models/approve_article.rb @@ -41,7 +41,7 @@ class ApproveArticle < Task def target_notification_message description + "\n\n" + - _('You need to login on %{system} in order to approve or reject this article. You can use the address below to do that.') % { :system => target.environment.name } + _('You need to login on %{system} in order to approve or reject this article.') % { :system => target.environment.name } end end diff --git a/app/models/task_mailer.rb b/app/models/task_mailer.rb index 2e878e9..6e6bcc5 100644 --- a/app/models/task_mailer.rb +++ b/app/models/task_mailer.rb @@ -20,7 +20,8 @@ class TaskMailer < ActionMailer::Base :target => task.target.name, :message => msg, :environment => task.requestor.environment.name, - :url => url_for(:host => task.requestor.environment.default_hostname, :controller => 'home') + :url => url_for(:host => task.requestor.environment.default_hostname, :controller => 'home'), + :tasks_url => url_for(task.target.url.merge(:controller => 'tasks', :action => 'index')) end protected diff --git a/app/views/task_mailer/target_notification.rhtml b/app/views/task_mailer/target_notification.rhtml index 092f5e4..19ea23f 100644 --- a/app/views/task_mailer/target_notification.rhtml +++ b/app/views/task_mailer/target_notification.rhtml @@ -2,6 +2,9 @@ <%= word_wrap(@message) %> +<%= word_wrap(_('Access the address below to see this and other pending actions that need your attention:')) %> +<%= @tasks_url %> + -- <%= @environment %> <%= @url %> -- libgit2 0.21.2