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

Merge branch 'task-1462-select-foreman-hostgroups' into 'master'

Task 1462 select foreman hostgroups

See merge request !34
parents 878db420 56f8316b
Branches
No related tags found
No related merge requests found
{
"menu": "Menü",
"menu-brand": "Deployment GUI",
"menu-overview": "Übersicht",
"menu-projects": "Projekte",
"menu-checklang": "Vergleich Sprachtexte",
"menu-settings": "Einstellungen",
"menu-logs": "Logs",
"menu-new-project": "Neues Projekt anlegen",
......@@ -218,11 +220,13 @@
"build-type": "Build Typ",
"commitmessage": "Commit-Message",
"change": "Wechseln",
"cleanup": "Cleanup",
"contact": "Kontakt",
"creating-directory": "Lege das Verzeichnis %s an.",
"creating-file": "Lege Datei %s an.",
"defaultbranch": "[default: Master oder Trunk]",
"defaults-all-phases": "Default-Werte (für alle Phasen)",
"delete": "Löschen",
"deploy": "Deploy",
"deploy-hint": "Deploy der Queue von Phase [%s]",
"deploy-impossible": "Deploy der Queue von Phase [%s] ist nicht möglich.",
......@@ -278,6 +282,7 @@
"phase-targethosts": "Zielsysteme",
"phases": "Phasen",
"project": "Projekt",
"project-home": "Projekt Startseite",
"projectdescription": "Kurzbeschreibung",
"projectname": "Projektname",
"projectmanager": "Projektleiter",
......
{
"menu": "Menu",
"menu-brand": "IML Deployment GUI",
"menu-overview": "back to overview",
"menu-projects": "Projects",
"menu-checklang": "Compare language texts",
"menu-settings": "Settings",
"menu-logs": "Logs",
"menu-new-project": "Create new project",
......@@ -221,10 +223,12 @@
"change": "Change",
"commitmessage": "Commit message",
"contact": "contact",
"cleanup": "Cleanup",
"creating-directory": "Creating directory %s",
"creating-file": "Creating file %s",
"defaultbranch": "[default: master or trunk]",
"defaults-all-phases": "Default values (for all phases)",
"delete": "Delete",
"deploy": "Deploy",
"deploy-hint": "Deploy queue of phase [%s]",
"deploy-impossible": "Deploy queue of phase [%s] is not possible.",
......@@ -280,6 +284,7 @@
"phase-targethosts": "Target hosts",
"phases": "Phases",
"project": "Project",
"project-home": "Projekt home",
"projectdescription": "Short description",
"projectname": "Project name",
"projectmanager": "Projekt manager",
......
......@@ -215,7 +215,8 @@ class formgen {
case "select":
// HINWEIS optgroups werden nicht unterstuezt - nur einfache Listen
$this->_checkReqiredKeys($elementData, array("name"));
$sFormElement.='<div class="col-sm-10"><select id="' . $sId . '" class="form-control" ';
$sDivClass=(array_key_exists("inline", $elementData) && $elementData["inline"])?"form-group":"col-sm-10";
$sFormElement.='<div class="'.$sDivClass.'"><select id="' . $sId . '" class="form-control" ';
$sFormElement.=$this->_addHtmlAtrributes(explode(",", "$sDefaultAttributes,name,onchange"), $elementData);
$sFormElement.=">\n";
foreach ($elementData["options"] as $idOption => $aOptionData) {
......
......@@ -43,18 +43,41 @@ class htmlguielements{
'ok'=>array('class'=>'btn-primary', 'icon'=>'fa-check'),
// deploy actions and buttons
'accept'=>array('class'=>'', 'icon'=>'glyphicon-forward'),
'build'=>array('class'=>'', 'icon'=>'glyphicon-equalizer'),
'cleanup'=>array('class'=>'', 'icon'=>'glyphicon-chevron-right'),
'accept'=>array('class'=>''),
'build'=>array('class'=>''),
'cleanup'=>array('class'=>''),
'deploy'=>array('class'=>'', 'icon'=>'glyphicon-forward'),
'new'=>array('class'=>'', 'icon'=>'glyphicon-star-empty'),
'overview'=>array('class'=>'', 'icon'=>'glyphicon-book'),
'overview'=>array('class'=>''),
'phase'=>array('class'=>'', 'icon'=>'glyphicon-chevron-right'),
'rollback'=>array('class'=>'', 'icon'=>'glyphicon-forward'),
'setup'=>array('class'=>'', 'icon'=>'glyphicon-cog'),
'setup'=>array('class'=>''),
),
'icons'=>array(
'menu'=>'fa-chevron-right',
'overview'=>'fa-list',
'project'=>'fa-book',
'project-home'=>'fa-home',
'projects'=>'fa-folder-o',
'actions'=>'fa-check',
'actionlog'=>'fa-list-ul',
'accept'=>'glyphicon-forward',
'build'=>'glyphicon-equalizer',
'cleanup'=>'fa-trash',
'checklang'=>'fa-check',
'delete'=>'fa-close',
'deploy'=>'glyphicon-forward',
'filter'=>'glyphicon-filter',
'new'=>'glyphicon-star-empty',
'phase'=>'glyphicon-chevron-right',
'rollback'=>'glyphicon-forward',
'setup'=>'fa-cog',
'login'=>'fa-lock',
'user'=>'fa-user',
'workflow'=>'fa-angle-double-right',
'repository'=>'fa-database',
'phase'=>'fa-flag',
......@@ -62,6 +85,8 @@ class htmlguielements{
'version'=>'fa-tag',
'list'=>'fa-list',
'back'=>'fa-chevron-left',
'branch'=>'glyphicon-bookmark',
'calendar'=>'glyphicon-calendar',
'comment'=>'glyphicon-comment',
......@@ -195,7 +220,14 @@ class htmlguielements{
if (array_key_exists($aItem['type'], $this->aCfg['buttons'])){
$sClass=$this->aCfg['buttons'][$aItem['type']]['class'];
$aReturn['class'].=$sClass ? ' '.$sClass : '';
$aReturn['icon']=$aReturn['icon'] ? $aReturn['icon'] : $this->aCfg['buttons'][$aItem['type']]['icon'];
// icon priority:
// given in param --> icon in button config --> icon in icon config
$aReturn['icon']=$aReturn['icon'] ? $aReturn['icon'] :
( $this->aCfg['buttons'][$aItem['type']]['icon']
? $this->aCfg['buttons'][$aItem['type']]['icon']
: ( array_key_exists($aItem['type'], $this->aCfg['icons']) ? $this->aCfg['icons'][$aItem['type']] : '')
);
}
return $aReturn;
}
......
......@@ -58,6 +58,7 @@ class projectlist extends base{
$sColClass = "tdphase";
$oPrj1 = new project();
$oHtml=new htmlguielements();
$sPrjFilter = '';
$sPhaseFilter = '';
......@@ -84,13 +85,24 @@ class projectlist extends base{
}
$sOut2 .= '<div class="' . $sPrj . ' ' . $sTrClass . ' prjbox"><div class="title">'
. '<a href="" onclick="$(\'#prjfilter\').val(\'' . $sPrj . '\'); window.setTimeout(\'filterOverviewTable();\', 10);setview(\'extended\'); return false;" '
. 'style="float: right;" '
. 'title="' . t("overview-filter-hint") . '"><i class="glyphicon glyphicon-filter"></i> ' . t("overview-filter") . '</a>'
.$oHtml->getLink(array(
'href'=>'#',
'onclick'=>'$(\'#prjfilter\').val(\'' . $sPrj . '\'); window.setTimeout(\'filterOverviewTable();\', 10);setview(\'extended\'); return false;',
'style'=>'float: right;',
'title'=>t("overview-filter-hint"),
'icon'=>'filter',
'label'=>t("overview-filter")
))
.'<strong>'
. '<a href="/deployment/' . $sPrj . '/" title="' . t("menu-project-home") . ' ' . $oPrj->getLabel() . '"><i class="glyphicon glyphicon-book"></i> ' . $oPrj->getLabel() . '</a>'
.$oHtml->getLink(array(
'href'=>'/deployment/' . $sPrj . '/',
'title'=>t("menu-project-home"). ' ' . $oPrj->getLabel(),
'icon'=>'project',
'label'=>'<strong>'.$oPrj->getLabel().'</strong>'
))
.'</strong>'
. '</div><div class="box" '
. '</div>'
. '<div class="box" '
. 'onclick="location.href=\'/deployment/' . $sPrj . '/\'">'
. $oPrj->getDescription()
. '<br>'
......@@ -100,20 +112,26 @@ class projectlist extends base{
$sOut.='
<tr class="' . $sPrj . ' ' . $sTrClass . '">
<td class="prj">
<strong>
<a href="/deployment/' . $sPrj . '/" title="'.$oPrj->getDescription().'">
<i class="glyphicon glyphicon-book"></i>
' . $oPrj->getLabel() . '
</a>
</strong>'
<strong>'
.$oHtml->getLink(array(
'href'=>'/deployment/' . $sPrj . '/',
'title'=>$oPrj->getDescription(),
'icon'=>'project',
'label'=>$oPrj->getLabel()
))
.'</strong>'
. ' <br>'
// . $oPrj->getDescription()
. '</td>'
. '<td class="prj">'
. '<a href="#" onclick="setProjectFilter(\'' . $sPrj . '\'); return false;" '
. 'style="float: right;" '
. 'class="btn btn-default" '
. 'title="' . t("overview-filter-hint") . '"><i class="glyphicon glyphicon-filter"></i> ' . t("overview-filter") . '</a>'
. $oHtml->getLinkButton(array(
'href'=>'#',
'onclick'=>'setProjectFilter(\'' . $sPrj . '\'); return false;',
'style'=>'float: right',
'title'=>t("overview-filter-hint"),
'icon'=>'filter',
'label'=>t("overview-filter"),
))
. '</td>'
. '<td class="prj">';
if ($oPrj->canAcceptPhase()) {
......
......@@ -108,22 +108,19 @@ if (isset($_SERVER) && is_array($_SERVER) && array_key_exists("REQUEST_URI", $_S
$aParams[$sKey] = str_replace(array('\\', "\0", "\n", "\r", "'", '"', "\x1a"), array('\\\\', '\\0', '\\n', '\\r', "\\'", '\\"', '\\Z'), $aParams[$sKey]);
}
}
$sImageBase = "/deployment/images/nuvola64x64/";
$aImages = array(
'overview' => 'apps/fsview.png',
'project' => 'filesystems/desktop.png',
'action' => 'apps/aktion.png',
'build' => 'apps/kthememgr.png',
);
/**
* get home link as button
* @return string
*/
function aHome($sClass = "btn btn-default") {
global $aParams;
global $oHtml;
// if (!array_key_exists("prj", $aParams)) return false;
return '<a href="/deployment/?" class="' . $sClass . '"><i class=" glyphicon glyphicon-home"></i> ' . t("menu-overview") . '</a>';
return $oHtml->getLinkButton(array(
'href'=>'/deployment/?',
'icon'=>'overview',
'label'=>t("menu-overview"),
));
}
/**
......@@ -131,16 +128,22 @@ function aHome($sClass = "btn btn-default") {
* @return string
*/
function aPrjHome($sClass = "btn btn-default") {
global $aParams, $aConfig;
if (!array_key_exists("prj", $aParams))
global $aParams, $oHtml;
if (!array_key_exists("prj", $aParams)){
return false;
if ($aParams["prj"] == "all")
}
if ($aParams["prj"] == "all"){
return aHome($sClass);
}
// if (!array_key_exists("action", $aParams)) return false;
require_once("./classes/project.class.php");
$oPrj = new project($aParams["prj"]);
return '<a href="/deployment/' . $aParams["prj"] . '/" class="' . $sClass . '"><i class=" glyphicon glyphicon-book"></i> ' . t("menu-project-home") . ' <strong>' . $oPrj->getLabel() . '</strong></a>';
return $oHtml->getLinkButton(array(
'href'=>'/deployment/' . $aParams["prj"] . '/',
'icon'=>'project-home',
'label'=>$oPrj->getLabel(),
));
}
/**
......@@ -148,14 +151,28 @@ function aPrjHome($sClass = "btn btn-default") {
* @return string
*/
function aGoback($sClass = "btn btn-default") {
return '<a href="#" onclick="history.back();" class="' . $sClass . '" title="' . t("back") . '"><i class="glyphicon glyphicon-chevron-left"></i> ' . t("back") . '</a> ';
global $oHtml;
return $oHtml->getLinkButton(array(
'href'=>'#',
'onclick'=>'history.back();',
'title'=>t("back"),
'icon'=>'back',
'label'=>t("back")
));
}
/**
* get go top link as button
* @return string
*/
function aGotop($sClass = "scroll-link btn btn-default") {
return '<a href="#top" class="' . $sClass . '" title="' . t("gotop") . '"><i class=" glyphicon glyphicon-eject"></i> </a> ';
global $oHtml;
return $oHtml->getLinkButton(array(
'href'=>'#top',
'class'=>$sClass,
'title'=>t("gotop"),
'icon'=>'glyphicon-eject',
'label'=>' '
));
}
/**
......@@ -164,7 +181,7 @@ function aGotop($sClass = "scroll-link btn btn-default") {
* @return type
*/
function getTopArea() {
global $aParams, $sImageBase, $aImages, $aConfig;
global $aParams, $oHtml;
$sReturn = '';
require_once("./classes/project.class.php");
require_once("./classes/user.class.php");
......@@ -207,30 +224,67 @@ function getTopArea() {
<ul class="nav navbar-nav">
<li class="dropdown';
if (!array_key_exists("prj", $aParams)){
if (array_key_exists("prj", $aParams) && $aParams['prj']==='all'){
$sReturn.=' active';
}
$sReturn.='">'
. '<a href="' . $sBaseUrl . '" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false"
>'.t("menu-overview").' <span class="caret"></span></a>
<ul class="dropdown-menu" role="menu">
<li><a href="' . $sBaseUrl . 'all/setup/">' . t("menu-settings") . '</a></li>
<li><a href="' . $sBaseUrl . 'all/setup/actionlog/">' . t("menu-logs") . '</a></li>
<li><a href="' . $sBaseUrl . 'all/setup/new/">' . t("menu-new-project") . '</a></li>
. $oHtml->getLink(array(
'href'=>$sBaseUrl,
'class'=>'dropdown-toggle',
'data-toggle'=>'dropdown',
'role'=>'button',
'aria-expanded'=>'false',
'icon'=>'menu',
'label'=>t("menu").' <span class="caret"></span>',
))
.'<ul class="dropdown-menu" role="menu">
<li>'.$oHtml->getLink(array(
'href'=>$sBaseUrl . 'all/setup/new/',
'icon'=>'new',
'label'=>t("menu-new-project"),
)).'</li>
<li>'.$oHtml->getLink(array(
'href'=>$sBaseUrl . 'all/setup/actionlog/',
'icon'=>'actionlog',
'label'=>t("menu-logs"),
)).'</li>
<li>'.$oHtml->getLink(array(
'href'=>$sBaseUrl . 'all/setup/checklang/',
'icon'=>'checklang',
'label'=>t("menu-checklang"),
)).'</li>
<li>'.$oHtml->getLink(array(
'href'=>$sBaseUrl . 'all/setup/',
'icon'=>'setup',
'label'=>t("menu-settings"),
)).'</li>
</ul>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false"
>' . t("menu-projects") . ' <span class="caret"></span></a>
<ul class="dropdown-menu" role="menu">
';
<li class="dropdown">'
. $oHtml->getLink(array(
'href'=>'#',
'class'=>'dropdown-toggle',
'data-toggle'=>'dropdown',
'role'=>'button',
'aria-expanded'=>'false',
'icon'=>'projects',
'label'=>t("menu-projects") . ' <span class="caret"></span>',
))
.'<ul class="dropdown-menu" role="menu">'
;
$oPrj1 = new project();
foreach ($oPrj1->getProjects() as $sPrj) {
$oPrj = new project($sPrj);
$sReturn.='<li><a href="' . $sBaseUrl . $sPrj . '/">' . $oPrj->getLabel() . '</a></li>';
$sReturn.='<li>'
. $oHtml->getLink(array(
'href'=>$sBaseUrl . $sPrj .'/',
'icon'=>'project',
'label'=>$oPrj->getLabel(),
))
. '</li>';
}
$sReturn.='
</ul>
......@@ -240,55 +294,106 @@ function getTopArea() {
if (array_key_exists("prj", $aParams) && $aParams["prj"] <> "all") {
$oPrj = new project($aParams["prj"]);
$sReturn.='
<li class="active">' . aPrjHome(" ") . '</li>
';
if (array_key_exists("action", $aParams) and FALSE) {
$sReturn.='<li><a href="#">Aktion: ' . $aParams["action"] . '</a></li>';
} else {
$sReturn.='
<li class="dropdown">
<a href="' . $sBaseUrl . '" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false"
>'.t("menu-project-actions").' <span class="caret"></span></a>
<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><a href="' . $sBaseUrl . $aParams["prj"] . '/build/">' . t("menu-project-build") . '</a></li>
-->
<li><a href="' . $sBaseUrl . $aParams["prj"] . '/setup/">' . t("menu-project-settings") . '</a></li>
<li><a href="' . $sBaseUrl . $aParams["prj"] . '/cleanup/">' . t("menu-project-cleanup") . '</a></li>
<li><a href="' . $sBaseUrl . $aParams["prj"] . '/delete/">' . t("menu-project-delete") . '</a></li>
<li>'
. $oHtml->getLink(array(
'href'=>$sBaseUrl . $sPrj .'/',
'icon'=>'project-home',
'label'=>t("project-home"),
))
.'</li>
';
$sReturn.='</ul></li>';
$aPhases = $oPrj->getActivePhases();
if (count($aPhases)) {
$sReturn.='<li class="dropdown"">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">' . t("menu-project-phases") . '<b class="caret"></b></a>
<ul class="dropdown-menu" role="menu">';
$sReturn.='<li role="separator" class="divider"></li>
<li>'
.$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><a href="' . $sBaseUrl . $aParams["prj"] . '/phase/' . $sPhase . '/">' . $sPhase . '</a></li>';
}
$sReturn.='</ul></li>';
$sReturn.='<li><a href="' . $sBaseUrl . $aParams["prj"] . '/phase/' . $sPhase . '/">' . $oHtml->getIcon('phase').$sPhase . '</a></li>';
}
}
$sReturn.='
<li role="separator" class="divider"></li>
<li>'
.$oHtml->getLink(array(
'href'=>$sBaseUrl . $aParams["prj"] . '/setup/',
'icon'=>'setup',
'label'=>t("menu-project-settings"),
))
.'</li>
<li>'
.$oHtml->getLink(array(
'href'=>$sBaseUrl . $aParams["prj"] . '/cleanup/',
'icon'=>'cleanup',
'label'=>t("menu-project-cleanup"),
))
.'</li>
<li>'
.$oHtml->getLink(array(
'href'=>$sBaseUrl . $aParams["prj"] . '/delete/',
'icon'=>'delete',
'label'=>t("menu-project-delete"),
))
.'</li>
</ul></li>';
}
}
$sReturn.='
</ul>
<ul class="nav navbar-nav navbar-right">
<ul class="nav navbar-nav navbar-right">'
. ($oUser->getUsername()
? '
<!-- userdata -->
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false"
><span class="glyphicon glyphicon-user"></span> ' . $oUser->getUsername() . ' <b class="caret"></b></a>
<ul class="dropdown-menu" role="menu">
<li><a href="' . $sBaseUrl . 'all/login/">' . t("menu-login") . '</a></li>
<li class="dropdown">'
.$oHtml->getLink(array(
'href'=>'#',
'class'=>'dropdown-toggle',
'data-toggle'=>'dropdown',
'role'=>'button',
'aria-expanded'=>'false',
'icon'=>'user',
'label'=>$oUser->getUsername() .' <span class="caret"></span>',
))
.'<ul class="dropdown-menu" role="menu">
<li>'
.$oHtml->getLink(array(
'href'=>$sBaseUrl . 'all/login/',
'icon'=>'login',
'label'=>t("menu-login"),
))
.'</li>
</ul>
</li>
<li class="dropdown">
</li>'
: '<li>'
.$oHtml->getLink(array(
'href'=>$sBaseUrl . 'all/login/',
'icon'=>'login',
'label'=>t("login"),
))
.'</li>'
)
.'<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false"
><span class="glyphicon glyphicon-question-sign"></span> ' . t("menu-help") . ' <b class="caret"></b></a>
<ul class="dropdown-menu">
......@@ -308,13 +413,12 @@ function getTopArea() {
</div><div id="header2">';
if (!array_key_exists("prj", $aParams)) {
$sReturn.='<!-- <img src="' . $sImageBase . $aImages['overview'] . '" id="imgtop" alt=""> -->'
. '<h1>' . t("overview-label") . '</h1><span class="description">' . t("overview-hint") . '</span>';
$sReturn.='<h1>' . t("overview-label") . '</h1><span class="description">' . t("overview-hint") . '</span>';
} else {
if ($aParams["prj"] <> "all") {
$oPrj = new project($aParams["prj"]);
$sReturn.='<!-- <img src="' . $sImageBase . $aImages['project'] . '" id="imgtop" alt="">-->
<h1>' . $oPrj->getLabel() . '</h1><span class="description">' . $oPrj->getDescription() . '</span>';
$sReturn.='<h1>' . $oPrj->getLabel() . '</h1>'
. '<span class="description">' . $oPrj->getDescription() . '</span>';
if (array_key_exists("action", $aParams)) {
// $sReturn.='<h2>Aktion: '.$aParams["action"].'</h2>';
}
......@@ -328,37 +432,36 @@ function getTopArea() {
/**
* get h2 headline with action
* @global type $aParams
* @global string $sImageBase
* @global array $aImages
* @return string
*/
function getAction() {
global $aParams, $sImageBase, $aImages;
$oHtml=new htmlguielements();
global $aParams, $oHtml;
$sReturn = '';
$sNav = '';
$sLabel = '';
// $sDelim=$oHtml->getIcon('fa-chevron-right');
$sDelim=' / ';
if (array_key_exists("action", $aParams)) {
$sLabel .= $aParams["action"];
$sLabel .= $oHtml->getIcon($aParams["action"]).t($aParams["action"]);
$sNav .= aHome();
if ($aParams['prj']==='all'){
// $sNav .= [settings];
// $sNav .= ' ' . $oHtml->getIcon('fa-chevron-right') . '[ci-GUI]';
} else {
$sNav .= ' ' . $oHtml->getIcon('fa-chevron-right') . aPrjHome();
$sNav .= ' ' . $sDelim . aPrjHome();
}
$sClass='action '.$aParams["action"];
if (array_key_exists("par3", $aParams)) {
$sLabel.=' :: ' . $aParams["par3"];
$sLabel.=' :: ' . $oHtml->getIcon($aParams["par3"]). $aParams["par3"];
$sClass='action ' . $aParams["action"];
}
// $sReturn.='<h2 class="action ' . $aParams["action"] . '">' . $sLabel . '</h2>';
} else if (array_key_exists("prj", $aParams)) {
$sNav .= aHome();
$sClass='action prjhome';
$sLabel.='Projekt-Home';
$sLabel.=$oHtml->getIcon('project-home').t('project-home');
// $sReturn.='<h2 class="action prjhome"> Projekt-Home</h2>';
}
$sReturn.=($sNav ? '<div id="navtop">' . $sNav . ' ' .$oHtml->getIcon('fa-chevron-right') . ' <span class="current">'.$sLabel.'</span></div>':'')
$sReturn.=($sNav ? '<div id="navtop">' . $sNav . ' ' . $sDelim . ' <span class="current">'.$sLabel.'</span></div>':'')
// .'<h2 class="'.$sClass.'"> '.$sLabel.'</h2>'
;
return $sReturn;
......
......@@ -16,6 +16,45 @@ require_once("./classes/project.class.php");
require_once("./inc_functions.php");
$sOut = '';
$sFakePassword='********************';
// items to mask
$aMask=array(
'auth'=>array(
'ldap'=>array(
'PwLdapUser'=>$sFakePassword
)
),
'foreman'=>array(
'password'=>$sFakePassword
),
'projects'=>array(
'ldap'=>array(
'PwLdapUser'=>$sFakePassword
)
),
);
/**
* hide entries in config array
* @param type $aMask
* @param type $aConfig
* @return type
*/
function maskEntries($aMask, $aConfig){
foreach ($aMask as $sKey=>$aValue){
if (array_key_exists($sKey, $aConfig)){
$aConfig[$sKey]=(is_array($aValue)
? maskEntries($aMask[$sKey], $aConfig[$sKey])
: $aMask[$sKey]
)
;
}
}
return $aConfig;
}
if ($aParams["prj"] == "all") {
// ------------------------------------------------------------
......@@ -23,14 +62,10 @@ if ($aParams["prj"] == "all") {
// ------------------------------------------------------------
if (!array_key_exists("par3", $aParams)) {
$oPrj = new project();
$sOut.='<h2>'.t("page-setup-info").'</h2>'
. '<p>'.t("page-setup-info-introtext").'</p>'
. '<p>'
. '<a href="./checklang/">'.t("page-setup-info-check-lang").'</a><br>'
. '<a href="./actionlog/">'.t("class-actionlog-title").'</a><br>'
. '</p>';
$aTmp=maskEntries($aMask, $aConfig);
$sOut.= '<pre>'.print_r($aTmp, 1).'</pre>';
// print_r($aConfig);
$i = 0;
require_once ("./classes/formgen.class.php");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment