From 714ab97489797b20cd7e50c039b40abe30bfc8b9 Mon Sep 17 00:00:00 2001
From: "Hahn Axel (hahn)" <axel.hahn@unibe.ch>
Date: Wed, 20 Dec 2023 12:00:55 +0100
Subject: [PATCH] icon classes replaced by getIcon()

---
 public_html/deployment/classes/htmlguielements.class.php | 9 +++++++--
 public_html/deployment/classes/project_gui.class.php     | 2 +-
 public_html/deployment/pages/act_login.php               | 4 ++--
 public_html/deployment/pages/act_phase.php               | 6 +++---
 4 files changed, 13 insertions(+), 8 deletions(-)

diff --git a/public_html/deployment/classes/htmlguielements.class.php b/public_html/deployment/classes/htmlguielements.class.php
index c64b769b..b2f44597 100644
--- a/public_html/deployment/classes/htmlguielements.class.php
+++ b/public_html/deployment/classes/htmlguielements.class.php
@@ -169,6 +169,8 @@ class htmlguielements{
             'waiting'=>'fas fa-clock',
             'user'=>'fas fa-user',
             'user-profile'=>'fa-regular fa-id-card',
+            'user-group'=>'fa-regular fa-bookmark',
+            'user-permission'=>'fa-solid fa-caret-right',
             
             'workflow'=>'fas fa-angle-double-right',
             'repository'=>'fas fa-database',
@@ -199,8 +201,11 @@ class htmlguielements{
             'file-target'=>'fas fa-file-upload',
             'replace'=>'fas fa-random',
             
-            'sign-info'=>'fas fa-info-circle',
-            'sign-warning'=>'',
+            'box-up'=>'fa-chevron-up',
+            'box-down'=>'fa-chevron-down',
+
+            'sign-info'=>'fa-solid fa-info',
+            'sign-warning'=>'fa-solid fa-exclamation',
             'sign-error'=>'fas fa-bolt',
             'sign-ok'=>'fas fa-check',
         ),
diff --git a/public_html/deployment/classes/project_gui.class.php b/public_html/deployment/classes/project_gui.class.php
index 73327cff..04afc98c 100644
--- a/public_html/deployment/classes/project_gui.class.php
+++ b/public_html/deployment/classes/project_gui.class.php
@@ -287,7 +287,7 @@ class projectgui extends project {
         $sReturn = '<a href="#" class="btn ' . ($bIsError ? 'btn-danger' : 'btn-default') . '" title="" 
                 onclick="showIdAsModalMessage(\'' . $sId . '\', \''.$sTitle.'\'); return false;"
                 >'
-                // . '<i class="fa fa-info"></i> '
+                . $this->_oHtml->getIcon($bIsError ? 'sign-error' : 'sign-info') // ... '<i class="fa fa-info"></i> '
                 . $sLinktitle
                 . '</a><div id="' . $sId . '" style="display: none;" '
                 ;
diff --git a/public_html/deployment/pages/act_login.php b/public_html/deployment/pages/act_login.php
index e321a742..288dbe47 100644
--- a/public_html/deployment/pages/act_login.php
+++ b/public_html/deployment/pages/act_login.php
@@ -54,11 +54,11 @@ if ($oUser->getUsername()) {
     // ------------------------------------------------------------
     $sGrouplist='';
     foreach ($oUser->getUserGroups() as $sGroupname){
-        $sGrouplist.='<i class="fa-regular fa-bookmark"></i> ' . $sGroupname . '<br>';
+        $sGrouplist.=$oHtml->getIcon('user-group').$sGroupname . '<br>';
     }
     $sPermlist='';
     foreach ($oUser->getUserPermission() as $sPerm){
-        $sPermlist.='<i class="fa-solid fa-caret-right"></i> ' . $sPerm . '<br>';
+        $sPermlist.=$oHtml->getIcon('user-permission').$sPerm . '<br>';
     }
     
     $sOut.=''
diff --git a/public_html/deployment/pages/act_phase.php b/public_html/deployment/pages/act_phase.php
index e9b4a065..5b22b0eb 100644
--- a/public_html/deployment/pages/act_phase.php
+++ b/public_html/deployment/pages/act_phase.php
@@ -65,11 +65,11 @@ if ($sPhase) {
         if(count($aReplacements)>1){
             $sOutReplace.=$oHtml->getLinkButton(array(
                 'onclick'=>'$(\'.divfileinfos\').slideDown(); $(\'.expandable\').removeClass(\'closed\'); this.blur(); return false;',
-                'icon'=>'fa-chevron-down',
+                'icon'=>$oHtml->getIconClass('box-down'),
             ))
             .$oHtml->getLinkButton(array(
                 'onclick'=>'$(\'.divfileinfos\').slideUp(); $(\'.expandable\').addClass(\'closed\'); this.blur(); return false;',
-                'icon'=>'fa-chevron-up',
+                'icon'=>$oHtml->getIconClass('box-up'),
             ))
             ;
         }
@@ -208,7 +208,7 @@ if ($sPhase) {
                         $oHtml->getLink(array(
                             'onclick'=>'$(\'#'.$sDivIdFile.'\').slideToggle(); $(this).toggleClass(\'closed\'); return false;',
                             'class'=>'expandable closed',
-                            'icon'=>'fa-warning',
+                            'icon'=>$oHtml->getIconClass('sign-warning'),
                             'label'=>$sForemanTemplate,
                         )) . '</h4>'
                         . '<div id="'.$sDivIdFile.'" class="divfileinfos" style="display: none;">'
-- 
GitLab