From 99060abbfc9f2c68921a456355ebbab44924236c Mon Sep 17 00:00:00 2001 From: Devin Howard Date: Fri, 25 Nov 2016 14:58:22 -0500 Subject: [PATCH] add unsubscribe link to emails --- app/views/map_mailer/access_request_email.html.erb | 3 +++ app/views/map_mailer/access_request_email.text.erb | 2 +- app/views/map_mailer/invite_to_edit_email.html.erb | 3 +++ app/views/map_mailer/invite_to_edit_email.text.erb | 2 +- app/views/shared/_mailer_unsubscribe_link.html.erb | 3 +++ app/views/shared/_mailer_unsubscribe_link.text.erb | 5 +++++ 6 files changed, 16 insertions(+), 2 deletions(-) create mode 100644 app/views/shared/_mailer_unsubscribe_link.html.erb create mode 100644 app/views/shared/_mailer_unsubscribe_link.text.erb diff --git a/app/views/map_mailer/access_request_email.html.erb b/app/views/map_mailer/access_request_email.html.erb index ae4f4018..b620d40b 100644 --- a/app/views/map_mailer/access_request_email.html.erb +++ b/app/views/map_mailer/access_request_email.html.erb @@ -18,6 +18,9 @@ <%= link_to 'Open in Metamaps', map_url(@map), target: "_blank", style: button_style %>

Make sense with Metamaps

+ + <%= render partial: 'shared/mailer_unsubscribe_link' %> + diff --git a/app/views/map_mailer/access_request_email.text.erb b/app/views/map_mailer/access_request_email.text.erb index ad698d9e..25ccb2bd 100644 --- a/app/views/map_mailer/access_request_email.text.erb +++ b/app/views/map_mailer/access_request_email.text.erb @@ -7,4 +7,4 @@ Decline [<%= deny_access_map_url(id: @map.id, request_id: @request.id) %>] Make sense with Metamaps - +<%= render partial: 'shared/mailer_unsubscribe_link' %> diff --git a/app/views/map_mailer/invite_to_edit_email.html.erb b/app/views/map_mailer/invite_to_edit_email.html.erb index 73067c48..be09bf4f 100644 --- a/app/views/map_mailer/invite_to_edit_email.html.erb +++ b/app/views/map_mailer/invite_to_edit_email.html.erb @@ -17,6 +17,9 @@ <%= link_to 'Open in Metamaps', map_url(@map), target: "_blank", style: button_style %>

Make sense with Metamaps

+ + <%= render partial: 'shared/mailer_unsubscribe_link' %> + diff --git a/app/views/map_mailer/invite_to_edit_email.text.erb b/app/views/map_mailer/invite_to_edit_email.text.erb index 80eecfed..7d3bf397 100644 --- a/app/views/map_mailer/invite_to_edit_email.text.erb +++ b/app/views/map_mailer/invite_to_edit_email.text.erb @@ -4,4 +4,4 @@ Make sense with Metamaps - +<%= render partial: 'shared/mailer_unsubscribe_link' %> diff --git a/app/views/shared/_mailer_unsubscribe_link.html.erb b/app/views/shared/_mailer_unsubscribe_link.html.erb new file mode 100644 index 00000000..2bbe7a89 --- /dev/null +++ b/app/views/shared/_mailer_unsubscribe_link.html.erb @@ -0,0 +1,3 @@ + diff --git a/app/views/shared/_mailer_unsubscribe_link.text.erb b/app/views/shared/_mailer_unsubscribe_link.text.erb new file mode 100644 index 00000000..3a2f7d0d --- /dev/null +++ b/app/views/shared/_mailer_unsubscribe_link.text.erb @@ -0,0 +1,5 @@ + + +You can unsubscribe from all Metamaps emails by visiting the following link: + +<%= unsubscribe_notifications_url %>