From bc9c2c12324e892d30bb23632903a13c480a3ae0 Mon Sep 17 00:00:00 2001 From: Josh Date: Wed, 13 Jun 2018 09:55:34 -0400 Subject: [PATCH] add ability to configure banner message --- app/views/layouts/application.html.erb | 27 +++++++++++-------------- app/views/shared/_error_banner.html.erb | 5 +---- config/application.rb | 3 +++ 3 files changed, 16 insertions(+), 19 deletions(-) diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index 0d8649cc..df106757 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -11,24 +11,21 @@
- -
-
- <% flash.each do |name, msg| %> - - <% end %> -
-
- <%= render "shared/header" %> <% if bigbluebutton_endpoint_default? %> - <%= render "shared/error_banner" %> + <%= render "shared/error_banner" do %> + +

This deployment is using a pre-configured testing server, + you should replace this with your own. + For details, see the <%= link_to "documentation", "http://docs.bigbluebutton.org/install/green-light.html#installing-greenlight", target: "_blank" %>. + <% end %> + <% end %> + + <% unless Rails.configuration.banner_message.blank? %> + <%= render "shared/error_banner" do %> +

<%= Rails.configuration.banner_message %>

+ <% end %> <% end %> <%= yield %> diff --git a/app/views/shared/_error_banner.html.erb b/app/views/shared/_error_banner.html.erb index 6d6f31eb..3aaeef82 100644 --- a/app/views/shared/_error_banner.html.erb +++ b/app/views/shared/_error_banner.html.erb @@ -1,6 +1,3 @@
- -

 This deployment is using a pre-configured testing server, - you should replace this with your own. - For details, see the <%= link_to "documentation", "http://docs.bigbluebutton.org/install/green-light.html#installing-greenlight", target: "_blank" %>.

+ <%= yield %>
diff --git a/config/application.rb b/config/application.rb index c780eaa6..c1583261 100644 --- a/config/application.rb +++ b/config/application.rb @@ -43,5 +43,8 @@ module Greenlight20 # Determine if GreenLight should allow non-omniauth signup/login. config.allow_user_signup = (ENV['ALLOW_GREENLIGHT_ACCOUNTS'] == "true") + + # Configure custom banner message. + config.banner_message = ENV['BANNER_MESSAGE'] end end