From 9cde3c4c5e0d1ce1e617241bb806124ce50d83de Mon Sep 17 00:00:00 2001
From: "Hahn Axel (hahn)" <axel.hahn@unibe.ch>
Date: Fri, 17 Nov 2023 17:33:26 +0100
Subject: [PATCH] top menus; several stylings

---
 config/lang/en-en.json                        |   2 +-
 .../deployment/classes/actionlog.class.php    |   4 +-
 .../deployment/classes/formgen.class.php      |   6 +-
 .../deployment/classes/project.class.php      |   3 +
 .../deployment/classes/project_gui.class.php  |  13 +-
 .../classes/render-adminlte.class.php         | 114 +++++++++++-----
 public_html/deployment/inc_functions.php      | 126 +++++++-----------
 public_html/deployment/index.php              |   5 +-
 public_html/deployment/main.css               |  15 +--
 public_html/deployment/main_new_ui.css        |  26 ++++
 public_html/deployment/pages/act_overview.php |  31 +++--
 public_html/deployment/pages/act_setup.php    |   2 +-
 public_html/deployment/ui/page.tpl.php        |   2 +-
 .../deployment/ui/page_replacements.php       |   3 +-
 14 files changed, 207 insertions(+), 145 deletions(-)

diff --git a/config/lang/en-en.json b/config/lang/en-en.json
index d7dbdb91..0f301b35 100644
--- a/config/lang/en-en.json
+++ b/config/lang/en-en.json
@@ -1,7 +1,7 @@
 {
     "menu": "Menu",
     "menu-brand": "IML Deployment GUI",
-    "menu-overview": "back to overview",
+    "menu-overview": "Overview",
     "menu-projects": "Projects",
     "menu-checklang": "Compare language texts",
     "menu-settings": "Settings",
diff --git a/public_html/deployment/classes/actionlog.class.php b/public_html/deployment/classes/actionlog.class.php
index 0f07dffe..2a331895 100644
--- a/public_html/deployment/classes/actionlog.class.php
+++ b/public_html/deployment/classes/actionlog.class.php
@@ -350,8 +350,8 @@ class Actionlog {
         } else {
 
             $sReturn= '<strong>'
-                . '<button onclick="setLogVisibility(\'block\');"  id="btnShowLogs" class="btn btn-default btnLogs"><b class="glyphicon glyphicon-chevron-right"></b> </button>'
-                . '<button onclick="setLogVisibility(\'none\');"   id="btnHideLogs" class="btn btn-default btnLogs"><b class="glyphicon glyphicon-chevron-down"></b> </button>'
+                . '<button onclick="setLogVisibility(\'block\');"  id="btnShowLogs" class="btn btn-secondary btnLogs"><i class="fa-solid fa-chevron-right"></i> </button>'
+                . '<button onclick="setLogVisibility(\'none\');"   id="btnHideLogs" class="btn btn-secondary btnLogs"><i class="fa-solid fa-chevron-down"></i> </button>'
                 . ' ' . t("class-actionlog-title") 
                 . '</strong>'
                 
diff --git a/public_html/deployment/classes/formgen.class.php b/public_html/deployment/classes/formgen.class.php
index 94238b35..a4e725b8 100644
--- a/public_html/deployment/classes/formgen.class.php
+++ b/public_html/deployment/classes/formgen.class.php
@@ -316,7 +316,11 @@ class formgen {
         if (isset($elementData["mode"]) && $elementData["mode"] == 'table' && $sHtmlTable) {
             $sHtmlDefault = $sHtmlTable;
         } else {
-            if ($elementData["type"] != "button" && $elementData["type"] != "fieldset" && $elementData["type"] != "markup") {
+            if ($elementData["type"] != "button" 
+                && $elementData["type"] != "fieldset" 
+                && $elementData["type"] != "markup"
+                && $elementData["type"] != "hidden"
+            ) {
                 if (!isset($elementData["inline"]) || !$elementData["inline"]){
                     // $sHtmlDefault = "<fieldset>" . $sHtmlDefault . "</fieldset>\n";
                     $sHtmlDefault = '<div class="form-group row">' . $sHtmlDefault . '</div>'."\n";
diff --git a/public_html/deployment/classes/project.class.php b/public_html/deployment/classes/project.class.php
index 818cb762..9d6ea14c 100644
--- a/public_html/deployment/classes/project.class.php
+++ b/public_html/deployment/classes/project.class.php
@@ -13,6 +13,8 @@ require_once 'messenger.class.php';
 require_once 'build_base.class.php';
 require_once 'rollout_base.class.php';
 
+require_once 'htmlguielements.class.php';
+
 /* ######################################################################
 
   IML DEPLOYMENT
@@ -1237,6 +1239,7 @@ class project extends base {
                 );
             }
         }
+        $this->log(__FUNCTION__ . " result:<pre>".print_r($this->_aData, 1)."</pre>");
         return $this->_aData["phases"]["source"];
     }
 
diff --git a/public_html/deployment/classes/project_gui.class.php b/public_html/deployment/classes/project_gui.class.php
index d5a8ab91..fa90b2e8 100644
--- a/public_html/deployment/classes/project_gui.class.php
+++ b/public_html/deployment/classes/project_gui.class.php
@@ -21,6 +21,15 @@ require_once 'htmlguielements.class.php';
 // class project {
 class projectgui extends project {
 
+    /**
+     * constructor
+     * @param string $sId  id of the project
+    public function __construct($sId = false) {
+        parent::__construct($sId);
+        $this->_oHtml = new htmlguielements();
+    }
+    */
+
     // ----------------------------------------------------------------------
     // private functions
     // ----------------------------------------------------------------------
@@ -911,6 +920,7 @@ class projectgui extends project {
                             </ul>
                             <div class="tab-content">
                             <div class="tab-pane fade active show" id="tab1">
+                            <br>
                             
                             ',
                     ),
@@ -1609,7 +1619,7 @@ class projectgui extends project {
 
         $aBranches=$this->getRemoteBranches();
         if(!is_array($aBranches)){
-            return t("project-setup-incomplete");
+            return $this->_oHtml->getBox("error", t("project-setup-incomplete"));
         }
 
         $sRepoBar = '';
@@ -1704,6 +1714,7 @@ class projectgui extends project {
                     ' . ($sPhaseImg ? $sPhaseImg : '<div class="process">' . t("none") . '</div>') . '
                 </div>
             </div>
+            <div style="clear:both"></div>
             ';
         
         return $sReturn;
diff --git a/public_html/deployment/classes/render-adminlte.class.php b/public_html/deployment/classes/render-adminlte.class.php
index d4d2bf70..7ee43120 100755
--- a/public_html/deployment/classes/render-adminlte.class.php
+++ b/public_html/deployment/classes/render-adminlte.class.php
@@ -9,7 +9,8 @@ require_once 'htmlelements.class.php';
  * 
  * ----------------------------------------------------------------------
  * 2023-09-11  <axel.hahn@unibe.ch>  add shadows on card + callout
- * 2023-09-27  <axel.hahn@unibe.ch>  add form elements
+ * 2023-09-27  <axel.hahn@unibe.ch>  add form input fields
+ * 2023-11-17  <axel.hahn@unibe.ch>  add tabbed content; "=" renders hamburger item
  * ======================================================================
  *
  * @author Axel
@@ -56,10 +57,6 @@ class renderadminlte {
                 'warning'=>'yellow',
                 'dark'=>'dark gray',
                 'gray'=>'gray', 
-
-                'default'=>'default', 
-                'light'=>'light', 
-                'dark'=>'dark', 
             ]
         ],
         'shadow'=>[
@@ -359,7 +356,7 @@ class renderadminlte {
                     'icon'=>[
                         'group'=>'content', 
                         'description'=>'css class for an icon', 
-                        'example_value'=>'far fa-thumbs-up'
+                        'example_value'=>'fa-regular fa-thumbs-up'
                     ],
                     'text'=>[
                         'group'=>'content', 
@@ -397,7 +394,7 @@ class renderadminlte {
                         'description'=>'optional: css classes', 
                         'example_value'=>''
                     ],
-                    'icon'=>['group'=>'content', 'description'=>'css class for an icon', 'example_value'=>'fas fa-shopping-cart'],
+                    'icon'=>['group'=>'content', 'description'=>'css class for an icon', 'example_value'=>'fa-solid fa-shopping-cart'],
         
                     'text'=>['group'=>'content', 'description'=>'short information text', 'example_value'=>'New orders'],
                     'number'=>['group'=>'content', 'description'=>'a number to highlight', 'example_value'=>"150"],
@@ -409,13 +406,13 @@ class renderadminlte {
             'input'=>[
                 'label'=>'Form: input',
                 'description'=>'Input form fiels',
-                'method'=>'getInput',
+                'method'=>'getFormInput',
         
                 'params'=>[
                     'label'       => [
                         'group'=>'styling', 
                         'description'=>'label for the input field', 
-                        'example_value'=>'Enter your firstname'
+                        'example_value'=>'Enter something'
                     ],
                     'type'=>['select'=> [
                             'description'=>'type or input field',
@@ -460,12 +457,12 @@ class renderadminlte {
                     'prepend'       => [
                         'group'=>'styling', 
                         'description'=>'optional: content on input start', 
-                        'example_value'=>'+'
+                        'example_value'=>''
                     ],
                     'append'       => [
                         'group'=>'styling', 
                         'description'=>'optional: content on input end', 
-                        'example_value'=>':-)'
+                        'example_value'=>''
                     ],
                     'name'       => [
                         'group'=>'content', 
@@ -479,6 +476,44 @@ class renderadminlte {
                     ],
                 ]
             ],
+            // ------------------------------------------------------------
+            'textarea'=>[
+                'label'=>'Form: textarea',
+                'description'=>'textarea or html editor',
+                'method'=>'getFormTextarea',
+        
+                'params'=>[
+                    'label'       => [
+                        'group'=>'styling', 
+                        'description'=>'label for the input field', 
+                        'example_value'=>'Enter text'
+                    ],
+                    'type'=>['select'=> [
+                            'description'=>'type or input field',
+                            'group'=>'styling',
+                            'values'=>[
+                                ''=>'text',
+                                'html'=>'html editor',
+                                ]
+                            ], 
+                    ],
+                    'class'       => [
+                        'group'=>'styling', 
+                        'description'=>'optional: css classes', 
+                        'example_value'=>'myclass'
+                    ],
+                    'name'       => [
+                        'group'=>'content', 
+                        'description'=>'name attribute', 
+                        'example_value'=>'textdata'
+                    ],
+                    'value' => [
+                        'group'=>'content', 
+                        'description'=>'Value', 
+                        'example_value'=>'Here is some text...'
+                    ],
+                ]
+            ],            
         ];
     }
     /**
@@ -549,6 +584,10 @@ class renderadminlte {
         if($aLink['label']=='-'){
             return '<div class="dropdown-divider"></div>';
         }
+        // special menu entry: hamburger menu item (label is "=")
+        if($aLink['label']=='='){
+            return '<li class="nav-item"><a class="nav-link" data-widget="pushmenu" href="#" role="button"><i class="fas fa-bars"></i></a></li>';
+        }
 
         $aChildren=isset($aLink['children']) && is_array($aLink['children']) && count($aLink['children']) ? $aLink['children'] : false;
 
@@ -632,7 +671,7 @@ class renderadminlte {
      * @return string
      */
     public function getTopNavigation($aNavItems, $aUlOptions=['class'=>'navbar-nav']){
-        array_unshift($aNavItems, ['class'=>'nav-link', 'data-widget'=>'pushmenu', 'href'=>'#', 'role'=>'button', 'label'=>'<i class="fas fa-bars"></i>']);
+        // array_unshift($aNavItems, ['class'=>'nav-link', 'data-widget'=>'pushmenu', 'href'=>'#', 'role'=>'button', 'label'=>'<i class="fa-solid fa-bars"></i>']);
         return $this->addWrapper('ul', $aUlOptions, $this->getNavItems($aNavItems));
     }
 
@@ -657,7 +696,7 @@ class renderadminlte {
             $sSubmenu='';
             if($aChildren){
                 unset($aLink['children']);                
-                $aLink['label'].='<i class="right fas fa-angle-left"></i>';
+                $aLink['label'].='<i class="right fa-solid fa-angle-left"></i>';
                 $sSubmenu.=$this->getSidebarNavigation($aChildren, ['class'=>'nav nav-treeview']);
             }
             $aLink['label']=$this->addWrapper('p', [], $aLink['label']);
@@ -871,10 +910,10 @@ class renderadminlte {
     public function getAlert($aOptions){
         $aOptions=$this->_ensureOptions('alert', $aOptions);
         $aAlertIcons=[
-            'danger'=>'icon fas fa-ban',
-            'info'=>'icon fas fa-info',
-            'warning'=>'icon fas fa-exclamation-triangle',
-            'success'=>'icon fas fa-check',
+            'danger'=>'icon fa-solid fa-ban',
+            'info'=>'icon fa-solid fa-info',
+            'warning'=>'icon fa-solid fa-exclamation-triangle',
+            'success'=>'icon fa-solid fa-check',
         ];
 
         $aElement=[
@@ -1035,13 +1074,13 @@ class renderadminlte {
             'maximized'=>[ 'class'=>'maximized-card', 'tool'=>'tb-minimize'],
         ];
         $aTools=[
-            'tb-collapse'=>'<button type="button" class="btn btn-tool" data-card-widget="collapse"><i class="fas fa-minus"></i></button>',
-            'tb-expand'=>'<button type="button" class="btn btn-tool" data-card-widget="collapse"><i class="fas fa-plus"></i></button>',
+            'tb-collapse'=>'<button type="button" class="btn btn-tool" data-card-widget="collapse"><i class="fa-solid fa-minus"></i></button>',
+            'tb-expand'=>'<button type="button" class="btn btn-tool" data-card-widget="collapse"><i class="fa-solid fa-plus"></i></button>',
 
-            'tb-maximize'=>'<button type="button" class="btn btn-tool" data-card-widget="maximize"><i class="fas fa-expand"></i></button>',
-            'tb-minimize'=>'<button type="button" class="btn btn-tool" data-card-widget="maximize"><i class="fas fa-compress"></i></button>',
+            'tb-maximize'=>'<button type="button" class="btn btn-tool" data-card-widget="maximize"><i class="fa-solid fa-expand"></i></button>',
+            'tb-minimize'=>'<button type="button" class="btn btn-tool" data-card-widget="maximize"><i class="fa-solid fa-compress"></i></button>',
 
-            'tb-remove'=>'<button type="button" class="btn btn-tool" data-card-widget="remove"><i class="fas fa-times"></i></button>',
+            'tb-remove'=>'<button type="button" class="btn btn-tool" data-card-widget="remove"><i class="fa-solid fa-times"></i></button>',
         ];
 
         // print_r($aOptions);
@@ -1068,7 +1107,7 @@ class renderadminlte {
         }
         // build parts of the card
         $sCardHeader=$this->addWrapper('div', ['class'=>'card-header'],
-            $this->_tag('div', ['class'=>'card-title', 'label'=>$aOptions['title']])
+            $this->_tag('h3', ['class'=>'card-title', 'label'=>$aOptions['title']])
             . ($aOptions['tools'] ? $this->_tag('div', ['class'=>'card-tools', 'label'=>$aOptions['tools']]) : '')
         );
 
@@ -1182,7 +1221,7 @@ class renderadminlte {
                 ''
                 . ($aOptions['linktext'] ? $aOptions['linktext'] : $aOptions['url'])
                 . ' '
-                . $this->_tag('i',['class'=>'fas fa-arrow-circle-right'])
+                . $this->_tag('i',['class'=>'fa-solid fa-arrow-circle-right'])
             )
             : ''
         );
@@ -1191,13 +1230,13 @@ class renderadminlte {
         return $this->_tag('div', ['class'=>$sClass], $sContent.$sIcon.$sFooter);
     }
 
-
     // ----------------------------------------------------------------------
     // 
     // PUBLIC FUNCTIONS :: CONTENT - FORM
     // 
     // ----------------------------------------------------------------------
 
+
     public function getHorizontalFormElement($sInput, $sLabel=false, $sId=false){
         return '<div class="form-group row">'
                 . '<label for="' . $sId . '" class="col-sm-2 col-form-label">' . $sLabel . '</label>'
@@ -1256,18 +1295,30 @@ class renderadminlte {
             }
         }
 
-        return $aOptions['type']!='hidden' 
-            ? $this->getHorizontalFormElement(
+        // return data
+
+        switch($aElement['type']){
+            case 'checkbox':
+            case 'radio':
+                $aElement['class']=str_replace('form-control ', 'form-check-input', $aElement['class']);
+                return $this->_tag('div' , ['class'=>'form-check'],
+                    $this->_tag('input', $aElement, '', false).$this->_tag('label', ['for'=>$sFormid, 'label'=>$sLabel ], '')
+                );
+                break;
+            case 'hidden':
+                return $this->_tag('input', $aElement, '', false);
+                break;
+            default: return $this->getHorizontalFormElement(
                 $sPrepend.$this->_tag('input', $aElement, '', false).$sAppend, 
                 $sLabel, 
                 $sFormid
-            )
-            : $this->_tag('input', $aElement, '', false);
+            );
+        }
     }
 
     /**
-     * return a textarea field .. or html editor using summernote
-     * @param array $aOptions  hash with keys for all options
+     * return a textare field .. or html editor using summernote
+     * @param type $aOptions  hash with keys for all options
      *                        styling:
      *                          - type    - field type: [none]|html
      *                        content
@@ -1314,7 +1365,6 @@ class renderadminlte {
      * return a box with tabbed content
      * @param array $aOptions  hash with keys for all options
      *                           - tabs {array} key=tab label; value=content
-     * @param array $aOptions  hash with keys for all options
      * @retunr string|array
      */
     public function getTabbedContent($aOptions, $asArray=false){
diff --git a/public_html/deployment/inc_functions.php b/public_html/deployment/inc_functions.php
index 55785c6e..987ddef0 100644
--- a/public_html/deployment/inc_functions.php
+++ b/public_html/deployment/inc_functions.php
@@ -157,7 +157,7 @@ function aPrjHome($sClass = "btn btn-default") {
     $oPrj = new project($aParams["prj"]);
     return $oHtml->getLinkButton(array(
         'href'=>'/deployment/' . $aParams["prj"] . '/',
-        'icon'=>'project-home',
+        'icon'=>'project',
         'label'=>$oPrj->getLabel(),
     ));
 }
@@ -191,6 +191,10 @@ function aGotop($sClass = "scroll-link btn btn-default") {
     ));
 }
 
+/**
+ * get array top left navigation
+ * @return array
+ */
 function getTopNavLeft($aEmbed=[]) {
     global $aParams, $oHtml;
     $aReturn = [];
@@ -211,93 +215,59 @@ function getTopNavLeft($aEmbed=[]) {
         $aPrjItems=[];
         foreach ($oPrj1->getProjects() as $sPrj) {
             $oPrj = new project($sPrj);
-            $aPrjItems[]=['href'=>$sBaseUrl . $sPrj .'/', 'label'=>$oPrj->getLabel(), 'class'=>$sCurrentProject===$oPrj->getId() ? 'active' : ''];
+            $aPrjItems[]=[
+                'href'=>$sBaseUrl . $sPrj .'/', 
+                'label'=>$oPrj->getLabel(), 
+                'class'=>$sCurrentProject===$oPrj->getId() ? 'active' : '', 
+                'icon'=>'fa-solid fa-book',
+            ];
         }
 
         $aReturn=[
-                [
+            // ['label'=>'=' ],
+            ['href'=>$sBaseUrl . '', 'label'=>'&nbsp;CI server <small>v2</small>',    'icon'=>'', 'class'=>'imllogo topbrand' ],
+            [
                     'href'=>$sBaseUrl, 'label'=>t("menu"), 'class'=>(array_key_exists("prj", $aParams) && $aParams['prj']==='all' ? 'active' : ''),
+                    'icon'=>'fa-solid fa-chevron-right',
                     'children'=>[
-                        ['href'=>$sBaseUrl . 'all/setup/new/',       'label'=>t("menu-new-project") ],
-                        ['href'=>$sBaseUrl . 'all/setup/actionlog/', 'label'=>t("menu-logs")        ],
-                        ['href'=>$sBaseUrl . 'all/setup/checklang/', 'label'=>t("menu-checklang")   ],
-                        ['href'=>$sBaseUrl . 'all/setup/',           'label'=>t("menu-settings")    ],
+                        ['href'=>$sBaseUrl . 'all/setup/new/',       'label'=>t("menu-new-project"), 'icon'=>'fa-regular fa-star' ],
+                        ['href'=>$sBaseUrl . 'all/setup/actionlog/', 'label'=>t("menu-logs"),        'icon'=>'fa-regular fa-rectangle-list'],
+                        ['href'=>$sBaseUrl . 'all/setup/checklang/', 'label'=>t("menu-checklang"),   'icon'=>'fa-regular fa-comment'],
+                        ['href'=>$sBaseUrl . 'all/setup/',           'label'=>t("menu-settings"),    'icon'=>'fa-solid fa-gear'],
                     ]
                 ],
                 [
-                    'href'=>'#','label'=>t("menu-projects"),
+                    'href'=>'#','label'=>t("menu-projects"), 'icon'=>'fa-solid fa-box-open', 
                     'children'=>$aPrjItems
                 ]
                 ]
                 ;
-                /*
-
-                if (array_key_exists("prj", $aParams) && $aParams["prj"] <> "all") {
-                    $oPrj = new project($aParams["prj"]);
-                    $sReturn.='
-                    <li class="dropdown active">'
-                        .$oHtml->getLink(array(
-                            'href'=>'#',
-                            'class'=>'dropdown-toggle',
-                            'data-toggle'=>'dropdown',
-                            'role'=>'button',
-                            'aria-expanded'=>'false',
-                            'icon'=>'project',
-                            'label'=>$oPrj->getLabel() .' <span class="caret"></span>',
-                        ))
-                        .'
-                        <ul class="dropdown-menu" role="menu">
-                            <li'.($sCurrentAction===false ? $sLiActive :'') .'>'
-                            . $oHtml->getLink(array(
-                                'href'=>$sBaseUrl . $aParams["prj"] .'/',
-                                'icon'=>'project-home',
-                                'label'=>t("project-home"),
-                            ))
-                            .'</li>
-                        ';
-                        $aPhases = $oPrj->getActivePhases();
-                        if (count($aPhases)) {
-                            $sReturn.='<li role="separator" class="divider"></li>
-                                    <li'.($sCurrentAction==='build' ? $sLiActive :'') .'>'
-                                    .$oHtml->getLink(array(
-                                        'href'=>$sBaseUrl . $aParams["prj"] . '/build/',
-                                        'icon'=>'build',
-                                        'label'=>t("build"),
-                                    ))
-                                    .'</li> 
-                                    <li role="separator" class="divider"></li>
-                                    <li class="dropdown-header">'.t("menu-project-phases").'</li>';
-                            foreach ($aPhases as $sPhase) {
-                                $sReturn.='<li'.(isset($aParams['par3']) && $aParams['par3']===$sPhase ? $sLiActive :'') .'>'
-                                        . '<a href="' . $sBaseUrl . $aParams["prj"] . '/phase/' . $sPhase . '/">' . $oHtml->getIcon('phase').$sPhase . '</a></li>';
-                            }
-                        }
-                        $sReturn.='
-                            <li role="separator" class="divider"></li>
-                            <li'.($sCurrentAction==='setup' ? $sLiActive :'') .'>'
-                            .$oHtml->getLink(array(
-                                'href'=>$sBaseUrl . $aParams["prj"] . '/setup/',
-                                'icon'=>'setup',
-                                'label'=>t("menu-project-settings"),
-                            ))
-                            .'</li> 
-                            <li'.($sCurrentAction==='cleanup' ? $sLiActive :'') .'>'
-                            .$oHtml->getLink(array(
-                                'href'=>$sBaseUrl . $aParams["prj"] . '/cleanup/',
-                                'icon'=>'cleanup',
-                                'label'=>t("menu-project-cleanup"),
-                            ))
-                            .'</li> 
-                            <li'.($sCurrentAction==='delete' ? $sLiActive :'') .'>'
-                            .$oHtml->getLink(array(
-                                'href'=>$sBaseUrl . $aParams["prj"] . '/delete/',
-                                'icon'=>'delete',
-                                'label'=>t("menu-project-delete"),
-                            ))
-                            .'</li> 
-                        </ul></li>';
+        if ($sCurrentProject){
+            $oPrj = new project($aParams["prj"]);
+            $aPrjChildren=[
+                ['href'=>$sBaseUrl . $sCurrentProject . '/', 'label'=>$oHtml->getIcon('project-home').t("project-home"), 'icon'=>'', 'class'=>($sCurrentAction=='' ? 'active' :'')],
+                ['label'=>'-'],
+            ];
+            $aPhases = $oPrj->getActivePhases();
+            if (count($aPhases)) {
+                $aPrjChildren[]=['href'=>$sBaseUrl . $sCurrentProject . '/build/', 'label'=>$oHtml->getIcon('build').t("build"), 'icon'=>'', 'class'=>($sCurrentAction==='build' ? 'active' :'')];
+                $aPrjChildren[]=['label'=>'-'];
+
+                foreach ($aPhases as $sPhase) {
+                    $aPrjChildren[]=['href'=>$sBaseUrl . $sCurrentProject . '/phase/' . $sPhase . '/', 'label'=>$oHtml->getIcon('phase').$sPhase, 'icon'=>'', 'class'=>(isset($aParams['par3']) && $aParams['par3']===$sPhase ? 'active' :'')];
                 }
-        */
+                $aPrjChildren[]=['label'=>'-'];
+            }
+            $aPrjChildren[]=['href'=>$sBaseUrl . $sCurrentProject . '/setup/',   'label'=>$oHtml->getIcon('setup').t("menu-project-settings"), 'icon'=>'',  'class'=>($sCurrentAction==='setup'   ? 'active' :'')];
+            $aPrjChildren[]=['href'=>$sBaseUrl . $sCurrentProject . '/cleanup/', 'label'=>$oHtml->getIcon('cleanup').t("menu-project-cleanup"), 'icon'=>'', 'class'=>($sCurrentAction==='cleanup' ? 'active' :'')];
+            $aPrjChildren[]=['href'=>$sBaseUrl . $sCurrentProject . '/delete/',  'label'=>$oHtml->getIcon('delete').t("menu-project-delete"), 'icon'=>'',   'class'=>($sCurrentAction==='delete'  ? 'active' :'')];
+
+            $aReturn[]=[
+                'href'=>'#','label'=>$oPrj->getLabel(), 'icon'=>'fa-solid fa-book', 'class'=>'active',
+                'children'=>$aPrjChildren
+            ];
+        }
+
     }    
     // echo '<pre>'.print_r($aReturn, 1); die(__FUNCTION__);
     return $aReturn;
@@ -580,13 +550,13 @@ function getTopArea($aEmbed=[]) {
  * @global type $aParams
  * @return string
  */
-function getAction() {
+function getBreadcrumb() {
     global $aParams, $oHtml;
     $sReturn = '';
     $sNav = '';
     $sLabel = '';
     // $sDelim=$oHtml->getIcon('fa-chevron-right');
-    $sDelim=' / ';
+    $sDelim='&nbsp;&nbsp;&nbsp;<i class="fa-solid fa-chevron-right"></i>&nbsp;&nbsp;&nbsp;';
     if (array_key_exists("action", $aParams)) {
         $sLabel .= $oHtml->getIcon($aParams["action"]).t($aParams["action"]);
         $sNav .= aHome();
@@ -604,7 +574,7 @@ function getAction() {
     } else if (array_key_exists("prj", $aParams)) {
         $sNav .= aHome();
         $sClass='action prjhome';
-        $sLabel.=$oHtml->getIcon('project-home').t('project-home');
+        $sLabel.=$oHtml->getIcon('project').t('project-home');
         // $sReturn.='<h2 class="action prjhome"> Projekt-Home</h2>';
     }
     $sReturn.=($sNav ? '<div id="navtop">' . $sNav .  ' ' . $sDelim . ' <span class="current">'.$sLabel.'</span></div>':'')
diff --git a/public_html/deployment/index.php b/public_html/deployment/index.php
index 65a2fb14..e39ddbd6 100644
--- a/public_html/deployment/index.php
+++ b/public_html/deployment/index.php
@@ -112,7 +112,6 @@ $aReplace=include("./ui/page_replacements.php");
     
     $sTopArea=getTopArea(['right'=>$sTopRight]);
     $sBanner=isset($aConfig['banner']) && $aConfig['banner'] ? '<div class="alert alert-info">'.$aConfig['banner'].'</div>' : '';
-    $sTopAction=getAction();
 
     if(isset($aParams["prj"])){
         $oPrj = new project($aParams["prj"]);
@@ -174,8 +173,8 @@ $aReplace=include("./ui/page_replacements.php");
         // . $sTopArea  
         . $sShellOuptut
         .'
-            ' . $sBanner . $sTopAction . '
-            <div id="content">
+            ' . $sBanner . getBreadcrumb() . '
+        <div id="content">
             ' . $BODY . '
         </div>
 
diff --git a/public_html/deployment/main.css b/public_html/deployment/main.css
index 12c2a7f4..52d6bc3f 100644
--- a/public_html/deployment/main.css
+++ b/public_html/deployment/main.css
@@ -57,12 +57,12 @@ body{padding-top: 0;
     */
 }
 
-div#navtop, div#navbuttom{background: #e0e4e8; padding: 0.5em;}
-div#navtop{margin-bottom: 2em;}
+div#navtop, div#navbuttom{background: rgba(0,50,100,0.1); padding: 0.2em;}
+div#navtop{margin-bottom: 1em;}
 div#navtop .current{font-size: 170%; color: #667; padding: 0 0.2em; position: absolute;}
 div#navbuttom{
-    margin-top: 4em; 
-    border-top: 2px solid #ddd;
+    margin-top: 2em; 
+    border-top: 0px solid #ddd;
 }
 
 #divmodal{
@@ -321,13 +321,12 @@ input[type="radio"]:checked+label, input[type="checkbox"]:checked+label{
 /* ----- visualized process ----- */
 .visualprocess{float: left; padding: 1em; box-shadow: 0 0 0em #ddd;}
 .visualprocess .process{float:left; text-align: center; padding: 0 0 5px; }
-.visualprocess .process.box{border: 80 dashed #ddd; 80ding: 1em; min-80m;} ng: 1em; min-25em;} 
+.visualprocess .process.box{border: 80 dashed #ddd; } 
 
-.visualprocess .process.box{border: 80 dashed #ddd; 80ding: 1em; min-80m;} ng: 1em; min-25em;} 
 .visualprocess .process img{}
 .visualprocess .process img{}
-.visualprocess .action{float:left;padding: 3em 1em 1em 1em; background: #fff;}
-.visualprocess .process .title{margin-bottom: 2em; font-weight: bold; font-size: 150%; color:#aaa;}
+.visualprocess .action{float:left;padding: 0em 1em 1em 1em; background: #fff;}
+.visualprocess .process .title{margin-bottom: 1em; font-weight: bold; font-size: 150%; color:#aaa;}
 .visualprocess .process .details{background: #fff; min-height: 6em;}
 
 /* ----- replacemets with templates ----- */
diff --git a/public_html/deployment/main_new_ui.css b/public_html/deployment/main_new_ui.css
index 73da8a21..4e6499f5 100644
--- a/public_html/deployment/main_new_ui.css
+++ b/public_html/deployment/main_new_ui.css
@@ -6,4 +6,30 @@ pre.config{background:#f4f4f4; color:#448; border-radius: 0.5em; max-height: aut
 	color: #f8f8f8;
 	background-color: #456;
 	border-color: #dee2e6 #dee2e6 #fff;
+}
+
+a.topbrand{font-size: 150%; margin-top: -0.2em; margin-right: 1em;}
+
+.dropdown-menu {
+    /*
+	position: absolute;
+	top: 100%;
+	left: 0;
+	z-index: 1000;
+	display: none;
+	float: left;
+	min-width: 10rem;
+	padding: .5rem 0;
+	margin: .125rem 0 0;
+	font-size: 1rem;
+	color: #212529;
+	text-align: left;
+	list-style: none;
+	background-color: #fff;
+	background-clip: padding-box;
+	border: 1px solid rgba(0,0,0,.15);
+	border-radius: .25rem;
+	box-shadow: 0 .5rem 1rem rgba(0,0,0,.175);
+    */
+    min-width: 15rem;
 }
\ No newline at end of file
diff --git a/public_html/deployment/pages/act_overview.php b/public_html/deployment/pages/act_overview.php
index a8103eff..13481bbb 100644
--- a/public_html/deployment/pages/act_overview.php
+++ b/public_html/deployment/pages/act_overview.php
@@ -60,41 +60,41 @@ if (!array_key_exists("prj", $aParams)) {
         $sBuildErrorContent=$oHtml->getBox('info', t('build-failes-none'));
     }
 
-    $sListOfBranches='<h4>'.t('branch-select').'</h4><ol>';
+    $sListOfBranches='';
     foreach($oPrj->getRemoteBranches() as $aBranch){
         $sListOfBranches.='<li title="'.$aBranch['revision'].'">'.$aBranch['label'] . '</li>';
         $iCountOfBranches++;
     }
-    $sListOfBranches.='</ol>';
+    if($sListOfBranches){
+        $sListOfBranches='<h4>'.t('branch-select').'</h4><ol>'.$sListOfBranches.'</ol>';
+    }
 
     $aTabdata=
 
     $sOut = '
-                
+
             ' . $oPrj->renderLink("setup") . '<br>
                 <br>
-                <div style="min-height: 32em;">
             '.$renderAdminLTE->getTabbedContent([
                 'tabs'=>[
                     $oHtml->getIcon('workflow') . t("way-of-packages") 
-                        => '<h3 id="h3visual">' . $oHtml->getIcon('workflow') . t("way-of-packages") . '</h3>
-                            ' . $oPrj->renderVisual() . ''
+                        => $oPrj->renderVisual() . ''
                     ,
-                    $oHtml->getIcon('repository') . t("repositoryinfos") . ($iCountOfBranches ? ' <span class="badge badge-light">'.$iCountOfBranches.'</span>' : '' )
-                        => ($oPrj->canAcceptPhase() ? '<br>'.$oPrj->renderLink("build") : '') 
+                    $oHtml->getIcon('repository') . t("repositoryinfos") . ($iCountOfBranches ? ' <span class="badge badge-secondary">'.$iCountOfBranches.'</span>' : '' )
+                        => '<br>'
+                            .($oPrj->canAcceptPhase() ? $oPrj->renderLink("build").'<br><br>' : '') 
                             // . $oPrj->renderRepoInfo()
                             // . $oPrj->renderSelectRemoteBranches()
                             . $sListOfBranches
                     ,
-                    $oHtml->getIcon('sign-error') . t("build-failes") . ($iCountOfBuildErrors ? ' <span class="badge badge-light">'.$iCountOfBuildErrors.'</span>' : '' )
-                        => '<h3 id="h3versions">' . $oHtml->getIcon('sign-error') . t("build-failes") . '</h3>
-                            '.$sBuildErrorContent
+                    $oHtml->getIcon('sign-error') . t("build-failes") . ($iCountOfBuildErrors ? ' <span class="badge badge-danger">'.$iCountOfBuildErrors.'</span>' : '' )
+                        => '<br>'.$sBuildErrorContent
                     ,
-                    $oHtml->getIcon('package') . t("packages") . ($iCountOfpackages ? ' <span class="badge badge-light">'.$iCountOfpackages.'</span>' : '' )
-                        => $oPrj->renderVersionUsage() 
+                    $oHtml->getIcon('package') . t("packages") . ($iCountOfpackages ? ' <span class="badge badge-secondary">'.$iCountOfpackages.'</span>' : '' )
+                        => '<br>'.$oPrj->renderVersionUsage() 
                     ,
-                    $oHtml->getIcon('phase') . t('phases') . ($iCountOfPhases ? ' <span class="badge badge-light">'.$iCountOfPhases.'</span>' : '' )
-                        => ($oPrj->getActivePhases()
+                    $oHtml->getIcon('phase') . t('phases') .' '. ($iCountOfPhases ? '<span class="badge badge-secondary">'.$iCountOfPhases.'</span>' : '<span class="badge badge-danger">0</span>' )
+                        => '<br>'.($oPrj->getActivePhases()
                             ? '<p>' 
                                 . t("page-overview-phase-infos") 
                                 . '</p>' 
@@ -104,7 +104,6 @@ if (!array_key_exists("prj", $aParams)) {
                 ]
             ])
             .'
-            </div><div sytle="clear: both;"></div>
         <div id="navbuttom">' . aGotop() . aHome() . '</div>';
 }
 // 
diff --git a/public_html/deployment/pages/act_setup.php b/public_html/deployment/pages/act_setup.php
index 82121eda..29ceba9d 100644
--- a/public_html/deployment/pages/act_setup.php
+++ b/public_html/deployment/pages/act_setup.php
@@ -346,7 +346,7 @@ if ($aParams["prj"] == "all") {
         }
     }
     $sErrors=$oPrj->renderErrorBoxes();
-    $sOut.= $sErrors ? $oPrj->renderErrorBoxes() : $oPrj->renderProjectSetup();
+    $sOut.= $sErrors ? $sErrors : $oPrj->renderProjectSetup();
 }
 $sOut.= '<div id="navbuttom">' . aPrjHome() . '</div>';
 
diff --git a/public_html/deployment/ui/page.tpl.php b/public_html/deployment/ui/page.tpl.php
index 25e49dae..11276de8 100644
--- a/public_html/deployment/ui/page.tpl.php
+++ b/public_html/deployment/ui/page.tpl.php
@@ -118,7 +118,7 @@
 -->
 
     <script src="{{DIR_ADMINLTE}}/js/adminlte.min.js?v=3.2.0"></script>
-    <script type="text/javascript" src="js/functions.js"></script>
+    <script type="text/javascript" src="/deployment/js/functions.js"></script>
 </body>
 
 </html>
\ No newline at end of file
diff --git a/public_html/deployment/ui/page_replacements.php b/public_html/deployment/ui/page_replacements.php
index e57e8099..68a225b0 100644
--- a/public_html/deployment/ui/page_replacements.php
+++ b/public_html/deployment/ui/page_replacements.php
@@ -10,7 +10,8 @@ return [
     '{{DIR_ADMINLTEPLUGINS}}' =>'/vendor/admin-lte-plugins',
     '{{PAGE_SKIN}}'    =>'',
     '{{PAGE_TITLE}}'   =>'',
-    '{{PAGE_LAYOUT}}'  =>'layout-navbar-fixed layout-fixed sidebar-mini',
+    //'{{PAGE_LAYOUT}}'  =>'layout-navbar-fixed layout-fixed sidebar-mini',
+    '{{PAGE_LAYOUT}}'  =>'layout-top-nav sidebar-collapse',
     // '{{NAVI_TOP}}'     =>'<nav class="main-header navbar navbar-expand navbar-white navbar-light"><ul class="navbar-nav" id="instances"></ul></nav>',
     '{{BRAND}}'        =>'<a href="?" class="brand-link bg-red">
                             <i class="fa-solid fa-cubes"></i> 
-- 
GitLab