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

update layout project overview + phase list

parent debb2c84
Branches
No related tags found
1 merge request!62V2.0
...@@ -630,23 +630,48 @@ class projectgui extends project { ...@@ -630,23 +630,48 @@ class projectgui extends project {
public function renderPhaseInfo() { public function renderPhaseInfo() {
$sRow1 = false; $sRow1 = false;
$sRow2 = false; $sRow2 = false;
$renderAdminLTE=new renderadminlte();
$iWidth=12 / count($this->getActivePhases());
foreach ($this->getActivePhases() as $sPhase) { foreach ($this->getActivePhases() as $sPhase) {
$sRow1.='<th class="' . $sPhase . ' tdphase">' . $sPhase . '</th>'; $sRow1.=$renderAdminLTE->addCol(
$sRow2.='<td class="' . $sPhase . '">' '<table class="nomargin"><tr><th class="' . $sPhase . ' tdphase">' . $sPhase . '</th></tr></table>'
. t('url') . ': <a href="' . $this->_aPrjConfig["phases"][$sPhase]["url"] . '">' . $this->_aPrjConfig["phases"][$sPhase]["url"] . '</a><br>' ,
. '<br>' . t('deploytimes') . ':<br>'; $iWidth);
$sDetails=t('url') . ': <a href="' . $this->_aPrjConfig["phases"][$sPhase]["url"] . '">' . $this->_aPrjConfig["phases"][$sPhase]["url"] . '</a><br>'
. '<br>' . t('deploytimes') . ':<br>';
if (count($this->_getDeploytimes($sPhase))) { if (count($this->_getDeploytimes($sPhase))) {
$sRow2.=implode("<br>", $this->_getDeploytimes($sPhase)); $sDetails.=implode("<br>", $this->_getDeploytimes($sPhase));
} else { } else {
$sRow2.=t('deploytimes-immediately'); $sDetails.=t('deploytimes-immediately');
} }
$sRow2.='<br>' . $this->renderLink("phase", $sPhase) $sDetails.='<br>' . $this->renderLink("phase", $sPhase)
. $this->_renderHosts($sPhase) . $this->_renderHosts($sPhase)
. '<br>' . '<br>'
. $this->_renderFiles($sPhase) . $this->_renderFiles($sPhase)
. '</td>'; ;
$sRow2.=$renderAdminLTE->addCol(
$renderAdminLTE->getCard(array (
'class' => $sPhase,
'variant' => '',
'tb-remove' => 1,
'tb-collapse' => 1,
'title' => '',
'tools' => '',
'text' => $sDetails,
'footer' => '',
)),
$iWidth
);
} }
return '<table><thead><tr>' . $sRow1 . '</tr></thead><tbody><tr>' . $sRow2 . '</tr></tbody></table>'; return ''
.$renderAdminLTE->addRow($sRow1)
.$renderAdminLTE->addRow($sRow2)
;
} }
/** /**
...@@ -1654,6 +1679,9 @@ class projectgui extends project { ...@@ -1654,6 +1679,9 @@ class projectgui extends project {
*/ */
public function renderVisual() { public function renderVisual() {
$sReturn = ''; $sReturn = '';
$renderAdminLTE=new renderadminlte();
$sBarHeightBg = '1.0em'; $sBarHeightBg = '1.0em';
$sBarHeight = '0.8em'; $sBarHeight = '0.8em';
$sContinue = '<span style="font-size: 300%; color:#ace;">&raquo;&raquo;</span><br>'; $sContinue = '<span style="font-size: 300%; color:#ace;">&raquo;&raquo;</span><br>';
...@@ -1706,45 +1734,62 @@ class projectgui extends project { ...@@ -1706,45 +1734,62 @@ class projectgui extends project {
<div class="details">' . $sDetail . ' </div> <div class="details">' . $sDetail . ' </div>
</div>'; </div>';
} }
$sReturn = '
<div class="visualprocess">
<div class="process box">
<div class="title">' . t("versioncontrol") . '</div>
<div class="details">
' . $sRepoBar . '<br>
' . t("repositoryinfos") . '<br>
' // . $this->_aPrjConfig["build"]["type"]
. preg_replace('/.*\@(.*):.*/', '$1', $this->_aPrjConfig["build"]["url"])
. '<br>(<strong title="' . t('branch-select') . '">' . count($aBranches) . '</strong>)'
. '
</div>
</div>
<div class="process">
<div class="action">' . $sContinue . t("build-hint-overview") . '<br><br>' . ($this->canAcceptPhase() ? $this->renderLink("build") : '') . '</div>
</div>
$sReturn .= ''
<div class="process box"> . '<div class="visualprocess">'
<div class="title">' . $this->_oHtml->getIcon('package') . t("archive") . '</div> . $renderAdminLTE->addRow(
<div class="details"> ''
' . $sPackagebar . '<br> . $renderAdminLTE->addCol(
' . t("packages") . '<br> $renderAdminLTE->getCard([
(<strong>' . count($this->_getVersionUsage()) . '</strong>) 'type'=>'',
</div> 'variant'=>'outline',
</div> 'title'=>'',
'text'=> '<h3>'.t("versioncontrol"). '</h3>' . $sRepoBar . '<br>
<div class="process"> ' . t("repositoryinfos") . '<br>
<div class="action">'.$sContinue . sprintf(t("queue-hint-overview"), $this->getNextPhase()).'</div> ' // . $this->_aPrjConfig["build"]["type"]
</div> . preg_replace('/.*\@(.*):.*/', '$1', $this->_aPrjConfig["build"]["url"])
. '<br>(<strong title="' . t('branch-select') . '">' . count($aBranches) . '</strong>)',
<div class="process phases box"> ]
<div class="title">' . $this->_oHtml->getIcon('phase') . t("phases") . '</div> ), 2
' . ($sPhaseImg ? $sPhaseImg : '<div class="process">' . t("none") . '</div>') . ' )
</div> . $renderAdminLTE->addCol(
</div> '<div class="action">' . $sContinue . t("build-hint-overview") . '<br><br>' . ($this->canAcceptPhase() ? $this->renderLink("build") : '') . '</div>',
<div style="clear:both"></div> 1
'; )
. $renderAdminLTE->addCol(
$renderAdminLTE->getCard([
'type'=>'',
'variant'=>'outline',
'title'=>'',
'text'=> '<h3>'.$this->_oHtml->getIcon('package') . t("archive"). '</h3>'
. '<div class="archive">'
. '<div class="details">'
. $sPackagebar . '<br>'
. '</div>'
. t("packages") . '<br>'
.'(<strong>' . count($this->_getVersionUsage()) . '</strong>)'
. '</div>'
]
), 2
)
. $renderAdminLTE->addCol(
'<div class="action">'.$sContinue . sprintf(t("queue-hint-overview"), $this->getNextPhase()).'</div>',
1
)
. $renderAdminLTE->addCol(
$renderAdminLTE->getCard([
'type'=>'',
'variant'=>'outline',
'title'=>'',
'text'=> '<h3>'.$this->_oHtml->getIcon('phase') . t("phases"). '</h3>'
. ($sPhaseImg ? $sPhaseImg : '<div class="process">' . t("none") . '</div>')
]
), 6
)
)
.'</div>'
;
return $sReturn; return $sReturn;
} }
......
...@@ -621,15 +621,20 @@ input[type="checkbox"]:checked+label { ...@@ -621,15 +621,20 @@ input[type="checkbox"]:checked+label {
/* ----- visualized process ----- */ /* ----- visualized process ----- */
.visualprocess { .visualprocess {
float: left;
margin: 2em 0 1em; margin: 2em 0 1em;
} }
.visualprocess .archive {
text-align: center;
padding: 0 0 5px;
min-width: 7em;
}
.visualprocess .process { .visualprocess .process {
float: left; float: left;
text-align: center; text-align: center;
padding: 0 0 5px; padding: 0 0 5px;
min-width: 5em; min-width: 7em;
} }
.visualprocess .process.box { .visualprocess .process.box {
...@@ -641,6 +646,7 @@ input[type="checkbox"]:checked+label { ...@@ -641,6 +646,7 @@ input[type="checkbox"]:checked+label {
.visualprocess .action { .visualprocess .action {
float: left; float: left;
text-align: center;
padding: 0em 1em 1em 1em; padding: 0em 1em 1em 1em;
background: #fff; background: #fff;
} }
...@@ -652,8 +658,9 @@ input[type="checkbox"]:checked+label { ...@@ -652,8 +658,9 @@ input[type="checkbox"]:checked+label {
color: #aaa; color: #aaa;
} }
.visualprocess .archive .details span ,
.visualprocess .process .details span {border-right: 3px solid #fff;} .visualprocess .process .details span {border-right: 3px solid #fff;}
.visualprocess div.card{ min-height: 20em; }
/* ----- replacemets with templates ----- */ /* ----- replacemets with templates ----- */
span.replace { span.replace {
......
...@@ -64,4 +64,7 @@ a.topbrand small { ...@@ -64,4 +64,7 @@ a.topbrand small {
/* fix width of input fields */ /* fix width of input fields */
.form-control { .form-control {
max-width: 100%; max-width: 100%;
} }
\ No newline at end of file
table.nomargin{ margin: 0; border: none; width: 100%;}
table.nomargin th {padding: 0.3em;}
\ No newline at end of file
...@@ -72,6 +72,8 @@ if (!array_key_exists("prj", $aParams)) { ...@@ -72,6 +72,8 @@ if (!array_key_exists("prj", $aParams)) {
$sListOfBranches='<h4>'.t('branch-select').'</h4><ol>'.$sListOfBranches.'</ol>'; $sListOfBranches='<h4>'.t('branch-select').'</h4><ol>'.$sListOfBranches.'</ol>';
} }
// --- generate tabs:
$aTabdata=[]; $aTabdata=[];
$aTabdata[$oHtml->getIcon('workflow') . t("way-of-packages")] = $oPrj->renderVisual(); $aTabdata[$oHtml->getIcon('workflow') . t("way-of-packages")] = $oPrj->renderVisual();
if($iCountOfBuildErrors){ if($iCountOfBuildErrors){
...@@ -90,10 +92,11 @@ if (!array_key_exists("prj", $aParams)) { ...@@ -90,10 +92,11 @@ if (!array_key_exists("prj", $aParams)) {
} }
$sOut = '' $sOut = ''
.'<h3>'.t('overview-label').' '.$oPrj->renderLink("setup").'</h3>' .'<h3>'.t('overview-label').'&nbsp;&nbsp;&nbsp;'.$oPrj->renderLink("setup").'</h3><br>'
.$renderAdminLTE->getTabbedContent(['tabs'=>$aTabdata]) .$renderAdminLTE->getTabbedContent(['tabs'=>$aTabdata])
; ;
/*
$sPhaselinks=''; $sPhaselinks='';
$sLastPhase = ''; $sLastPhase = '';
foreach($oPrj->getActivePhases() as $sPhase){ foreach($oPrj->getActivePhases() as $sPhase){
...@@ -103,6 +106,9 @@ if (!array_key_exists("prj", $aParams)) { ...@@ -103,6 +106,9 @@ if (!array_key_exists("prj", $aParams)) {
; ;
$sLastPhase = $sPhase; $sLastPhase = $sPhase;
} }
*/
$BODY= $BODY=
$renderAdminLTE->addRow( $renderAdminLTE->addRow(
$renderAdminLTE->addCol( $renderAdminLTE->addCol(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment