Skip to content
Snippets Groups Projects
Commit 704f5302 authored by Hahn Axel (hahn)'s avatar Hahn Axel (hahn)
Browse files

replace icon css class with $oHtml->getIconClass()

parent f252e059
No related branches found
No related tags found
1 merge request!62V2.0
...@@ -165,7 +165,7 @@ function getTopNavLeft($aEmbed = []) ...@@ -165,7 +165,7 @@ function getTopNavLeft($aEmbed = [])
'href' => $sBaseUrl . $aProject['id'] . '/', 'href' => $sBaseUrl . $aProject['id'] . '/',
'label' => $aProject['label'], 'label' => $aProject['label'],
'class' => $sCurrentProject === $aProject['id'] ? 'active' : '', 'class' => $sCurrentProject === $aProject['id'] ? 'active' : '',
'icon' => 'fa-solid fa-book', 'icon' => $oHtml->getIconClass('project'),
]; ];
} }
/* to test a scrolling menu /* to test a scrolling menu
...@@ -178,45 +178,45 @@ function getTopNavLeft($aEmbed = []) ...@@ -178,45 +178,45 @@ function getTopNavLeft($aEmbed = [])
$aReturn[] = [ $aReturn[] = [
'href' => $sBaseUrl, 'label' => t("menu"), 'href' => $sBaseUrl, 'label' => t("menu"),
'icon' => 'fa-solid fa-chevron-right', 'icon' => $oHtml->getIconClass('menu'),
'class' => ($sCurrentAction === 'setup' || $sCurrentAction === 'valuestore' ? 'active' : ''), 'class' => ($sCurrentAction === 'setup' || $sCurrentAction === 'valuestore' ? 'active' : ''),
'children' => [ 'children' => [
['href' => $sBaseUrl . 'all/setup/new/', 'label' => t("menu-new-project"), 'icon' => 'fa-regular fa-star', 'class' => ($sCurrentPar3 === 'new' ? 'active' : ''),], ['href' => $sBaseUrl . 'all/setup/new/', 'label' => t("menu-new-project"), 'icon' => $oHtml->getIconClass('new'), 'class' => ($sCurrentPar3 === 'new' ? 'active' : ''),],
['href' => $sBaseUrl . 'all/setup/actionlog/', 'label' => t("menu-logs"), 'icon' => 'fa-regular fa-rectangle-list', 'class' => ($sCurrentPar3 === 'actionlog' ? 'active' : ''),], ['href' => $sBaseUrl . 'all/setup/actionlog/', 'label' => t("menu-logs"), 'icon' => $oHtml->getIconClass('actionlog'), 'class' => ($sCurrentPar3 === 'actionlog' ? 'active' : ''),],
['href' => $sBaseUrl . 'all/valuestore/', 'label' => t("menu-valuestore"), 'icon' => 'fa-solid fa-tags', 'class' => ($sCurrentAction === 'valuestore' ? 'active' : ''),], ['href' => $sBaseUrl . 'all/valuestore/', 'label' => t("menu-valuestore"), 'icon' => $oHtml->getIconClass('valuestore'), 'class' => ($sCurrentAction === 'valuestore' ? 'active' : ''),],
['href' => $sBaseUrl . 'all/setup/checklang/', 'label' => t("menu-checklang"), 'icon' => 'fa-regular fa-comment', 'class' => ($sCurrentPar3 === 'checklang' ? 'active' : ''),], ['href' => $sBaseUrl . 'all/setup/checklang/', 'label' => t("menu-checklang"), 'icon' => $oHtml->getIconClass('comment'), 'class' => ($sCurrentPar3 === 'checklang' ? 'active' : ''),],
['label' => '-'], ['label' => '-'],
['href' => $sBaseUrl . 'all/setup/', 'label' => t("menu-settings"), 'icon' => 'fa-solid fa-gear'], ['href' => $sBaseUrl . 'all/setup/', 'label' => t("menu-settings"), 'icon' => $oHtml->getIconClass('setup')],
] ]
]; ];
if (count($aPrjItems)) { if (count($aPrjItems)) {
$aReturn[] = [ $aReturn[] = [
'href' => '#', 'label' => t("menu-projects"), 'icon' => 'fa-solid fa-box-open', 'href' => '#', 'label' => t("menu-projects"), 'icon' => $oHtml->getIconClass('projects'),
'children' => $aPrjItems 'children' => $aPrjItems
]; ];
} }
if ($sCurrentProject) { if ($sCurrentProject) {
$oPrj = new project($aParams["prj"]); $oPrj = new project($aParams["prj"]);
$aPrjChildren = [ $aPrjChildren = [
['href' => $sBaseUrl . $sCurrentProject . '/', 'label' => $oHtml->getIcon('project-home') . t("project-home"), 'icon' => '', 'class' => ($sCurrentAction == '' ? 'active' : '')], ['href' => $sBaseUrl . $sCurrentProject . '/', 'label' => t("project-home"), 'icon' => $oHtml->getIconClass('project-home'), 'class' => ($sCurrentAction == '' ? 'active' : '')],
['label' => '-'], ['label' => '-'],
]; ];
$aPhases = $oPrj->getActivePhases(); $aPhases = $oPrj->getActivePhases();
if (count($aPhases)) { if (count($aPhases)) {
$aPrjChildren[] = ['href' => $sBaseUrl . $sCurrentProject . '/build/', 'label' => $oHtml->getIcon('build') . t("build"), 'icon' => '', 'class' => ($sCurrentAction === 'build' ? 'active' : '')]; $aPrjChildren[] = ['href' => $sBaseUrl . $sCurrentProject . '/build/', 'label' => t("build"), 'icon' => $oHtml->getIconClass('build'), 'class' => ($sCurrentAction === 'build' ? 'active' : '')];
$aPrjChildren[] = ['label' => '-']; $aPrjChildren[] = ['label' => '-'];
foreach ($aPhases as $sPhase) { 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[] = ['href' => $sBaseUrl . $sCurrentProject . '/phase/' . $sPhase . '/', 'label' => $sPhase, 'icon' => $oHtml->getIconClass('phase'), 'class' => (isset($aParams['par3']) && $aParams['par3'] === $sPhase ? 'active' : '')];
} }
$aPrjChildren[] = ['label' => '-']; $aPrjChildren[] = ['label' => '-'];
} }
$aPrjChildren[] = ['href' => $sBaseUrl . $sCurrentProject . '/setup/', 'label' => $oHtml->getIcon('setup') . t("menu-project-settings"), 'icon' => '', 'class' => ($sCurrentAction === 'setup' ? 'active' : '')]; $aPrjChildren[] = ['href' => $sBaseUrl . $sCurrentProject . '/setup/', 'label' => t("menu-project-settings"), 'icon' => $oHtml->getIconClass('setup') , '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 . '/cleanup/', 'label' => t("menu-project-cleanup"), 'icon' => $oHtml->getIconClass('cleanup'), 'class' => ($sCurrentAction === 'cleanup' ? 'active' : '')];
$aPrjChildren[] = ['href' => $sBaseUrl . $sCurrentProject . '/delete/', 'label' => $oHtml->getIcon('delete') . t("menu-project-delete"), 'icon' => '', 'class' => ($sCurrentAction === 'delete' ? 'active' : '')]; $aPrjChildren[] = ['href' => $sBaseUrl . $sCurrentProject . '/delete/', 'label' => t("menu-project-delete"), 'icon' => $oHtml->getIconClass('delete'), 'class' => ($sCurrentAction === 'delete' ? 'active' : '')];
$aReturn[] = [ $aReturn[] = [
'href' => '#', 'label' => $oPrj->getLabel(), 'icon' => 'fa-solid fa-book', 'class' => 'active', 'href' => '#', 'label' => $oPrj->getLabel(), 'icon' => $oHtml->getIconClass('project'), 'class' => 'active',
'children' => $aPrjChildren 'children' => $aPrjChildren
]; ];
} }
...@@ -244,26 +244,26 @@ function getTopNavRight() ...@@ -244,26 +244,26 @@ function getTopNavRight()
if ($oUser->getUsername()) { if ($oUser->getUsername()) {
$aReturn = [ $aReturn = [
[ [
'href' => '#', 'label' => $oUser->getUsername(), 'icon' => 'fa-solid fa-user', 'href' => '#', 'label' => $oUser->getUsername(), 'icon' => $oHtml->getIconClass('user'),
'class' => ($sCurrentAction == 'login' ? 'active' : ''), 'class' => ($sCurrentAction == 'login' ? 'active' : ''),
'children' => [ 'children' => [
['href' => $sBaseUrl . 'all/login/', 'label' => t("menu-userprofile"), 'icon' => 'fa-regular fa-id-card', 'class' => ($sCurrentAction == 'login' ? 'active' : '')], ['href' => $sBaseUrl . 'all/login/', 'label' => t("menu-userprofile"), 'icon' => $oHtml->getIconClass('user-profile'), 'class' => ($sCurrentAction == 'login' ? 'active' : '')],
] ]
] ]
]; ];
} else { } else {
$aReturn[] = ['href' => $sBaseUrl . 'all/login/', 'label' => t("login"), 'icon' => 'fa-solid fa-right-to-bracket', 'class' => ($sCurrentAction == 'login' ? 'active' : '')]; $aReturn[] = ['href' => $sBaseUrl . 'all/login/', 'label' => t("login"), 'icon' => $oHtml->getIconClass('login'), 'class' => ($sCurrentAction == 'login' ? 'active' : '')];
} }
$aReturn[] = [ $aReturn[] = [
'href' => '#', 'label' => t('menu-help'), 'icon' => 'fa-solid fa-life-ring', 'class' => '', 'href' => '#', 'label' => t('menu-help'), 'icon' => $oHtml->getIconClass('help'), 'class' => '',
'children' => [ 'children' => [
['href' => $sWikiBaseUrl . '/it/entwicklung/continuous_deployment', 'target' => '_help', 'label' => 'WIKI: Übersicht Continous Deployment', 'icon' => ''], ['href' => $sWikiBaseUrl . '/it/entwicklung/continuous_deployment', 'target' => '_help', 'label' => 'WIKI: Übersicht Continous Deployment', 'icon' => $oHtml->getIconClass('link-extern')],
['href' => $sWikiBaseUrl . '/it/entwicklung/continuous_deployment#konventionen', 'target' => '_help', 'label' => 'WIKI: Konventionen für Entwickler', 'icon' => ''], ['href' => $sWikiBaseUrl . '/it/entwicklung/continuous_deployment#konventionen', 'target' => '_help', 'label' => 'WIKI: Konventionen für Entwickler', 'icon' => $oHtml->getIconClass('link-extern')],
['href' => $sWikiBaseUrl . '/it/infrastruktur/se/snippets/iml.deployment_profile', 'target' => '_help', 'label' => 'WIKI (Admin): Snippets für den Sysadmin', 'icon' => ''], ['href' => $sWikiBaseUrl . '/it/infrastruktur/se/snippets/iml.deployment_profile', 'target' => '_help', 'label' => 'WIKI (Admin): Snippets für den Sysadmin', 'icon' => $oHtml->getIconClass('link-extern')],
['href' => $sWikiBaseUrl . '/it/infrastruktur/dienste/imldeployment', 'target' => '_help', 'label' => 'WIKI (Admin): Verzeichnisse und Dateien', 'icon' => ''], ['href' => $sWikiBaseUrl . '/it/infrastruktur/dienste/imldeployment', 'target' => '_help', 'label' => 'WIKI (Admin): Verzeichnisse und Dateien', 'icon' => $oHtml->getIconClass('link-extern')],
['href' => $sBaseUrl . 'all/doc', 'label' => t('menu-help-classes'), 'icon' => ''], ['href' => $sBaseUrl . 'all/doc', 'label' => t('menu-help-classes'), 'icon' => $oHtml->getIconClass('help')],
['label' => '-'], ['label' => '-'],
['href' => $sBaseUrl . 'all/about', 'label' => t('about'), 'icon' => ''], ['href' => $sBaseUrl . 'all/about', 'label' => t('about'), 'icon' => $oHtml->getIconClass('sign-info')],
] ]
]; ];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment