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:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-07-20 03:10:15 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-07-20 03:10:15 +0300
commitf0e9d20cd8b273b2bbefd8c2cde3f63247feb61c (patch)
treee1407bcdcaeac8348bc64fdc03800b9ed034bceb /lib/gitlab/email
parent0ea2d99b0bf43878a889cc6aa91443245d05356d (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/gitlab/email')
-rw-r--r--lib/gitlab/email/message/in_product_marketing/experience.rb92
1 files changed, 0 insertions, 92 deletions
diff --git a/lib/gitlab/email/message/in_product_marketing/experience.rb b/lib/gitlab/email/message/in_product_marketing/experience.rb
deleted file mode 100644
index 7520de6d2a3..00000000000
--- a/lib/gitlab/email/message/in_product_marketing/experience.rb
+++ /dev/null
@@ -1,92 +0,0 @@
-# frozen_string_literal: true
-
-module Gitlab
- module Email
- module Message
- module InProductMarketing
- class Experience < Base
- include Gitlab::Utils::StrongMemoize
-
- EASE_SCORE_SURVEY_ID = 1
-
- def subject_line
- s_('InProductMarketing|Do you have a minute?')
- end
-
- def tagline
- end
-
- def title
- s_('InProductMarketing|We want your GitLab experience to be great')
- end
-
- def subtitle
- s_('InProductMarketing|Take this 1-question survey!')
- end
-
- def body_line1
- s_('InProductMarketing|%{strong_start}Overall, how difficult or easy was it to get started with GitLab?%{strong_end}').html_safe % strong_options
- end
-
- def body_line2
- s_('InProductMarketing|Click on the number below that corresponds with your answer — 1 being very difficult, 5 being very easy.')
- end
-
- def cta_text
- end
-
- def feedback_link(rating)
- params = {
- onboarding_progress: onboarding_progress,
- response: rating,
- show_invite_link: show_invite_link,
- survey_id: EASE_SCORE_SURVEY_ID
- }
-
- params[:show_incentive] = true if show_incentive?
-
- "#{gitlab_com_root_url}/-/survey_responses?#{params.to_query}"
- end
-
- def feedback_ratings(rating)
- [
- s_('InProductMarketing|Very difficult'),
- s_('InProductMarketing|Difficult'),
- s_('InProductMarketing|Neutral'),
- s_('InProductMarketing|Easy'),
- s_('InProductMarketing|Very easy')
- ][rating - 1]
- end
-
- def feedback_thanks
- s_('InProductMarketing|Feedback from users like you really improves our product. Thanks for your help!')
- end
-
- private
-
- def onboarding_progress
- strong_memoize(:onboarding_progress) do
- group.onboarding_progress.number_of_completed_actions
- end
- end
-
- def show_invite_link
- strong_memoize(:show_invite_link) do
- group.max_member_access_for_user(user) >= GroupMember::DEVELOPER && user.preferred_language == 'en'
- end
- end
-
- def show_incentive?
- show_invite_link && group.member_count > 1
- end
-
- def gitlab_com_root_url
- return root_url.chomp('/') if Rails.env.development?
-
- Gitlab::Saas.com_url
- end
- end
- end
- end
- end
-end