diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-12-20 12:24:38 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-12-20 12:24:38 +0300 |
commit | 898e2cc1dfa88b4ac39cb4b35011f61b37f57b51 (patch) | |
tree | c6524edb6c9a43cccf93be05c36883fde1a53ee4 /app/helpers | |
parent | b5571e6e22cdacc81f78eff5943d68c8ba220fbb (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/helpers')
-rw-r--r-- | app/helpers/container_expiration_policies_helper.rb | 12 | ||||
-rw-r--r-- | app/helpers/dashboard_helper.rb | 2 | ||||
-rw-r--r-- | app/helpers/snippets_helper.rb | 2 |
3 files changed, 11 insertions, 5 deletions
diff --git a/app/helpers/container_expiration_policies_helper.rb b/app/helpers/container_expiration_policies_helper.rb index 17791e7b0ff..5fb7b5afa6e 100644 --- a/app/helpers/container_expiration_policies_helper.rb +++ b/app/helpers/container_expiration_policies_helper.rb @@ -3,19 +3,25 @@ module ContainerExpirationPoliciesHelper def cadence_options ContainerExpirationPolicy.cadence_options.map do |key, val| - { key: key.to_s, label: val } + { key: key.to_s, label: val }.tap do |base| + base[:default] = true if key.to_s == '1d' + end end end def keep_n_options ContainerExpirationPolicy.keep_n_options.map do |key, val| - { key: key, label: val } + { key: key, label: val }.tap do |base| + base[:default] = true if key == 10 + end end end def older_than_options ContainerExpirationPolicy.older_than_options.map do |key, val| - { key: key.to_s, label: val } + { key: key.to_s, label: val }.tap do |base| + base[:default] = true if key.to_s == '30d' + end end end end diff --git a/app/helpers/dashboard_helper.rb b/app/helpers/dashboard_helper.rb index 99ede8c3557..b38feb0fb6c 100644 --- a/app/helpers/dashboard_helper.rb +++ b/app/helpers/dashboard_helper.rb @@ -35,7 +35,7 @@ module DashboardHelper tag.p(aria: { label: label }) do concat(link_or_title) - concat(tag.span(class: ['light', 'float-right']) do + concat(tag.span(class: %w[light float-right]) do boolean_to_icon(enabled) end) diff --git a/app/helpers/snippets_helper.rb b/app/helpers/snippets_helper.rb index 1c7690f30d2..fd7e58826b5 100644 --- a/app/helpers/snippets_helper.rb +++ b/app/helpers/snippets_helper.rb @@ -127,7 +127,7 @@ module SnippetsHelper return unless attrs = snippet_badge_attributes(snippet) css_class, text = attrs - tag.span(class: ['badge', 'badge-gray']) do + tag.span(class: %w[badge badge-gray]) do concat(tag.i(class: ['fa', css_class])) concat(' ') concat(text) |