forked from audrey/intranet
Merge pull request 'MOTD-Colors' (#2) from MOTD-Colors into master
Reviewed-on: http://localhost:3000/IS/intranet/pulls/2
This commit is contained in:
commit
1cd99c0254
@ -2,7 +2,10 @@ APP_ENV=prod
|
||||
APP_SECRET=ba16d9b24f329be32408d0a9dc24a534 #Nothing. We're an open book and have no secrets
|
||||
#Message of the Day
|
||||
#If blank, no MOTD will be displayed on pages.
|
||||
#MOTDLEVEL sets the color of the motd display, according to Bootstrap 5.3 settings.
|
||||
#MOTD Level Options: info (default, light-blue), warning (yellow), danger(red), success (green)
|
||||
MOTD=""
|
||||
MOTDLEVEL=""
|
||||
#Ticket Database file URIs.
|
||||
RP_DATABASE_URL=sqlite:///%kernel.project_dir%/RPCopy/CRParchive.db
|
||||
SP_DATABASE_URL=sqlite:///%kernel.project_dir%/RPCopy/CSParchive.db
|
||||
|
||||
@ -2,6 +2,7 @@ twig:
|
||||
default_path: '%kernel.project_dir%/templates'
|
||||
globals:
|
||||
motd: '%env(MOTD)%'
|
||||
motdLevel: '%env(MOTDLEVEL)%'
|
||||
|
||||
when@test:
|
||||
twig:
|
||||
|
||||
@ -40,7 +40,12 @@
|
||||
</div>
|
||||
{# Display MOTD, if one is set #}
|
||||
{% if motd is defined and motd is not empty %}
|
||||
<div class="alert alert-info alert-dismissible fade show" role="alert">
|
||||
{% if motdLevel is defined and motdLevel is not empty %}
|
||||
|
||||
{% else %}
|
||||
{% set motdLevel = "info" %}
|
||||
{% endif %}
|
||||
<div class="alert alert-primary alert-{{ motdLevel }} alert-dismissible fade show" role="alert" style="margin-bottom:0;">
|
||||
<div class="row justify-content-end">
|
||||
<div class="col-12 justify-content-center">
|
||||
<p class="text-center">{{ motd }}</p>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user