BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
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
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
24 additions
and
20 deletions
+24
-20
group_members_controller.rb
app/controllers/groups/group_members_controller.rb
+2
-2
invites_controller.rb
app/controllers/invites_controller.rb
+3
-3
project_members_controller.rb
app/controllers/projects/project_members_controller.rb
+4
-4
groups_helper.rb
app/helpers/groups_helper.rb
+1
-1
projects_helper.rb
app/helpers/projects_helper.rb
+1
-1
groups.rb
app/mailers/emails/groups.rb
+6
-5
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
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 invit
e
has already been accepted.'
redirect_to
group_group_members_path
(
@group
),
alert:
'The invit
ation
has already been accepted.'
end
end
...
...
app/controllers/invites_controller.rb
View file @
1b5c483d
...
...
@@ -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 invit
e
could not be accepted."
redirect_to
:back
,
alert:
"The invit
ation
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 invit
e to join
#{
source
}
."
redirect_to
path
,
notice:
"You have declined the invit
ation to join
#{
label
}
."
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
...
...
app/controllers/projects/project_members_controller.rb
View file @
1b5c483d
...
...
@@ -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
...
...
app/helpers/groups_helper.rb
View file @
1b5c483d
...
...
@@ -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
...
...
app/helpers/projects_helper.rb
View file @
1b5c483d
...
...
@@ -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
...
...
app/mailers/emails/groups.rb
View file @
1b5c483d
...
...
@@ -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:
"Invit
e
to join group
#{
@group
.
name
}
"
)
subject:
"Invit
ation
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
(
"Invit
e
accepted"
))
subject:
subject
(
"Invit
ation
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
)
@c
urrent_user
=
@c
reated_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
(
"Invit
e
declined"
))
subject:
subject
(
"Invit
ation
declined"
))
end
end
end
app/mailers/emails/projects.rb
View file @
1b5c483d
...
...
@@ -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:
"Invit
e
to join project
#{
@project
.
name_with_namespace
}
"
)
subject:
"Invit
ation
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
(
"Invit
e
accepted"
))
subject:
subject
(
"Invit
ation
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
)
@c
urrent_user
=
@c
reated_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
(
"Invit
e
declined"
))
subject:
subject
(
"Invit
ation
declined"
))
end
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