debian-mirror-gitlab/app/helpers/notify_helper.rb

38 lines
1.6 KiB
Ruby
Raw Normal View History

2020-07-28 23:09:34 +05:30
# frozen_string_literal: true
module NotifyHelper
def merge_request_reference_link(entity, *args)
link_to(entity.to_reference, merge_request_url(entity, *args))
end
2021-02-22 17:27:13 +05:30
def issue_reference_link(entity, *args, full: false)
link_to(entity.to_reference(full: full), issue_url(entity, *args))
2020-07-28 23:09:34 +05:30
end
2021-03-11 19:13:27 +05:30
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"
2021-06-08 01:23:25 +05:30
s_("InviteEmail|As a maintainer, you have full access to projects. You can push commits to the default branch and deploy to production.")
2021-03-11 19:13:27 +05:30
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
end
2020-07-28 23:09:34 +05:30
end