diff options
author | Mario de la Ossa <mdelaossa@gitlab.com> | 2018-02-02 18:39:55 +0000 |
---|---|---|
committer | Sean McGivern <sean@mcgivern.me.uk> | 2018-02-02 18:39:55 +0000 |
commit | eaada9d7066a20b5af815f723e09cde60a5c8c10 (patch) | |
tree | 72ba4231e28f1c5e5405db21e0611a55e6428145 /app/views | |
parent | 8fa2932dc5cc7687e7d85ae7b00c07fd9bcc24a4 (diff) | |
download | gitlab-ce-eaada9d7066a20b5af815f723e09cde60a5c8c10.tar.gz |
use Gitlab::UserSettings directly as a singleton instead of including/extending it
Diffstat (limited to 'app/views')
19 files changed, 28 insertions, 28 deletions
diff --git a/app/views/admin/conversational_development_index/show.html.haml b/app/views/admin/conversational_development_index/show.html.haml index 30dd87f0463..ed40e7b4d00 100644 --- a/app/views/admin/conversational_development_index/show.html.haml +++ b/app/views/admin/conversational_development_index/show.html.haml @@ -6,7 +6,7 @@ = render 'callout' .prepend-top-default - - if !current_application_settings.usage_ping_enabled + - if !Gitlab::CurrentSettings.usage_ping_enabled = render 'disabled' - elsif @metric.blank? = render 'no_data' diff --git a/app/views/admin/dashboard/index.html.haml b/app/views/admin/dashboard/index.html.haml index d251f75a8fd..e3711421b61 100644 --- a/app/views/admin/dashboard/index.html.haml +++ b/app/views/admin/dashboard/index.html.haml @@ -119,7 +119,7 @@ .well-segment.admin-well %h4 Components - - if current_application_settings.version_check_enabled + - if Gitlab::CurrentSettings.version_check_enabled .pull-right = version_status_badge %p diff --git a/app/views/admin/health_check/show.html.haml b/app/views/admin/health_check/show.html.haml index 10a3bed0a4f..e31fb58b205 100644 --- a/app/views/admin/health_check/show.html.haml +++ b/app/views/admin/health_check/show.html.haml @@ -8,7 +8,7 @@ .pull-left %p #{ s_('HealthCheck|Access token is') } - %code#health-check-token= current_application_settings.health_check_access_token + %code#health-check-token= Gitlab::CurrentSettings.health_check_access_token .prepend-top-10 = button_to _("Reset health check access token"), reset_health_check_token_admin_application_settings_path, method: :put, class: 'btn btn-default', @@ -18,11 +18,11 @@ = link_to s_('More information is available|here'), help_page_path('user/admin_area/monitoring/health_check') %ul %li - %code= readiness_url(token: current_application_settings.health_check_access_token) + %code= readiness_url(token: Gitlab::CurrentSettings.health_check_access_token) %li - %code= liveness_url(token: current_application_settings.health_check_access_token) + %code= liveness_url(token: Gitlab::CurrentSettings.health_check_access_token) %li - %code= metrics_url(token: current_application_settings.health_check_access_token) + %code= metrics_url(token: Gitlab::CurrentSettings.health_check_access_token) %hr .panel.panel-default diff --git a/app/views/admin/runners/index.html.haml b/app/views/admin/runners/index.html.haml index 4f60be698e9..1e52646b1cc 100644 --- a/app/views/admin/runners/index.html.haml +++ b/app/views/admin/runners/index.html.haml @@ -36,7 +36,7 @@ data: { confirm: _("Are you sure you want to reset registration token?") } = render partial: 'ci/runner/how_to_setup_runner', - locals: { registration_token: current_application_settings.runners_registration_token, + locals: { registration_token: Gitlab::CurrentSettings.runners_registration_token, type: 'shared' } .append-bottom-20.clearfix diff --git a/app/views/devise/confirmations/almost_there.haml b/app/views/devise/confirmations/almost_there.haml index fb70d158096..79826a364db 100644 --- a/app/views/devise/confirmations/almost_there.haml +++ b/app/views/devise/confirmations/almost_there.haml @@ -4,9 +4,9 @@ %p.lead.append-bottom-20 Please check your email to confirm your account %hr -- if current_application_settings.after_sign_up_text.present? +- if Gitlab::CurrentSettings.after_sign_up_text.present? .well-confirmation.text-center - = markdown_field(current_application_settings, :after_sign_up_text) + = markdown_field(Gitlab::CurrentSettings, :after_sign_up_text) %p.text-center No confirmation email received? Please check your spam folder or .append-bottom-20.prepend-top-20.text-center diff --git a/app/views/help/index.html.haml b/app/views/help/index.html.haml index fdd72ead2cb..63811ea1c81 100644 --- a/app/views/help/index.html.haml +++ b/app/views/help/index.html.haml @@ -1,8 +1,8 @@ = webpack_bundle_tag 'docs' %div -- if current_application_settings.help_page_text.present? - = markdown_field(current_application_settings, :help_page_text) +- if Gitlab::CurrentSettings.help_page_text.present? + = markdown_field(Gitlab::CurrentSettings.current_application_settings, :help_page_text) %hr %h1 @@ -14,7 +14,7 @@ = version_status_badge %hr -- unless current_application_settings.help_page_hide_commercial_content? +- unless Gitlab::CurrentSettings.help_page_hide_commercial_content? %p.slead GitLab is open source software to collaborate on code. %br @@ -46,6 +46,6 @@ %li %button.btn-blank.btn-link.js-trigger-shortcut{ type: 'button' } Use shortcuts - - unless current_application_settings.help_page_hide_commercial_content? + - unless Gitlab::CurrentSettings.help_page_hide_commercial_content? %li= link_to 'Get a support subscription', 'https://about.gitlab.com/pricing/' %li= link_to 'Compare GitLab editions', 'https://about.gitlab.com/features/#compare' diff --git a/app/views/koding/index.html.haml b/app/views/koding/index.html.haml index 04e2d4b63e6..bb7f9ba7ae4 100644 --- a/app/views/koding/index.html.haml +++ b/app/views/koding/index.html.haml @@ -3,4 +3,4 @@ = icon('circle', class: 'cgreen') Integration is active for = link_to koding_project_url, target: '_blank', rel: 'noopener noreferrer' do - #{current_application_settings.koding_url} + #{Gitlab::CurrentSettings.koding_url} diff --git a/app/views/layouts/_head.html.haml b/app/views/layouts/_head.html.haml index ea13a5e6d62..488b706e6a6 100644 --- a/app/views/layouts/_head.html.haml +++ b/app/views/layouts/_head.html.haml @@ -41,7 +41,7 @@ = webpack_bundle_tag "webpack_runtime" = webpack_bundle_tag "common" = webpack_bundle_tag "main" - = webpack_bundle_tag "raven" if current_application_settings.clientside_sentry_enabled + = webpack_bundle_tag "raven" if Gitlab::CurrentSettings.clientside_sentry_enabled = webpack_bundle_tag "test" if Rails.env.test? - if content_for?(:page_specific_javascripts) diff --git a/app/views/layouts/devise.html.haml b/app/views/layouts/devise.html.haml index a95c834dcfd..257f7326409 100644 --- a/app/views/layouts/devise.html.haml +++ b/app/views/layouts/devise.html.haml @@ -26,8 +26,8 @@ Perform code reviews and enhance collaboration with merge requests. Each project can also have an issue tracker and a wiki. - - if current_application_settings.sign_in_text.present? - = markdown_field(current_application_settings, :sign_in_text) + - if Gitlab::CurrentSettings.sign_in_text.present? + = markdown_field(Gitlab::CurrentSettings.current_application_settings, :sign_in_text) %hr.footer-fixed .container.footer-container diff --git a/app/views/layouts/nav/sidebar/_profile.html.haml b/app/views/layouts/nav/sidebar/_profile.html.haml index a5a62a0695f..c878fcf2808 100644 --- a/app/views/layouts/nav/sidebar/_profile.html.haml +++ b/app/views/layouts/nav/sidebar/_profile.html.haml @@ -28,7 +28,7 @@ = link_to profile_account_path do %strong.fly-out-top-item-name #{ _('Account') } - - if current_application_settings.user_oauth_applications? + - if Gitlab::CurrentSettings.user_oauth_applications? = nav_link(controller: 'oauth/applications') do = link_to applications_profile_path do .nav-icon-container diff --git a/app/views/notify/_note_email.html.haml b/app/views/notify/_note_email.html.haml index 3e36da31ea3..94bd6f96dbc 100644 --- a/app/views/notify/_note_email.html.haml +++ b/app/views/notify/_note_email.html.haml @@ -22,7 +22,7 @@ - else commented on a #{link_to 'discussion', @target_url} -- elsif current_application_settings.email_author_in_body +- elsif Gitlab::CurrentSettings.email_author_in_body %p.details #{link_to @note.author_name, user_url(@note.author)} commented: diff --git a/app/views/notify/_note_email.text.erb b/app/views/notify/_note_email.text.erb index cb2e7fab6d5..c319cb55e87 100644 --- a/app/views/notify/_note_email.text.erb +++ b/app/views/notify/_note_email.text.erb @@ -12,7 +12,7 @@ <%= ":" -%> -<% elsif current_application_settings.email_author_in_body -%> +<% elsif Gitlab::CurrentSettings.email_author_in_body -%> <%= "#{@note.author_name} commented:" -%> diff --git a/app/views/notify/new_issue_email.html.haml b/app/views/notify/new_issue_email.html.haml index eb5157ccac9..e6cdaf85c0d 100644 --- a/app/views/notify/new_issue_email.html.haml +++ b/app/views/notify/new_issue_email.html.haml @@ -1,4 +1,4 @@ -- if current_application_settings.email_author_in_body +- if Gitlab::CurrentSettings.email_author_in_body %p.details #{link_to @issue.author_name, user_url(@issue.author)} created an issue: diff --git a/app/views/notify/new_merge_request_email.html.haml b/app/views/notify/new_merge_request_email.html.haml index 951c96bdb9c..0a9adc6f243 100644 --- a/app/views/notify/new_merge_request_email.html.haml +++ b/app/views/notify/new_merge_request_email.html.haml @@ -1,4 +1,4 @@ -- if current_application_settings.email_author_in_body +- if Gitlab::CurrentSettings.email_author_in_body %p.details #{link_to @merge_request.author_name, user_url(@merge_request.author)} created a merge request: diff --git a/app/views/notify/new_user_email.html.haml b/app/views/notify/new_user_email.html.haml index 00e1b5faae3..db4424a01f9 100644 --- a/app/views/notify/new_user_email.html.haml +++ b/app/views/notify/new_user_email.html.haml @@ -1,7 +1,7 @@ %p Hi #{@user['name']}! %p - - if current_application_settings.allow_signup? + - if Gitlab::CurrentSettings.allow_signup? Your account has been created successfully. - else The Administrator created an account for you. Now you are a member of the company GitLab application. diff --git a/app/views/projects/_export.html.haml b/app/views/projects/_export.html.haml index e759c87bda7..5dfe973f33c 100644 --- a/app/views/projects/_export.html.haml +++ b/app/views/projects/_export.html.haml @@ -1,4 +1,4 @@ -- return unless current_application_settings.project_export_enabled? +- return unless Gitlab::CurrentSettings.project_export_enabled? - project = local_assigns.fetch(:project) - expanded = Rails.env.test? diff --git a/app/views/projects/commits/_commit.html.haml b/app/views/projects/commits/_commit.html.haml index 90272ad9554..64259669c19 100644 --- a/app/views/projects/commits/_commit.html.haml +++ b/app/views/projects/commits/_commit.html.haml @@ -6,7 +6,7 @@ - link = commit_path(project, commit, merge_request: merge_request) - cache_key = [project.full_path, commit.id, - current_application_settings, + Gitlab::CurrentSettings.current_application_settings, @path.presence, current_controller?(:commits), merge_request&.iid, diff --git a/app/views/projects/pipelines_settings/_show.html.haml b/app/views/projects/pipelines_settings/_show.html.haml index c5f9f5aa15b..646c01c0989 100644 --- a/app/views/projects/pipelines_settings/_show.html.haml +++ b/app/views/projects/pipelines_settings/_show.html.haml @@ -31,7 +31,7 @@ .radio = form.label :enabled_ do = form.radio_button :enabled, '' - %strong Instance default (#{current_application_settings.auto_devops_enabled? ? 'enabled' : 'disabled'}) + %strong Instance default (#{Gitlab::CurrentSettings.auto_devops_enabled? ? 'enabled' : 'disabled'}) %br %span.descr Follow the instance default to either have Auto DevOps enabled or disabled when there is no project specific <code>.gitlab-ci.yml</code>. diff --git a/app/views/projects/runners/_shared_runners.html.haml b/app/views/projects/runners/_shared_runners.html.haml index 67607e4e9c6..b037b57e78a 100644 --- a/app/views/projects/runners/_shared_runners.html.haml +++ b/app/views/projects/runners/_shared_runners.html.haml @@ -1,8 +1,8 @@ %h3 Shared Runners .bs-callout.bs-callout-warning.shared-runners-description - - if current_application_settings.shared_runners_text.present? - = markdown_field(current_application_settings, :shared_runners_text) + - if Gitlab::CurrentSettings.shared_runners_text.present? + = markdown_field(Gitlab::CurrentSettings.current_application_settings, :shared_runners_text) - else GitLab Shared Runners execute code of different projects on the same Runner unless you configure GitLab Runner Autoscale with MaxBuilds 1 (which it is |