diff options
Diffstat (limited to 'app/helpers/application_helper.rb')
-rw-r--r-- | app/helpers/application_helper.rb | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 9af45daaca4..a2ef2f1207c 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -165,7 +165,7 @@ module ApplicationHelper css_classes = [short_format ? 'js-short-timeago' : 'js-timeago'] css_classes << html_class unless html_class.blank? - element = content_tag :time, l(time, format: "%b %d, %Y"), + content_tag :time, l(time, format: "%b %d, %Y"), class: css_classes.join(' '), title: l(time.to_time.in_time_zone, format: :timeago_tooltip), datetime: time.to_time.getutc.iso8601, @@ -174,8 +174,6 @@ module ApplicationHelper placement: placement, container: 'body' } - - element end def edited_time_ago_with_tooltip(object, placement: 'top', html_class: 'time_ago', exclude_author: false) @@ -194,10 +192,16 @@ module ApplicationHelper end end - def promo_host + # This needs to be used outside of Rails + def self.promo_host 'about.gitlab.com' end + # Convenient method for Rails helper + def promo_host + ApplicationHelper.promo_host + end + def promo_url 'https://' + promo_host end @@ -281,6 +285,7 @@ module ApplicationHelper def page_class class_names = [] class_names << 'issue-boards-page gl-overflow-auto' if current_controller?(:boards) + class_names << 'epic-boards-page' if current_controller?(:epic_boards) class_names << 'environment-logs-page' if current_controller?(:logs) class_names << 'with-performance-bar' if performance_bar_enabled? class_names << system_message_class @@ -405,3 +410,4 @@ module ApplicationHelper end ApplicationHelper.prepend_if_ee('EE::ApplicationHelper') +ApplicationHelper.prepend_if_jh('JH::ApplicationHelper') |