Commit 1b5c483d authored by Douwe Maan's avatar Douwe Maan

Consistently use "invitation" rather than "invite" in text.

parent e50556fc
......@@ -52,9 +52,9 @@ class Groups::GroupMembersController < Groups::ApplicationController
if @group_member.invite?
@group_member.resend_invite
redirect_to group_group_members_path(@group), notice: 'Invite was successfully resent.'
redirect_to group_group_members_path(@group), notice: 'The invitation was successfully resent.'
else
redirect_to group_group_members_path(@group), alert: 'The invite has already been accepted.'
redirect_to group_group_members_path(@group), alert: 'The invitation has already been accepted.'
end
end
......
......@@ -28,7 +28,7 @@ class InvitesController < ApplicationController
redirect_to path, notice: "You have been granted #{member.human_access} access to #{source}."
else
redirect_to :back, alert: "The invite could not be accepted."
redirect_to :back, alert: "The invitation could not be accepted."
end
end
......@@ -52,9 +52,9 @@ class InvitesController < ApplicationController
new_user_session_path
end
redirect_to path, notice: "You have declined the invite to join #{source}."
redirect_to path, notice: "You have declined the invitation to join #{label}."
else
redirect_to :back, alert: "The invite could not be declined."
redirect_to :back, alert: "The invitation could not be declined."
end
end
......
......@@ -60,15 +60,15 @@ class Projects::ProjectMembersController < Projects::ApplicationController
end
def resend_invite
redirect_path = namespace_project_project_members_path(@project.namespace, @project)
@project_member = @project.project_members.find(params[:id])
if @project_member.invite?
@project_member.resend_invite
redirect_to namespace_project_project_members_path(@project.namespace,
@project), notice: 'Invite was successfully resent.'
redirect_to redirect_path, notice: 'The invitation was successfully resent.'
else
redirect_to namespace_project_project_members_path(@project.namespace,
@project), alert: 'The invite has already been accepted.'
redirect_to redirect_path, alert: 'The invitation has already been accepted.'
end
end
......
......@@ -3,7 +3,7 @@ module GroupsHelper
if member.user
"Are you sure you want to remove \"#{member.user.name}\" from \"#{group.name}\"?"
else
"Are you sure you want to cancel invitation for \"#{member.invite_email}\" to join \"#{group.name}\"?"
"Are you sure you want to revoke the invitation for \"#{member.invite_email}\" to join \"#{group.name}\"?"
end
end
......
......@@ -3,7 +3,7 @@ module ProjectsHelper
if member.user
"You are going to remove #{member.user.name} from #{project.name} project team. Are you sure?"
else
"You are going to cancel invitation for #{member.invite_email} to join #{project.name} project team. Are you sure?"
"You are going to revoke the invitation for #{member.invite_email} to join #{project.name} project team. Are you sure?"
end
end
......
......@@ -14,8 +14,9 @@ module Emails
@group = @group_member.group
@token = token
@target_url = group_url(@group)
@current_user = @group_member.user
mail(to: @group_member.invite_email,
subject: "Invite to join group #{@group.name}")
subject: "Invitation to join group #{@group.name}")
end
def group_invite_accepted_email(group_member_id)
......@@ -24,21 +25,21 @@ module Emails
@group = @group_member.group
@target_url = group_url(@group)
@current_user = @group_member.created_by
mail(to: @group_member.created_by.notification_email,
subject: subject("Invite accepted"))
subject: subject("Invitation accepted"))
end
def group_invite_declined_email(group_id, invite_email, access_level, created_by_id)
return if created_by_id.nil?
@group = Group.find(group_id)
@created_by = User.find(created_by_id)
@current_user = @created_by = User.find(created_by_id)
@access_level = access_level
@invite_email = invite_email
@target_url = group_url(@group)
mail(to: @created_by.notification_email,
subject: subject("Invite declined"))
subject: subject("Invitation declined"))
end
end
end
......@@ -14,8 +14,9 @@ module Emails
@project = @project_member.project
@token = token
@target_url = namespace_project_url(@project.namespace, @project)
@current_user = @project_member.user
mail(to: @project_member.invite_email,
subject: "Invite to join project #{@project.name_with_namespace}")
subject: "Invitation to join project #{@project.name_with_namespace}")
end
def project_invite_accepted_email(project_member_id)
......@@ -24,21 +25,23 @@ module Emails
@project = @project_member.project
@target_url = namespace_project_url(@project.namespace, @project)
@current_user = @project_member.created_by
mail(to: @project_member.created_by.notification_email,
subject: subject("Invite accepted"))
subject: subject("Invitation accepted"))
end
def project_invite_declined_email(project_id, invite_email, access_level, created_by_id)
return if created_by_id.nil?
@project = Project.find(project_id)
@created_by = User.find(created_by_id)
@current_user = @created_by = User.find(created_by_id)
@access_level = access_level
@invite_email = invite_email
@target_url = namespace_project_url(@project.namespace, @project)
mail(to: @created_by.notification_email,
subject: subject("Invite declined"))
subject: subject("Invitation declined"))
end
def project_was_moved_email(project_id, user_id)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment