From df017dfb5e2799e4b64e0a0c193e5a6c68477b33 Mon Sep 17 00:00:00 2001
From: hahn <axel.hahn@iml.unibe.ch>
Date: Fri, 5 Aug 2022 12:29:29 +0200
Subject: [PATCH] add banner on all pages

---
 config/config_custom.php.dist    | 2 ++
 config/config_defaults.php       | 1 +
 public_html/deployment/index.php | 5 +++--
 3 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/config/config_custom.php.dist b/config/config_custom.php.dist
index 7b67a202..a2210624 100644
--- a/config/config_custom.php.dist
+++ b/config/config_custom.php.dist
@@ -25,6 +25,8 @@ return [
         ]
     ],
 
+    'banner' => '',
+
     // ----------------------------------------------------------------------    
 
     'phases' => [
diff --git a/config/config_defaults.php b/config/config_defaults.php
index cde5fc3f..0cb6c90e 100644
--- a/config/config_defaults.php
+++ b/config/config_defaults.php
@@ -63,6 +63,7 @@ return [
         'ip'=> ['127.0.0.1'],
     ],
     'projectgroups' => [],
+    'banner' => '',
     
     // ----------------------------------------------------------------------
     // build settings
diff --git a/public_html/deployment/index.php b/public_html/deployment/index.php
index 82384c6b..fb620a36 100644
--- a/public_html/deployment/index.php
+++ b/public_html/deployment/index.php
@@ -69,6 +69,7 @@ foreach ($aConfig["phases"] as $sPhase => $aData) {
 }
 $sHeader.='</style>';
 $sTopArea=getTopArea();
+$sBanner=isset($aConfig['banner']) && $aConfig['banner'] ? '<div class="alert alert-info">'.$aConfig['banner'].'</div>' : '';
 $sTopAction=getAction();
 
 // ------ action 
@@ -112,9 +113,9 @@ $oCLog->add("Finally: rendering page ...");
 
 $sPhpOut = '
     <br>
-    ' . $sTopArea . '
+    ' . $sTopArea  .'
     <div id="content">
-        ' . $sTopAction . '
+        ' . $sBanner . $sTopAction . '
         ' . $sPhpOut . '
     </div>
     <div id="footer">
-- 
GitLab