aboutsummaryrefslogtreecommitdiffstats
path: root/app/controllers/track_controller.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/track_controller.rb')
-rw-r--r--app/controllers/track_controller.rb11
1 files changed, 7 insertions, 4 deletions
diff --git a/app/controllers/track_controller.rb b/app/controllers/track_controller.rb
index 312cedc6c..07e807451 100644
--- a/app/controllers/track_controller.rb
+++ b/app/controllers/track_controller.rb
@@ -123,7 +123,7 @@ class TrackController < ApplicationController
if @user
@existing_track = TrackThing.find_by_existing_track(@user, @track_thing)
if @existing_track
- flash[:notice] = _("You are already being emailed updates about ") + @track_thing.params[:list_description]
+ flash[:notice] = _("You are already following updates about {{track_description}}", :track_description => @track_thing.params[:list_description])
return true
end
end
@@ -135,8 +135,11 @@ class TrackController < ApplicationController
@track_thing.track_medium = 'email_daily'
@track_thing.tracking_user_id = @user.id
@track_thing.save!
-
- flash[:notice] = _("You will now be emailed updates about ") + @track_thing.params[:list_description]
+ if @user.receive_email_alerts
+ flash[:notice] = _('You will now be emailed updates about {{track_description}}. <a href="{{change_email_alerts_url}}">Prefer not to receive emails?</a>', :track_description => @track_thing.params[:list_description], :change_email_alerts_url => url_for(:controller => "user", :action => "wall", :url_name => @user.url_name))
+ else
+ flash[:notice] = _('You are now <a href="{{wall_url_user}}">following</a> updates about {{track_description}}', :track_description => @track_thing.params[:list_description], :wall_url_user => url_for(:controller => "user", :action => "wall", :url_name => @user.url_name))
+ end
return true
end
@@ -179,7 +182,7 @@ class TrackController < ApplicationController
new_medium = params[:track_medium]
if new_medium == 'delete'
track_thing.destroy
- flash[:notice] = _("You will no longer be emailed updates about ") + track_thing.params[:list_description]
+ flash[:notice] = _("You are no longer following {{track_description}}", :track_description => track_thing.params[:list_description])
redirect_to params[:r]
# Reuse code like this if we let medium change again.
#elsif new_medium == 'email_daily'