diff --git a/app/views/layouts/_pre_maintenance.html.haml b/app/views/layouts/_pre_maintenance.html.haml index 06ed29093..9e8e7f01f 100644 --- a/app/views/layouts/_pre_maintenance.html.haml +++ b/app/views/layouts/_pre_maintenance.html.haml @@ -2,3 +2,13 @@ .site-banner.warning .container = sanitize(ENV['BANNER_MESSAGE']) + +- if ENV['ADMINISTRATION_BANNER_MESSAGE'].present? && instructeur_signed_in? + .site-banner.warning + .container + = sanitize(ENV['ADMINISTRATION_BANNER_MESSAGE']) + +- if ENV['USAGER_BANNER_MESSAGE'].present? && !instructeur_signed_in? + .site-banner.warning + .container + = sanitize(ENV['USAGER_BANNER_MESSAGE']) diff --git a/config/env.example.optional b/config/env.example.optional index b1b8a66ad..a248feae6 100644 --- a/config/env.example.optional +++ b/config/env.example.optional @@ -188,3 +188,11 @@ SMTP_AUTHENTICATION="plain" SENDMAIL_ENABLED="disabled" SENDMAIL_LOCATION="/usr/sbin/sendmail" SENDMAIL_ARGUMENTS="-i" + +# Various banner for important messages +# for all users +BANNER_MESSAGE="" +# for instructeurs and admins only +ADMINISTRATION_BANNER_MESSAGE="" +# for usager only +USAGER_BANNER_MESSAGE=""