Class: Gitlab::Email::Message::InProductMarketing::Create

Inherits:
Base
  • Object
show all
Defined in:
lib/gitlab/email/message/in_product_marketing/create.rb

Instance Attribute Summary

Attributes inherited from Base

#format

Instance Method Summary collapse

Methods inherited from Base

#cta_link, #initialize, #invite_link, #invite_text, #logo_path, #progress, #series?, #unsubscribe

Methods included from Routing

add_helpers, includes_helpers, redirect_legacy_paths, url_helpers

Methods included from Helper

#address, #footer_links, #unsubscribe_message

Constructor Details

This class inherits a constructor from Gitlab::Email::Message::InProductMarketing::Base

Instance Method Details

#body_line1Object


40
41
42
43
44
45
46
# File 'lib/gitlab/email/message/in_product_marketing/create.rb', line 40

def body_line1
  [
    s_("InProductMarketing|To understand and get the most out of GitLab, start at the beginning and %{project_link}. In GitLab, repositories are part of a project, so after you've created your project you can go ahead and %{repo_link}.") % { project_link: project_link, repo_link: repo_link },
    s_("InProductMarketing|Making the switch? It's easier than you think to import your projects into GitLab. Move %{github_link}, or import something %{bitbucket_link}.") % { github_link: github_link, bitbucket_link: bitbucket_link },
    s_("InProductMarketing|Sometimes you're not ready to make a full transition to a new tool. If you're not ready to fully commit, %{mirroring_link} gives you a safe way to try out GitLab in parallel with your current tool.") % { mirroring_link: mirroring_link }
  ][series]
end

#body_line2Object


48
49
50
51
52
53
54
# File 'lib/gitlab/email/message/in_product_marketing/create.rb', line 48

def body_line2
  [
    s_("InProductMarketing|That's all it takes to get going with GitLab, but if you're new to working with Git, check out our %{basics_link} for helpful tips and tricks for getting started.") % { basics_link: basics_link },
    s_("InProductMarketing|Have a different instance you'd like to import? Here's our %{import_link}.") % { import_link: import_link },
    s_("InProductMarketing|It's also possible to simply %{external_repo_link} in order to take advantage of GitLab's CI/CD.") % { external_repo_link: external_repo_link }
  ][series]
end

#cta_textObject


56
57
58
59
60
61
62
# File 'lib/gitlab/email/message/in_product_marketing/create.rb', line 56

def cta_text
  [
    s_('InProductMarketing|Create your first project!'),
    s_('InProductMarketing|Master the art of importing!'),
    s_('InProductMarketing|Understand your project options')
  ][series]
end

#invite_members?Boolean

Returns:

  • (Boolean)

64
65
66
# File 'lib/gitlab/email/message/in_product_marketing/create.rb', line 64

def invite_members?
  user.can?(:admin_group_member, group)
end

#subject_lineObject


8
9
10
11
12
13
14
# File 'lib/gitlab/email/message/in_product_marketing/create.rb', line 8

def subject_line
  [
    s_('InProductMarketing|Create a project in GitLab in 5 minutes'),
    s_('InProductMarketing|Import your project and code from GitHub, Bitbucket and others'),
    s_('InProductMarketing|Understand repository mirroring')
  ][series]
end

#subtitleObject


32
33
34
35
36
37
38
# File 'lib/gitlab/email/message/in_product_marketing/create.rb', line 32

def subtitle
  [
    s_('InProductMarketing|Dig in and create a project and a repo'),
    s_("InProductMarketing|Here's what you need to know"),
    s_('InProductMarketing|Try it out')
  ][series]
end

#taglineObject


16
17
18
19
20
21
22
# File 'lib/gitlab/email/message/in_product_marketing/create.rb', line 16

def tagline
  [
    s_('InProductMarketing|Get started today'),
    s_('InProductMarketing|Get our import guides'),
    s_('InProductMarketing|Need an alternative to importing?')
  ][series]
end

#titleObject


24
25
26
27
28
29
30
# File 'lib/gitlab/email/message/in_product_marketing/create.rb', line 24

def title
  [
    s_('InProductMarketing|Take your first steps with GitLab'),
    s_('InProductMarketing|Start by importing your projects'),
    s_('InProductMarketing|How (and why) mirroring makes sense')
  ][series]
end