Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Tatuya Kamada
gitlab-ce
Commits
1b5c483d
Commit
1b5c483d
authored
Apr 14, 2015
by
Douwe Maan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Consistently use "invitation" rather than "invite" in text.
parent
e50556fc
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
24 additions
and
20 deletions
+24
-20
app/controllers/groups/group_members_controller.rb
app/controllers/groups/group_members_controller.rb
+2
-2
app/controllers/invites_controller.rb
app/controllers/invites_controller.rb
+3
-3
app/controllers/projects/project_members_controller.rb
app/controllers/projects/project_members_controller.rb
+4
-4
app/helpers/groups_helper.rb
app/helpers/groups_helper.rb
+1
-1
app/helpers/projects_helper.rb
app/helpers/projects_helper.rb
+1
-1
app/mailers/emails/groups.rb
app/mailers/emails/groups.rb
+6
-5
app/mailers/emails/projects.rb
app/mailers/emails/projects.rb
+7
-4
No files found.
app/controllers/groups/group_members_controller.rb
View file @
1b5c483d
...
@@ -52,9 +52,9 @@ class Groups::GroupMembersController < Groups::ApplicationController
...
@@ -52,9 +52,9 @@ class Groups::GroupMembersController < Groups::ApplicationController
if
@group_member
.
invite?
if
@group_member
.
invite?
@group_member
.
resend_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
else
redirect_to
group_group_members_path
(
@group
),
alert:
'The invit
e
has already been accepted.'
redirect_to
group_group_members_path
(
@group
),
alert:
'The invit
ation
has already been accepted.'
end
end
end
end
...
...
app/controllers/invites_controller.rb
View file @
1b5c483d
...
@@ -28,7 +28,7 @@ class InvitesController < ApplicationController
...
@@ -28,7 +28,7 @@ class InvitesController < ApplicationController
redirect_to
path
,
notice:
"You have been granted
#{
member
.
human_access
}
access to
#{
source
}
."
redirect_to
path
,
notice:
"You have been granted
#{
member
.
human_access
}
access to
#{
source
}
."
else
else
redirect_to
:back
,
alert:
"The invit
e
could not be accepted."
redirect_to
:back
,
alert:
"The invit
ation
could not be accepted."
end
end
end
end
...
@@ -52,9 +52,9 @@ class InvitesController < ApplicationController
...
@@ -52,9 +52,9 @@ class InvitesController < ApplicationController
new_user_session_path
new_user_session_path
end
end
redirect_to
path
,
notice:
"You have declined the invit
e to join
#{
source
}
."
redirect_to
path
,
notice:
"You have declined the invit
ation to join
#{
label
}
."
else
else
redirect_to
:back
,
alert:
"The invit
e
could not be declined."
redirect_to
:back
,
alert:
"The invit
ation
could not be declined."
end
end
end
end
...
...
app/controllers/projects/project_members_controller.rb
View file @
1b5c483d
...
@@ -60,15 +60,15 @@ class Projects::ProjectMembersController < Projects::ApplicationController
...
@@ -60,15 +60,15 @@ class Projects::ProjectMembersController < Projects::ApplicationController
end
end
def
resend_invite
def
resend_invite
redirect_path
=
namespace_project_project_members_path
(
@project
.
namespace
,
@project
)
@project_member
=
@project
.
project_members
.
find
(
params
[
:id
])
@project_member
=
@project
.
project_members
.
find
(
params
[
:id
])
if
@project_member
.
invite?
if
@project_member
.
invite?
@project_member
.
resend_invite
@project_member
.
resend_invite
redirect_to
namespace_project_project_members_path
(
@project
.
namespace
,
redirect_to
redirect_path
,
notice:
'The invitation was successfully resent.'
@project
),
notice:
'Invite was successfully resent.'
else
else
redirect_to
namespace_project_project_members_path
(
@project
.
namespace
,
redirect_to
redirect_path
,
alert:
'The invitation has already been accepted.'
@project
),
alert:
'The invite has already been accepted.'
end
end
end
end
...
...
app/helpers/groups_helper.rb
View file @
1b5c483d
...
@@ -3,7 +3,7 @@ module GroupsHelper
...
@@ -3,7 +3,7 @@ module GroupsHelper
if
member
.
user
if
member
.
user
"Are you sure you want to remove
\"
#{
member
.
user
.
name
}
\"
from
\"
#{
group
.
name
}
\"
?"
"Are you sure you want to remove
\"
#{
member
.
user
.
name
}
\"
from
\"
#{
group
.
name
}
\"
?"
else
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
end
end
...
...
app/helpers/projects_helper.rb
View file @
1b5c483d
...
@@ -3,7 +3,7 @@ module ProjectsHelper
...
@@ -3,7 +3,7 @@ module ProjectsHelper
if
member
.
user
if
member
.
user
"You are going to remove
#{
member
.
user
.
name
}
from
#{
project
.
name
}
project team. Are you sure?"
"You are going to remove
#{
member
.
user
.
name
}
from
#{
project
.
name
}
project team. Are you sure?"
else
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
end
end
...
...
app/mailers/emails/groups.rb
View file @
1b5c483d
...
@@ -14,8 +14,9 @@ module Emails
...
@@ -14,8 +14,9 @@ module Emails
@group
=
@group_member
.
group
@group
=
@group_member
.
group
@token
=
token
@token
=
token
@target_url
=
group_url
(
@group
)
@target_url
=
group_url
(
@group
)
@current_user
=
@group_member
.
user
mail
(
to:
@group_member
.
invite_email
,
mail
(
to:
@group_member
.
invite_email
,
subject:
"Invit
e
to join group
#{
@group
.
name
}
"
)
subject:
"Invit
ation
to join group
#{
@group
.
name
}
"
)
end
end
def
group_invite_accepted_email
(
group_member_id
)
def
group_invite_accepted_email
(
group_member_id
)
...
@@ -24,21 +25,21 @@ module Emails
...
@@ -24,21 +25,21 @@ module Emails
@group
=
@group_member
.
group
@group
=
@group_member
.
group
@target_url
=
group_url
(
@group
)
@target_url
=
group_url
(
@group
)
@current_user
=
@group_member
.
created_by
mail
(
to:
@group_member
.
created_by
.
notification_email
,
mail
(
to:
@group_member
.
created_by
.
notification_email
,
subject:
subject
(
"Invit
e
accepted"
))
subject:
subject
(
"Invit
ation
accepted"
))
end
end
def
group_invite_declined_email
(
group_id
,
invite_email
,
access_level
,
created_by_id
)
def
group_invite_declined_email
(
group_id
,
invite_email
,
access_level
,
created_by_id
)
return
if
created_by_id
.
nil?
return
if
created_by_id
.
nil?
@group
=
Group
.
find
(
group_id
)
@group
=
Group
.
find
(
group_id
)
@created_by
=
User
.
find
(
created_by_id
)
@c
urrent_user
=
@c
reated_by
=
User
.
find
(
created_by_id
)
@access_level
=
access_level
@access_level
=
access_level
@invite_email
=
invite_email
@invite_email
=
invite_email
@target_url
=
group_url
(
@group
)
@target_url
=
group_url
(
@group
)
mail
(
to:
@created_by
.
notification_email
,
mail
(
to:
@created_by
.
notification_email
,
subject:
subject
(
"Invit
e
declined"
))
subject:
subject
(
"Invit
ation
declined"
))
end
end
end
end
end
end
app/mailers/emails/projects.rb
View file @
1b5c483d
...
@@ -14,8 +14,9 @@ module Emails
...
@@ -14,8 +14,9 @@ module Emails
@project
=
@project_member
.
project
@project
=
@project_member
.
project
@token
=
token
@token
=
token
@target_url
=
namespace_project_url
(
@project
.
namespace
,
@project
)
@target_url
=
namespace_project_url
(
@project
.
namespace
,
@project
)
@current_user
=
@project_member
.
user
mail
(
to:
@project_member
.
invite_email
,
mail
(
to:
@project_member
.
invite_email
,
subject:
"Invit
e
to join project
#{
@project
.
name_with_namespace
}
"
)
subject:
"Invit
ation
to join project
#{
@project
.
name_with_namespace
}
"
)
end
end
def
project_invite_accepted_email
(
project_member_id
)
def
project_invite_accepted_email
(
project_member_id
)
...
@@ -24,21 +25,23 @@ module Emails
...
@@ -24,21 +25,23 @@ module Emails
@project
=
@project_member
.
project
@project
=
@project_member
.
project
@target_url
=
namespace_project_url
(
@project
.
namespace
,
@project
)
@target_url
=
namespace_project_url
(
@project
.
namespace
,
@project
)
@current_user
=
@project_member
.
created_by
mail
(
to:
@project_member
.
created_by
.
notification_email
,
mail
(
to:
@project_member
.
created_by
.
notification_email
,
subject:
subject
(
"Invit
e
accepted"
))
subject:
subject
(
"Invit
ation
accepted"
))
end
end
def
project_invite_declined_email
(
project_id
,
invite_email
,
access_level
,
created_by_id
)
def
project_invite_declined_email
(
project_id
,
invite_email
,
access_level
,
created_by_id
)
return
if
created_by_id
.
nil?
return
if
created_by_id
.
nil?
@project
=
Project
.
find
(
project_id
)
@project
=
Project
.
find
(
project_id
)
@created_by
=
User
.
find
(
created_by_id
)
@c
urrent_user
=
@c
reated_by
=
User
.
find
(
created_by_id
)
@access_level
=
access_level
@access_level
=
access_level
@invite_email
=
invite_email
@invite_email
=
invite_email
@target_url
=
namespace_project_url
(
@project
.
namespace
,
@project
)
@target_url
=
namespace_project_url
(
@project
.
namespace
,
@project
)
mail
(
to:
@created_by
.
notification_email
,
mail
(
to:
@created_by
.
notification_email
,
subject:
subject
(
"Invit
e
declined"
))
subject:
subject
(
"Invit
ation
declined"
))
end
end
def
project_was_moved_email
(
project_id
,
user_id
)
def
project_was_moved_email
(
project_id
,
user_id
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment