From 58a6a2e4f9d370e97f11c9d53a8c3cd959d04c20 Mon Sep 17 00:00:00 2001 From: "Hahn Axel (hahn)" <axel.hahn@iml.unibe.ch> Date: Wed, 29 Mar 2017 10:52:32 +0200 Subject: [PATCH] optical refresh: colors, project overview with tabs --- hooks/templates/inc_projects_config.php.erb | 18 ++--- .../deployment/classes/project.class.php | 14 ++-- public_html/deployment/inc_functions.php | 2 +- public_html/deployment/main.css | 2 +- public_html/deployment/pages/act_overview.php | 69 +++++++++++-------- 5 files changed, 61 insertions(+), 44 deletions(-) diff --git a/hooks/templates/inc_projects_config.php.erb b/hooks/templates/inc_projects_config.php.erb index 46c8609d..580be45f 100644 --- a/hooks/templates/inc_projects_config.php.erb +++ b/hooks/templates/inc_projects_config.php.erb @@ -35,23 +35,23 @@ $aConfig = array( 'phases' => array( "preview" => array( 'css' => array( - 'bgdark' => 'background:#89a; color:#f8f8f8;', - 'bglight' => 'background:#e8e8f8; color:#333; background: rgba(180,180,230, 0.3);', - 'bgbutton' => 'background:#89a; color:#fcfcfc; border: 1px solid rgba(0,0,0,0.15);', + 'bgdark' => 'background:#50477C; color:#f8f8f8;', + 'bglight' => 'background:#f0e8FF; color:#333; background:rgba(210,200,220,0.3); ', + 'bgbutton' => 'background:#50477C; color:#fcfcfc; border: 1px solid rgba(0,0,0,0.15);', ), ), "stage" => array( 'css' => array( - 'bgdark' => 'background:#8aa; color:#f8f8f8;', - 'bglight' => 'background:#e4f8f8; color:#333; background: rgba(180,210,210, 0.3);', - 'bgbutton' => 'background:#8aa; color:#fcfcfc; border: 1px solid rgba(0,0,0,0.15);', + 'bgdark' => 'background:#3E92CC; color:#f8f8f8;', + 'bglight' => 'background:#e0f0FF; color:#333; background:rgba(170,180,220,0.2); ', + 'bgbutton' => 'background:#3E92CC; color:#fcfcfc; border: 1px solid rgba(0,0,0,0.15);', ), ), "live" => array( 'css' => array( - 'bgdark' => 'background:#8a8; color:#f8f8f8;', - 'bglight' => 'background:#e0f8e0; color:#333; background: rgba(180,250,180, 0.3);', - 'bgbutton' => 'background:#8a8; color:#fcfcfc; border: 1px solid rgba(0,0,0,0.15);', + 'bgdark' => 'background:#F26430; color:#f8f8f8;', + 'bglight' => 'background:#FFF0E0; color:#333; background:rgba(240,210,200,0.3); ', + 'bgbutton' => 'background:F26430; color:#fcfcfc; border: 1px solid rgba(0,0,0,0.15);', ), // wenn deploytimes existiert, dann wird nach dem Deploy das Paket // in einer Queue zurueckgehalten diff --git a/public_html/deployment/classes/project.class.php b/public_html/deployment/classes/project.class.php index 0e3ed265..69b648b2 100644 --- a/public_html/deployment/classes/project.class.php +++ b/public_html/deployment/classes/project.class.php @@ -2647,7 +2647,8 @@ class project extends base { foreach (array_keys($this->_aPlaces) as $sPlace) { $sFullbar.='<span title="' . $this->_aPlaces[$sPlace] . '" style="float: left; background:#eee; height: 3px; width:' . (100 / count($this->_aPlaces)) . '%">' . $this->_renderBar($sPhase, $sPlace) . ' </span>'; } - $sDetail = $sFullbar . '<br><a href="#h3phases" class="scroll-link">' . $sPhase . '</a>'; + // $sDetail = $sFullbar . '<br><a href="#h3phases" class="scroll-link">' . $sPhase . '</a>'; + $sDetail = $sFullbar . '<br>' . $sPhase; $sPhaseImg.=' <div class="process ' . $sPhase . '"> @@ -2662,7 +2663,10 @@ class project extends base { <div class="title">' . t("versioncontrol") . '</div> <div class="details"> ' . $sRepoBar . '<br> + <!-- <a href="#h3repo" class="scroll-link">' . t("repositoryinfos") . '</a><br> + --> + ' . t("repositoryinfos") . '<br> <strong> ' . $this->_aPrjConfig["build"]["type"] . '</strong> ' . preg_replace('/.*\@(.*):.*/', '($1)', $this->_aPrjConfig["build"]["url"]) . ': <strong title="' . t('branch-select') . '">' . count($this->getRemoteBranches()) . '</strong>' @@ -2682,7 +2686,10 @@ class project extends base { <div class="title">' . t("archive") . '</div> <div class="details"> ' . $sPackagebar . '<br> + <!-- <a href="#h3versions" class="scroll-link">' . t("packages") . '</a><br> + --> + ' . t("packages") . '<br> (<strong>' . count($this->_getVersionUsage()) . '</strong>) </div> <div><img src="/deployment/images/process/bg_archive.png" alt="' . t("archive") . '"></div> @@ -2698,11 +2705,6 @@ class project extends base { ' . ($sPhaseImg ? $sPhaseImg : '<div class="process">' . t("none") . '</div>') . ' </div> </div> - <div style="clear: both;"></div> - <hr> - <i class="icon icon-user"> </i> - <strong>' . t('contact') . '</strong>: ' . $this->_aPrjConfig['contact'] . '<br><br> - ' . $this->renderLink("setup") . ' '; return $sReturn; diff --git a/public_html/deployment/inc_functions.php b/public_html/deployment/inc_functions.php index 588e28f1..f73dc344 100644 --- a/public_html/deployment/inc_functions.php +++ b/public_html/deployment/inc_functions.php @@ -176,7 +176,7 @@ function getTopArea() { $sWikiBaseUrl = 'https://secure.iml.unibe.ch/wiki/doku.php'; $sReturn = ' <span id="top"></span> - <nav class="navbar navbar-default" role="navigation"> + <nav class="navbar navbar-inverse" role="navigation"> <div class="container-fluid"> <!-- Brand and toggle get grouped for better mobile display --> <div class="navbar-header"> diff --git a/public_html/deployment/main.css b/public_html/deployment/main.css index 0653462d..cb449eb2 100644 --- a/public_html/deployment/main.css +++ b/public_html/deployment/main.css @@ -28,7 +28,7 @@ body{padding-top: 0;} .description{font-weight:bold; color:#ccc; font-size: 150%; font-style: italic;} .navbar-brand {color:#a33 !important;} -.navbar-inverse .navbar-brand {color:#c88 !important;} +.navbar-inverse .navbar-brand {color:#c55 !important;} #swversion {float: right; right: 0em; position: fixed; top: 4em; padding: 0 0.5em; diff --git a/public_html/deployment/pages/act_overview.php b/public_html/deployment/pages/act_overview.php index 66bf174d..044d21ba 100644 --- a/public_html/deployment/pages/act_overview.php +++ b/public_html/deployment/pages/act_overview.php @@ -37,34 +37,49 @@ if (!array_key_exists("prj", $aParams)) { $sListOfBranches.='<li title="'.$aBranch['revision'].'">'.$aBranch['label'] . '</li>'; } $sListOfBranches.='</ol>'; - $sOut = '<h3 id="h3visual">' . t("way-of-packages") . '</h3> - ' . $oPrj->renderVisual() . ' - <div style="clear: both;"></div> - - - <h3 id="h3repo">' . t("repositoryinfos") . '</h3> - <div style="max-width: 40em;"> - ' . $oPrj->renderRepoInfo() . ' - ' . $sListOfBranches . ' - ' . ($oPrj->canAcceptPhase() ? '<br>'.$oPrj->renderLink("build") : '') . ' + $sOut = ' + + ' . $oPrj->renderLink("setup") . '<br> + <br> + + <ul class="nav nav-tabs"> + <li class="active"><a href="#tab1" data-toggle="tab">' . t("way-of-packages") . '</a></li> + <li><a href="#tab2" data-toggle="tab">' . t("repositoryinfos") . '</a></li> + <li><a href="#tab3" data-toggle="tab">' . t("packages") . '</a></li> + <li><a href="#tab4" data-toggle="tab">' . t('phases') . '</a></li> + </ul> + <br> + <div class="tab-content"> + <div class="tab-pane active" id="tab1"> + ' + . '<h3 id="h3visual">' . t("way-of-packages") . '</h3> + ' . $oPrj->renderVisual() . ' </div> - - <h3 id="h3versions">' . t("packages") . '</h3> - ' . $oPrj->renderVersionUsage(); - - if ($oPrj->getActivePhases()) { - $sOut.=' - <h3 id="h3phases">' . t("phases") . '</h3> - <p>' . t("page-overview-phase-infos") . '</p> - ' . $oPrj->renderPhaseInfo() . ' - '; - } else { - $sOut.='<h3 id="h3phases">' . t("phases") . '</h3>' - . $oPrj->getBox("info", t("page-overview-no-phase")) . - $oPrj->renderLink("setup"); - } - $sOut .= '<div style="clear: both"></div> + <div class="tab-pane" id="tab2"> + <h3 id="h3repo">' . t("repositoryinfos") . '</h3> + <div style="max-width: 40em;"> + ' . $oPrj->renderRepoInfo() . ' + ' . $sListOfBranches . ' + ' . ($oPrj->canAcceptPhase() ? '<br>'.$oPrj->renderLink("build") : '') . ' + </div> + </div> + + <div class="tab-pane" id="tab3"> + <h3 id="h3versions">' . t("packages") . '</h3> + ' . $oPrj->renderVersionUsage() .' + + </div> + <div class="tab-pane" id="tab4"> + + <h3 id="h3phases">' . t("phases") . '</h3> + '.($oPrj->getActivePhases() + ? '<p>' . t("page-overview-phase-infos") . '</p>' . $oPrj->renderPhaseInfo() + : $oPrj->getBox("info", t("page-overview-no-phase")) .$oPrj->renderLink("setup") + ).' + </div> + </div> + <div style="clear: both"></div> <div id="navbuttom">' . aGotop() . aHome() . '</div>'; } // -echo $sOut; \ No newline at end of file +echo $sOut; -- GitLab