Module: Gitlab::Email::Message::InProductMarketing::Helper
- Includes:
- ActionView::Context, ActionView::Helpers::TagHelper
- Included in:
- BuildIosAppGuide
- Defined in:
- lib/gitlab/email/message/in_product_marketing/helper.rb
Instance Method Summary collapse
- #address ⇒ Object
- #footer_links ⇒ Object
- #unsubscribe_message(self_managed_preferences_link = nil) ⇒ Object
Instance Method Details
#address ⇒ Object
30 31 32 |
# File 'lib/gitlab/email/message/in_product_marketing/helper.rb', line 30 def address s_('InProductMarketing|%{strong_start}GitLab Inc.%{strong_end} 268 Bush Street, #350, San Francisco, CA 94104, USA').html_safe % end |
#footer_links ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/gitlab/email/message/in_product_marketing/helper.rb', line 11 def links = [ [s_('InProductMarketing|Blog'), 'https://about.gitlab.com/blog'], [s_('InProductMarketing|Twitter'), 'https://twitter.com/gitlab'], [s_('InProductMarketing|Facebook'), 'https://www.facebook.com/gitlab'], [s_('InProductMarketing|YouTube'), 'https://www.youtube.com/channel/UCnMGQ8QHMAnVIsI3xJrihhg'] ] case format when :html links.map do |text, link| ActionController::Base.helpers.link_to(text, link) end else '| ' + links.map do |text, link| [text, link].join(' ') end.join("\n| ") end end |
#unsubscribe_message(self_managed_preferences_link = nil) ⇒ Object
34 35 36 37 38 39 40 41 42 43 |
# File 'lib/gitlab/email/message/in_product_marketing/helper.rb', line 34 def (self_managed_preferences_link = nil) parts = Gitlab.com? ? unsubscribe_com : unsubscribe_self_managed(self_managed_preferences_link) case format when :html parts.join(' ') else parts.join("\n" + ' ' * 16) end end |