From f08756df8c2f10fffd7488dfc951f67165d26481 Mon Sep 17 00:00:00 2001
From: hahn <hahn@AAE49.campus.unibe.ch>
Date: Mon, 28 Apr 2014 14:09:02 +0200
Subject: [PATCH] - project overview page:   - scrolling   - no detail button  
 - smaller folder image - Scroll to top of page - delete project: red button -
 removed builld and cleanup from menu - Action-Log with AJAX request and form
 class

---
 public_html/deployment/classes/actionlog.class.php |  6 +++++-
 public_html/deployment/classes/project.class.php   | 12 +++++++++---
 public_html/deployment/js/functions.js             |  2 +-
 3 files changed, 15 insertions(+), 5 deletions(-)

diff --git a/public_html/deployment/classes/actionlog.class.php b/public_html/deployment/classes/actionlog.class.php
index 7e04996f..f7176c8a 100644
--- a/public_html/deployment/classes/actionlog.class.php
+++ b/public_html/deployment/classes/actionlog.class.php
@@ -281,7 +281,11 @@ class Actionlog {
                 <div id="tableLogactions"></div>
                 </div>';
 
-        if (!$bIsFullsearch){
+        if ($bIsFullsearch){
+            $sReturn.='<script>$(document).ready(function() {
+                            updateActionlog();
+                        });</script>';
+        } else {
 
             $sReturn= '<strong>'
                 . '<button onclick="setLogVisibility(\'block\');"  id="btnShowLogs" class="btnLogs"><b class="icon-chevron-right"></b> </button>'
diff --git a/public_html/deployment/classes/project.class.php b/public_html/deployment/classes/project.class.php
index 493fdd66..ff99cabf 100644
--- a/public_html/deployment/classes/project.class.php
+++ b/public_html/deployment/classes/project.class.php
@@ -750,7 +750,7 @@ class project {
 
     /**
      * check: is the deployment to the next phase enabled for this phase?
-     * @param type $sPhase
+     * @param type $sPhase  current phase
      */
     public function canAcceptPhase($sPhase = false) {
 
@@ -777,9 +777,9 @@ class project {
         // array key "ok" must be in the ready2install and deployed info
         if (
                 array_key_exists($sPhase, $this->_aData["phases"]) && array_key_exists("onhold", $this->_aData["phases"][$sPhase]) && array_key_exists("ready2install", $this->_aData["phases"][$sPhase]) && array_key_exists("deployed", $this->_aData["phases"][$sPhase]) && array_key_exists("ok", $this->_aData["phases"][$sPhase]["onhold"]) && array_key_exists("ok", $this->_aData["phases"][$sPhase]["ready2install"]) && array_key_exists("ok", $this->_aData["phases"][$sPhase]["deployed"])
-        )
+        ){
             return true;
-
+        }
         return false;
     }
 
@@ -810,6 +810,10 @@ class project {
         return $this->_aData["phases"]["source"];
     }
     
+    /**
+     * init version control system (git, ...)
+     * @return vcs-object
+     */
     private function _initVcs(){
         if (!$this->_oVcs) {
             if (!$this->_aPrjConfig["build"]["type"]){
@@ -2137,6 +2141,8 @@ class project {
         $aRepodata = $this->getRepoRevision();
         if (array_key_exists("revision", $aRepodata)) {
             $sRepoBar=$this->_getChecksumDiv($aRepodata["revision"]);
+        } else {
+            $sRepoBar='<span class="error">' . t("error") . '</span>';
         }
         
         $sPackagebar='';
diff --git a/public_html/deployment/js/functions.js b/public_html/deployment/js/functions.js
index 486ee5dd..22560c73 100644
--- a/public_html/deployment/js/functions.js
+++ b/public_html/deployment/js/functions.js
@@ -87,7 +87,7 @@ function updateActionlog(){
                 sHead+='<th>'+aTableitems[j]+'</th>';
             }
             sHead='<thead><tr>'+sHead+'</tr></thead>';
-            sHtml='<table class="table">'+sHead+'<tbody>'+sHtml+'</tbody></table>';
+            sHtml='<table class="table table-condensed">'+sHead+'<tbody>'+sHtml+'</tbody></table>';
         }
         $('#tableLogactions').html(sHtml);
         filterLogTable();
-- 
GitLab