add ability to configure banner message

This commit is contained in:
Josh 2018-06-13 09:55:34 -04:00
parent 8390e075e1
commit bc9c2c1232
3 changed files with 16 additions and 19 deletions

View File

@ -11,24 +11,21 @@
<body class="app-background" data-controller="<%= params[:controller] %>" data-action="<%= params[:action] %>">
<div class="wrapper">
<!-- Messages -->
<div id='alerts'>
<div class='flash-alerts'>
<% flash.each do |name, msg| %>
<div class="alert alert-<%= name %> alert-dismissible fade in" role="alert">
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
<span class="alert-message"><%= msg %></span>
</div>
<% end %>
</div>
</div>
<%= render "shared/header" %>
<% if bigbluebutton_endpoint_default? %>
<%= render "shared/error_banner" %>
<%= render "shared/error_banner" do %>
<i class="fas fa-exclamation-triangle"></i>
<p class="d-inline">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 %>
<p class="d-inline"><%= Rails.configuration.banner_message %></p>
<% end %>
<% end %>
<%= yield %>

View File

@ -1,6 +1,3 @@
<div class="pt-2 text-center text-danger danger-section pb-1">
<i class="fas fa-exclamation-triangle"></i>
<p class="d-inline">&nbsp;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" %>.</p>
<%= yield %>
</div>

View File

@ -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