From f5ab362f9620b5c2526830ab4bfb7cd1957da08d Mon Sep 17 00:00:00 2001 From: Joshua Arts Date: Wed, 11 Jul 2018 15:33:35 -0400 Subject: [PATCH] add ability for custom branding images --- app/views/shared/_header.html.erb | 11 +++-------- config/application.rb | 3 +++ sample.env | 4 ++++ 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/app/views/shared/_header.html.erb b/app/views/shared/_header.html.erb index 0f2666ab..5720dd70 100644 --- a/app/views/shared/_header.html.erb +++ b/app/views/shared/_header.html.erb @@ -1,14 +1,9 @@
- <% if current_user %> - <%= link_to current_user.main_room, class: "header-brand" do %> - <%= image_tag("logo_with_text.png", class: "header-brand-img") %> - <% end %> - <% else %> - <%= link_to root_path, class: "header-brand" do %> - <%= image_tag("logo_with_text.png", class: "header-brand-img") %> - <% end %> + <%= link_to (current_user ? current_user.main_room : root_path), class: "header-brand" do %> + <%= image_tag(Rails.configuration.branding_image.blank? ? "logo_with_text.png" : Rails.configuration.branding_image, + class: "header-brand-img") %> <% end %>
diff --git a/config/application.rb b/config/application.rb index 27fb26e0..3216ccd4 100644 --- a/config/application.rb +++ b/config/application.rb @@ -50,5 +50,8 @@ module Greenlight # Configure custom banner message. config.banner_message = ENV['BANNER_MESSAGE'] + + # Configure custom branding image. + config.branding_image = ENV['BRANDING_IMAGE'] end end diff --git a/sample.env b/sample.env index 864b5d0c..545f9f73 100644 --- a/sample.env +++ b/sample.env @@ -53,3 +53,7 @@ ALLOW_GREENLIGHT_ACCOUNTS=true # The recommended prefix is "/b". # RELATIVE_URL_ROOT=/b + +# A URL to the image you want to appear in the top right corner of Greenlight. +# By default, this is the BigBlueButton logo. +BRANDING_IMAGE=