diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index a7942966a..cc61f56db 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -1,16 +1,11 @@ module ApplicationHelper - def current_env - if request.host == 'registry.gitlab.eu' - :alpha - elsif request.host == 'testepp.internet.ee' - :staging - elsif Rails.env.development? - :development - end + def unstable_env + return nil if Rails.env.production? + Rails.env end def env_style - return '' if current_env.nil? - "background-image: url(#{image_path(current_env.to_s + '.png')});" + return '' if unstable_env.nil? + "background-image: url(#{image_path(unstable_env.to_s + '.png')});" end end diff --git a/app/views/layouts/application.haml b/app/views/layouts/application.haml index 917ee2d58..62220349c 100644 --- a/app/views/layouts/application.haml +++ b/app/views/layouts/application.haml @@ -22,9 +22,9 @@ %span.icon-bar = link_to root_path, class: 'navbar-brand' do = APP_CONFIG['app_name'] - - if current_env.present? + - if unstable_env.present? .text-center - %small{style: 'color: #0074B3;'}= current_env + %small{style: 'color: #0074B3;'}= unstable_env .navbar-collapse.collapse %ul.nav.navbar-nav