diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-06-16 21:25:58 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-06-16 21:25:58 +0300 |
commit | a5f4bba440d7f9ea47046a0a561d49adf0a1e6d4 (patch) | |
tree | fb69158581673816a8cd895f9d352dcb3c678b1e /app/helpers/notify_helper.rb | |
parent | d16b2e8639e99961de6ddc93909f3bb5c1445ba1 (diff) |
Add latest changes from gitlab-org/gitlab@14-0-stable-eev14.0.0-rc42
Diffstat (limited to 'app/helpers/notify_helper.rb')
-rw-r--r-- | app/helpers/notify_helper.rb | 32 |
1 files changed, 9 insertions, 23 deletions
diff --git a/app/helpers/notify_helper.rb b/app/helpers/notify_helper.rb index 38c98776fdf..c0ba93f4a30 100644 --- a/app/helpers/notify_helper.rb +++ b/app/helpers/notify_helper.rb @@ -9,29 +9,15 @@ module NotifyHelper link_to(entity.to_reference(full: full), issue_url(entity, *args)) end - def invited_role_description(role_name) - case role_name - when "Guest" - s_("InviteEmail|As a guest, you can view projects, leave comments, and create issues.") - when "Reporter" - s_("InviteEmail|As a reporter, you can view projects and reports, and leave comments on issues.") - when "Developer" - s_("InviteEmail|As a developer, you have full access to projects, so you can take an idea from concept to production.") - when "Maintainer" - s_("InviteEmail|As a maintainer, you have full access to projects. You can push commits to the default branch and deploy to production.") - when "Owner" - s_("InviteEmail|As an owner, you have full access to projects and can manage access to the group, including inviting new members.") - when "Minimal Access" - s_("InviteEmail|As a user with minimal access, you can view the high-level group from the UI and API.") - end - end - def invited_to_description(source) - case source - when "project" - s_('InviteEmail|Projects can be used to host your code, track issues, collaborate on code, and continuously build, test, and deploy your app with built-in GitLab CI/CD.') - when "group" - s_('InviteEmail|Groups assemble related projects together and grant members access to several projects at once.') - end + default_description = + case source + when Project + s_('InviteEmail|Projects are used to host and collaborate on code, track issues, and continuously build, test, and deploy your app with built-in GitLab CI/CD.') + when Group + s_('InviteEmail|Groups assemble related projects together and grant members access to several projects at once.') + end + + (source.description || default_description).truncate(200, separator: ' ') end end |