diff options
Diffstat (limited to 'app/helpers')
-rw-r--r-- | app/helpers/application_settings_helper.rb | 1 | ||||
-rw-r--r-- | app/helpers/clusters_helper.rb | 1 | ||||
-rw-r--r-- | app/helpers/submodule_helper.rb | 8 |
3 files changed, 6 insertions, 4 deletions
diff --git a/app/helpers/application_settings_helper.rb b/app/helpers/application_settings_helper.rb index ef1bf283d0c..358b896702b 100644 --- a/app/helpers/application_settings_helper.rb +++ b/app/helpers/application_settings_helper.rb @@ -251,6 +251,7 @@ module ApplicationSettingsHelper :user_oauth_applications, :version_check_enabled, :allow_local_requests_from_hooks_and_services, + :hide_third_party_offers, :enforce_terms, :terms, :mirror_available diff --git a/app/helpers/clusters_helper.rb b/app/helpers/clusters_helper.rb index c24d340d184..8fd0b6f14c6 100644 --- a/app/helpers/clusters_helper.rb +++ b/app/helpers/clusters_helper.rb @@ -4,6 +4,7 @@ module ClustersHelper end def render_gcp_signup_offer + return if Gitlab::CurrentSettings.current_application_settings.hide_third_party_offers? return unless show_gcp_signup_offer? content_tag :section, class: 'no-animate expanded' do diff --git a/app/helpers/submodule_helper.rb b/app/helpers/submodule_helper.rb index 9151543dfdc..ebfde993456 100644 --- a/app/helpers/submodule_helper.rb +++ b/app/helpers/submodule_helper.rb @@ -8,7 +8,7 @@ module SubmoduleHelper url = repository.submodule_url_for(ref, submodule_item.path) if url == '.' || url == './' - url = File.join(Gitlab.config.gitlab.url, @project.full_path) + url = File.join(Gitlab.config.gitlab.url, repository.project.full_path) end if url =~ %r{([^/:]+)/([^/]+(?:\.git)?)\Z} @@ -31,7 +31,7 @@ module SubmoduleHelper [namespace_project_path(namespace, project), namespace_project_tree_path(namespace, project, submodule_item.id)] elsif relative_self_url?(url) - relative_self_links(url, submodule_item.id) + relative_self_links(url, submodule_item.id, repository.project) elsif github_dot_com_url?(url) standard_links('github.com', namespace, project, submodule_item.id) elsif gitlab_dot_com_url?(url) @@ -73,7 +73,7 @@ module SubmoduleHelper [base, [base, '/tree/', commit].join('')] end - def relative_self_links(url, commit) + def relative_self_links(url, commit, project) url.rstrip! # Map relative links to a namespace and project # For example: @@ -85,7 +85,7 @@ module SubmoduleHelper namespace = components.pop.gsub(/^\.\.$/, '') if namespace.empty? - namespace = @project.namespace.full_path + namespace = project.namespace.full_path end begin |