Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lib/gitlab/email/message/in_product_marketing/base.rb')
-rw-r--r--lib/gitlab/email/message/in_product_marketing/base.rb23
1 files changed, 23 insertions, 0 deletions
diff --git a/lib/gitlab/email/message/in_product_marketing/base.rb b/lib/gitlab/email/message/in_product_marketing/base.rb
index c4895d35a14..8c6583164bf 100644
--- a/lib/gitlab/email/message/in_product_marketing/base.rb
+++ b/lib/gitlab/email/message/in_product_marketing/base.rb
@@ -7,6 +7,7 @@ module Gitlab
class Base
include Gitlab::Email::Message::InProductMarketing::Helper
include Gitlab::Routing
+ include Gitlab::Experiment::Dsl
attr_accessor :format
@@ -56,6 +57,18 @@ module Gitlab
end
end
+ def invite_members?
+ false
+ end
+
+ def invite_text
+ s_('InProductMarketing|Do you have a teammate who would be perfect for this task?')
+ end
+
+ def invite_link
+ action_link(s_('InProductMarketing|Invite them to help out.'), group_url(group, open_modal: 'invite_members_for_task'))
+ end
+
def unsubscribe
parts = Gitlab.com? ? unsubscribe_com : unsubscribe_self_managed(track, series)
@@ -148,6 +161,16 @@ module Gitlab
link(s_('InProductMarketing|update your preferences'), preference_link)
end
+
+ def invite_members_for_task_experiment_enabled?
+ return unless user.can?(:admin_group_member, group)
+
+ experiment(:invite_members_for_task, namespace: group) do |e|
+ e.candidate { true }
+ e.record!
+ e.run
+ end
+ end
end
end
end