diff --git a/app/views/layouts/application.html.slim b/app/views/layouts/application.html.slim index 53e68f7..75c82e8 100644 --- a/app/views/layouts/application.html.slim +++ b/app/views/layouts/application.html.slim @@ -14,7 +14,10 @@ html body = render 'layouts/topbar' + #content.grid-container + - if Rails.configuration.alert_message + .callout.warning.alert-callout-subtle.radius =Rails.configuration.alert_message #messages = render 'layouts/messages' = yield diff --git a/config/environments/development.rb b/config/environments/development.rb index c63a445..e2ec649 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -68,6 +68,10 @@ Rails.application.configure do } ] + # Show a message on the front page. + # TODO: put it into the database and make it configurable online + config.alert_message = ENV['DEBSHOTS_ALERT_MESSAGE'] + # URL to fetch reviews from the Ubuntu JSON API # config.ubuntu_reviews_api_url = 'https://reviews.ubuntu.com/reviews/api/1.0/reviews/filter/en/any/any/any/%s' end diff --git a/config/environments/production.rb b/config/environments/production.rb index dc4295f..e938661 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -105,6 +105,10 @@ Rails.application.configure do } ] + # Show a message on the front page. + # TODO: put it into the database and make it configurable online + config.alert_message = ENV['DEBSHOTS_ALERT_MESSAGE'] + # URL to fetch reviews from the Ubuntu JSON API # config.ubuntu_reviews_api_url = 'https://reviews.ubuntu.com/reviews/api/1.0/reviews/filter/en/any/any/any/%s'