summaryrefslogtreecommitdiff
path: root/app/views/notify
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/notify')
-rw-r--r--app/views/notify/group_access_granted_email.html.haml3
-rw-r--r--app/views/notify/group_access_granted_email.text.erb3
-rw-r--r--app/views/notify/group_invite_accepted_email.html.haml6
-rw-r--r--app/views/notify/group_invite_accepted_email.text.erb3
-rw-r--r--app/views/notify/group_invite_declined_email.html.haml5
-rw-r--r--app/views/notify/group_invite_declined_email.text.erb3
-rw-r--r--app/views/notify/group_member_invited_email.html.haml14
-rw-r--r--app/views/notify/group_member_invited_email.text.erb4
-rw-r--r--app/views/notify/member_access_denied_email.html.haml2
-rw-r--r--app/views/notify/member_access_denied_email.text.erb4
-rw-r--r--app/views/notify/member_access_granted_email.html.haml2
-rw-r--r--app/views/notify/member_access_granted_email.text.erb4
-rw-r--r--app/views/notify/member_access_requested_email.html.haml4
-rw-r--r--app/views/notify/member_access_requested_email.text.erb4
-rw-r--r--app/views/notify/member_invite_accepted_email.html.haml2
-rw-r--r--app/views/notify/member_invite_accepted_email.text.erb4
-rw-r--r--app/views/notify/member_invite_declined_email.html.haml2
-rw-r--r--app/views/notify/member_invite_declined_email.text.erb4
-rw-r--r--app/views/notify/member_invited_email.html.haml8
-rw-r--r--app/views/notify/member_invited_email.text.erb2
20 files changed, 21 insertions, 62 deletions
diff --git a/app/views/notify/group_access_granted_email.html.haml b/app/views/notify/group_access_granted_email.html.haml
deleted file mode 100644
index 1283758c576..00000000000
--- a/app/views/notify/group_access_granted_email.html.haml
+++ /dev/null
@@ -1,3 +0,0 @@
-%p
- You have been granted #{@group_member.human_access} access to group
- #{link_to @group.name, @target_url}.
diff --git a/app/views/notify/group_access_granted_email.text.erb b/app/views/notify/group_access_granted_email.text.erb
deleted file mode 100644
index c7568350075..00000000000
--- a/app/views/notify/group_access_granted_email.text.erb
+++ /dev/null
@@ -1,3 +0,0 @@
-You have been granted <%= @group_member.human_access %> access to group <%= @group.name %>.
-
-<%= @target_url %>
diff --git a/app/views/notify/group_invite_accepted_email.html.haml b/app/views/notify/group_invite_accepted_email.html.haml
deleted file mode 100644
index 55efad384a7..00000000000
--- a/app/views/notify/group_invite_accepted_email.html.haml
+++ /dev/null
@@ -1,6 +0,0 @@
-%p
- #{@group_member.invite_email}, now known as
- #{link_to @group_member.user.name, user_url(@group_member.user)},
- has accepted your invitation to join group
- #{link_to @group.name, group_url(@group)}.
-
diff --git a/app/views/notify/group_invite_accepted_email.text.erb b/app/views/notify/group_invite_accepted_email.text.erb
deleted file mode 100644
index f8b70f7a5a6..00000000000
--- a/app/views/notify/group_invite_accepted_email.text.erb
+++ /dev/null
@@ -1,3 +0,0 @@
-<%= @group_member.invite_email %>, now known as <%= @group_member.user.name %>, has accepted your invitation to join group <%= @group.name %>.
-
-<%= group_url(@group) %>
diff --git a/app/views/notify/group_invite_declined_email.html.haml b/app/views/notify/group_invite_declined_email.html.haml
deleted file mode 100644
index f9525d84fac..00000000000
--- a/app/views/notify/group_invite_declined_email.html.haml
+++ /dev/null
@@ -1,5 +0,0 @@
-%p
- #{@invite_email}
- has declined your invitation to join group
- #{link_to @group.name, group_url(@group)}.
-
diff --git a/app/views/notify/group_invite_declined_email.text.erb b/app/views/notify/group_invite_declined_email.text.erb
deleted file mode 100644
index 6c19a288d15..00000000000
--- a/app/views/notify/group_invite_declined_email.text.erb
+++ /dev/null
@@ -1,3 +0,0 @@
-<%= @invite_email %> has declined your invitation to join group <%= @group.name %>.
-
-<%= group_url(@group) %>
diff --git a/app/views/notify/group_member_invited_email.html.haml b/app/views/notify/group_member_invited_email.html.haml
deleted file mode 100644
index 163e88bfea3..00000000000
--- a/app/views/notify/group_member_invited_email.html.haml
+++ /dev/null
@@ -1,14 +0,0 @@
-%p
- You have been invited
- - if inviter = @group_member.created_by
- by
- = link_to inviter.name, user_url(inviter)
- to join group
- = link_to @group.name, group_url(@group)
- as #{@group_member.human_access}.
-
-%p
- = link_to 'Accept invitation', invite_url(@token)
- or
- = link_to 'decline', decline_invite_url(@token)
-
diff --git a/app/views/notify/group_member_invited_email.text.erb b/app/views/notify/group_member_invited_email.text.erb
deleted file mode 100644
index 28ce4819b14..00000000000
--- a/app/views/notify/group_member_invited_email.text.erb
+++ /dev/null
@@ -1,4 +0,0 @@
-You have been invited <%= "by #{@group_member.created_by.name} " if @group_member.created_by %>to join group <%= @group.name %> as <%= @group_member.human_access %>.
-
-Accept invitation: <%= invite_url(@token) %>
-Decline invitation: <%= decline_invite_url(@token) %>
diff --git a/app/views/notify/member_access_denied_email.html.haml b/app/views/notify/member_access_denied_email.html.haml
index a25af24d783..71c9c50071a 100644
--- a/app/views/notify/member_access_denied_email.html.haml
+++ b/app/views/notify/member_access_denied_email.html.haml
@@ -1,4 +1,4 @@
%p
Your request to join the
- #{link_to member_target_name, member_target_url} #{member_target_type}
+ #{link_to member_source.human_name, member_source.web_url} #{member_source.model_name.singular}
has been denied.
diff --git a/app/views/notify/member_access_denied_email.text.erb b/app/views/notify/member_access_denied_email.text.erb
index eb204458d9d..87f2ef817ee 100644
--- a/app/views/notify/member_access_denied_email.text.erb
+++ b/app/views/notify/member_access_denied_email.text.erb
@@ -1,3 +1,3 @@
-Your request to join the <%= member_target_name %> <%= member_target_type %> has been denied.
+Your request to join the <%= member_source.human_name %> <%= member_source.model_name.singular %> has been denied.
-<%= member_target_url %>
+<%= member_source.web_url %>
diff --git a/app/views/notify/member_access_granted_email.html.haml b/app/views/notify/member_access_granted_email.html.haml
index 62837d74555..18dec806539 100644
--- a/app/views/notify/member_access_granted_email.html.haml
+++ b/app/views/notify/member_access_granted_email.html.haml
@@ -1,3 +1,3 @@
%p
You have been granted #{member.human_access} access to the
- #{link_to member_target_name, member_target_url} #{member_target_type}.
+ #{link_to member_source.human_name, member_source.web_url} #{member_source.model_name.singular}.
diff --git a/app/views/notify/member_access_granted_email.text.erb b/app/views/notify/member_access_granted_email.text.erb
index be9bb5ee948..a9fb3a589a5 100644
--- a/app/views/notify/member_access_granted_email.text.erb
+++ b/app/views/notify/member_access_granted_email.text.erb
@@ -1,3 +1,3 @@
-You have been granted <%= member.human_access %> access to the <%= member_target_name %> <%= member_target_type %>.
+You have been granted <%= member.human_access %> access to the <%= member_source.human_name %> <%= member_source.model_name.singular %>.
-<%= member_target_url %>
+<%= member_source.web_url %>
diff --git a/app/views/notify/member_access_requested_email.html.haml b/app/views/notify/member_access_requested_email.html.haml
index 96e92a069f2..76f1f08a0cb 100644
--- a/app/views/notify/member_access_requested_email.html.haml
+++ b/app/views/notify/member_access_requested_email.html.haml
@@ -1,3 +1,3 @@
%p
- #{link_to access_requester.name, access_requester} requested #{member.human_access}
- access to the #{link_to member_target_name, member_target_url} #{member_target_type}.
+ #{link_to member.user.name, member.user} requested #{member.human_access}
+ access to the #{link_to member_source.human_name, polymorphic_url([member_source, :members])} #{member_source.model_name.singular}.
diff --git a/app/views/notify/member_access_requested_email.text.erb b/app/views/notify/member_access_requested_email.text.erb
index 3b5de8c2abe..9c5ee0eaf26 100644
--- a/app/views/notify/member_access_requested_email.text.erb
+++ b/app/views/notify/member_access_requested_email.text.erb
@@ -1,3 +1,3 @@
-<%= access_requester.name %> (<%= user_url(access_requester) %>) requested <%= member.human_access %> access to the <%= member_target_name %> <%= member_target_type %>.
+<%= member.user.name %> (<%= user_url(member.user) %>) requested <%= member.human_access %> access to the <%= member_source.human_name %> <%= member_source.model_name.singular %>.
-<%= member_target_url %>
+<%= polymorphic_url([member_source, :members]) %>
diff --git a/app/views/notify/member_invite_accepted_email.html.haml b/app/views/notify/member_invite_accepted_email.html.haml
index c420a8a7b3c..2d1d40881eb 100644
--- a/app/views/notify/member_invite_accepted_email.html.haml
+++ b/app/views/notify/member_invite_accepted_email.html.haml
@@ -2,4 +2,4 @@
#{member.invite_email}, now known as
#{link_to member.user.name, user_url(member.user)},
has accepted your invitation to join the
- #{link_to member_target_name, member_target_url} #{member_target_type}.
+ #{link_to member_source.human_name, member_source.web_url} #{member_source.model_name.singular}.
diff --git a/app/views/notify/member_invite_accepted_email.text.erb b/app/views/notify/member_invite_accepted_email.text.erb
index a1616163ceb..cef87101427 100644
--- a/app/views/notify/member_invite_accepted_email.text.erb
+++ b/app/views/notify/member_invite_accepted_email.text.erb
@@ -1,3 +1,3 @@
-<%= member.invite_email %>, now known as <%= member.user.name %>, has accepted your invitation to join the <%= member_target_name %> <%= member_target_type %>.
+<%= member.invite_email %>, now known as <%= member.user.name %>, has accepted your invitation to join the <%= member_source.human_name %> <%= member_source.model_name.singular %>.
-<%= member_target_url %>
+<%= member_source.web_url %>
diff --git a/app/views/notify/member_invite_declined_email.html.haml b/app/views/notify/member_invite_declined_email.html.haml
index 5a30ac31b3c..aa1b373d1a6 100644
--- a/app/views/notify/member_invite_declined_email.html.haml
+++ b/app/views/notify/member_invite_declined_email.html.haml
@@ -1,4 +1,4 @@
%p
#{@invite_email}
has declined your invitation to join the
- #{link_to member_target_name, member_target_url} #{member_target_type}.
+ #{link_to member_source.human_name, member_source.web_url} #{member_source.model_name.singular}.
diff --git a/app/views/notify/member_invite_declined_email.text.erb b/app/views/notify/member_invite_declined_email.text.erb
index 301287946d4..8bc305910c4 100644
--- a/app/views/notify/member_invite_declined_email.text.erb
+++ b/app/views/notify/member_invite_declined_email.text.erb
@@ -1,3 +1,3 @@
-<%= @invite_email %> has declined your invitation to join the <%= member_target_name %> <%= member_target_type %>.
+<%= @invite_email %> has declined your invitation to join the <%= member_source.human_name %> <%= member_source.model_name.singular %>.
-<%= member_target_url %>
+<%= member_source.web_url %>
diff --git a/app/views/notify/member_invited_email.html.haml b/app/views/notify/member_invited_email.html.haml
index a8e58df9ac8..b8b75da3f2f 100644
--- a/app/views/notify/member_invited_email.html.haml
+++ b/app/views/notify/member_invited_email.html.haml
@@ -1,11 +1,11 @@
%p
You have been invited
- - if access_requester
+ - if member.created_by
by
- = link_to access_requester.name, user_url(access_requester)
+ = link_to member.created_by.name, user_url(member.created_by)
to join the
- = link_to member_target_name, member_target_url
- #{member_target_type} as #{member.human_access}.
+ = link_to member_source.human_name, member_source.web_url
+ #{member_source.model_name.singular} as #{member.human_access}.
%p
= link_to 'Accept invitation', invite_url(@token)
diff --git a/app/views/notify/member_invited_email.text.erb b/app/views/notify/member_invited_email.text.erb
index 1b6897ee2ec..0a6393355be 100644
--- a/app/views/notify/member_invited_email.text.erb
+++ b/app/views/notify/member_invited_email.text.erb
@@ -1,4 +1,4 @@
-You have been invited <%= "by #{access_requester.name} " if access_requester %>to join the <%= member_target_name %> <%= member_target_type %> as <%= member.human_access %>.
+You have been invited <%= "by #{member.created_by.name} " if member.created_by %>to join the <%= member_source.human_name %> <%= member_source.model_name.singular %> as <%= member.human_access %>.
Accept invitation: <%= invite_url(@token) %>
Decline invitation: <%= decline_invite_url(@token) %>