mirror of
https://github.com/internetee/registry.git
synced 2025-05-17 09:57:23 +02:00
refactored current_env to unstable_env
This commit is contained in:
parent
baa81be726
commit
dba57fde9d
2 changed files with 7 additions and 12 deletions
|
@ -1,16 +1,11 @@
|
||||||
module ApplicationHelper
|
module ApplicationHelper
|
||||||
def current_env
|
def unstable_env
|
||||||
if request.host == 'registry.gitlab.eu'
|
return nil if Rails.env.production?
|
||||||
:alpha
|
Rails.env
|
||||||
elsif request.host == 'testepp.internet.ee'
|
|
||||||
:staging
|
|
||||||
elsif Rails.env.development?
|
|
||||||
:development
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def env_style
|
def env_style
|
||||||
return '' if current_env.nil?
|
return '' if unstable_env.nil?
|
||||||
"background-image: url(#{image_path(current_env.to_s + '.png')});"
|
"background-image: url(#{image_path(unstable_env.to_s + '.png')});"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -22,9 +22,9 @@
|
||||||
%span.icon-bar
|
%span.icon-bar
|
||||||
= link_to root_path, class: 'navbar-brand' do
|
= link_to root_path, class: 'navbar-brand' do
|
||||||
= APP_CONFIG['app_name']
|
= APP_CONFIG['app_name']
|
||||||
- if current_env.present?
|
- if unstable_env.present?
|
||||||
.text-center
|
.text-center
|
||||||
%small{style: 'color: #0074B3;'}= current_env
|
%small{style: 'color: #0074B3;'}= unstable_env
|
||||||
|
|
||||||
.navbar-collapse.collapse
|
.navbar-collapse.collapse
|
||||||
%ul.nav.navbar-nav
|
%ul.nav.navbar-nav
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue