Merge branch 'MOTD'

This commit is contained in:
Audrey Jensen 2023-07-25 21:35:30 +00:00
commit 754fc06aa7
4 changed files with 17 additions and 2 deletions

View File

@ -1,5 +1,8 @@
APP_ENV=prod APP_ENV=prod
APP_SECRET=ba16d9b24f329be32408d0a9dc24a534 #Nothing. We're an open book and have no secrets 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.
MOTD=""
#Ticket Database file URIs. #Ticket Database file URIs.
RP_DATABASE_URL=sqlite:///%kernel.project_dir%/RPCopy/CRParchive.db RP_DATABASE_URL=sqlite:///%kernel.project_dir%/RPCopy/CRParchive.db
SP_DATABASE_URL=sqlite:///%kernel.project_dir%/RPCopy/CSParchive.db SP_DATABASE_URL=sqlite:///%kernel.project_dir%/RPCopy/CSParchive.db

View File

@ -1,6 +1,9 @@
twig: twig:
default_path: '%kernel.project_dir%/templates' default_path: '%kernel.project_dir%/templates'
globals:
motd: '%env(MOTD)%'
when@test: when@test:
twig: twig:
strict_variables: true strict_variables: true

View File

@ -17,6 +17,5 @@
<div class="d-flex flex-row flex-fill justify-content-between" style="background: url({{asset('images/header-left.png')}}) left center no-repeat, url({{asset('images/header-right.png')}}) 72px center no-repeat; background-size: 72px 100%, 100% 100%; "></div> <div class="d-flex flex-row flex-fill justify-content-between" style="background: url({{asset('images/header-left.png')}}) left center no-repeat, url({{asset('images/header-right.png')}}) 72px center no-repeat; background-size: 72px 100%, 100% 100%; "></div>
</div> </div>
</div> </div>
</header> </header>

View File

@ -37,4 +37,14 @@
</a> </a>
</h3> </h3>
</ul> </ul>
</div> </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">
<div class="row justify-content-end">
<div class="col-xs-12 col-lg-10 justify-content-end">
{{ motd }}
</div>
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
</div></div>
{% endif %}