From 21cb768fc434e0ca5c64df2b5ac19dcf6c3bf224 Mon Sep 17 00:00:00 2001 From: Klaus Date: Thu, 16 Apr 2020 16:56:34 +0200 Subject: [PATCH] make help link configurable (#1161) * make help link configurable * change default help url * use default help url in setups without env var Co-authored-by: Jesus Federico --- app/views/shared/_header.html.erb | 8 +++++--- config/application.rb | 1 + sample.env | 6 ++++++ 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/app/views/shared/_header.html.erb b/app/views/shared/_header.html.erb index fc51b083..963e1aa5 100755 --- a/app/views/shared/_header.html.erb +++ b/app/views/shared/_header.html.erb @@ -81,9 +81,11 @@ <% end %> <% end %> - - <%= t("header.dropdown.help") %> - + <% if Rails.configuration.help_url.present? %> + + <%= t("header.dropdown.help") %> + + <% end %> <% if Rails.configuration.report_issue_url.present? %> <%= t("errors.internal.report") %> diff --git a/config/application.rb b/config/application.rb index 7414d6c2..24cfd269 100644 --- a/config/application.rb +++ b/config/application.rb @@ -126,6 +126,7 @@ module Greenlight config.maintenance_mode = ENV["MAINTENANCE_MODE"] == "true" config.report_issue_url = ENV["REPORT_ISSUE_URL"] + config.help_url = ENV["HELP_URL"].presence || "https://docs.bigbluebutton.org/greenlight/gl-overview.html" # DEFAULTS diff --git a/sample.env b/sample.env index 26743606..7e900d05 100644 --- a/sample.env +++ b/sample.env @@ -172,6 +172,12 @@ MAINTENANCE_WINDOW= # Button can be disabled by setting the value to blank REPORT_ISSUE_URL=https://github.com/bigbluebutton/greenlight/issues/new +# The link to the Need help? button that appears on the Account Dropdown +# +# Defaults to the Greenlight documentation +# Button can be disabled by setting the value to blank +HELP_URL=https://docs.bigbluebutton.org/greenlight/gl-overview.html + # Comment this out to send logs to STDOUT in production instead of log/production.log . # # RAILS_LOG_TO_STDOUT=true