diff --git a/module/bug/control.php b/module/bug/control.php index 9b89aeb762..138a47f04d 100644 --- a/module/bug/control.php +++ b/module/bug/control.php @@ -54,7 +54,7 @@ class bug extends control $projectID = $this->session->project; $products = $this->loadModel('project')->getProducts($projectID, false); } - else if($this->app->openApp == 'execution') + elseif($this->app->openApp == 'execution') { $products = $this->loadModel('execution')->getProducts($this->session->execution, false); } @@ -62,9 +62,10 @@ class bug extends control { $products = $this->product->getPairs(); } - $this->view->products = $this->products = $products; - if(empty($this->products)) die($this->locate($this->createLink('product', 'showErrorNone', "moduleName={$this->app->openApp}&activeMenu=bug&projectID=$projectID"))); + $this->view->products = $this->products = $products; + $openApp = ($this->app->openApp == 'project' or $this->app->openApp == 'execution') ? $this->app->openApp : 'qa'; + if(empty($this->products)) die($this->locate($this->createLink('product', 'showErrorNone', "moduleName=$openApp&activeMenu=bug&projectID=$projectID"))); } /** diff --git a/module/program/view/project.html.php b/module/program/view/project.html.php index d9d5192046..6abb22e1a5 100644 --- a/module/program/view/project.html.php +++ b/module/program/view/project.html.php @@ -31,7 +31,7 @@ js::set('browseType', $browseType);
config->maxVersion)):?> - ' . $lang->program->create, '', 'class="btn btn-primary" data-toggle="modal" data-target="#guideDialog"');?> + ' . $lang->project->create, '', 'class="btn btn-primary" data-toggle="modal" data-target="#guideDialog"');?> config->systemMode == 'new'):?> ' . $lang->project->create, '', 'class="btn btn-primary"');?> @@ -44,7 +44,7 @@ js::set('browseType', $browseType);

project->empty;?> config->maxVersion)):?> - ' . $lang->project->create, '', 'class="btn btn-info btn-wide " data-toggle="modal" data-target="#guideDialog"');?> + ' . $lang->project->create, '', 'class="btn btn-info btn-wide " data-toggle="modal" data-target="#guideDialog"');?> config->systemMode == 'new'):?> ' . $lang->project->create, '', 'class="btn btn-info btn-wide"');?> diff --git a/module/project/model.php b/module/project/model.php index 0c7dae2bcd..76f51dab37 100644 --- a/module/project/model.php +++ b/module/project/model.php @@ -261,8 +261,8 @@ class projectModel extends model $teams = $this->dao->select('root, count(*) as teams')->from(TABLE_TEAM)->where('root')->in($projectIdList)->groupBy('root')->fetchPairs(); $hours = $this->dao->select('project, - cast(sum(consumed) as decimal(10,2)) as consumed, - cast(sum(estimate) as decimal(10,2)) as estimate') + sum(consumed) as consumed, + sum(estimate) as estimate') ->from(TABLE_TASK) ->where('project')->in($projectIdList) ->andWhere('deleted')->eq(0) @@ -293,8 +293,8 @@ class projectModel extends model foreach($projects as $projectID => $project) { - $project->consumed = isset($hours[$projectID]) ? $hours[$projectID]->consumed : 0; - $project->estimate = isset($hours[$projectID]) ? $hours[$projectID]->estimate : 0; + $project->consumed = isset($hours[$projectID]) ? (float)$hours[$projectID]->consumed : 0; + $project->estimate = isset($hours[$projectID]) ? (float)$hours[$projectID]->estimate : 0; $project->teamCount = isset($teams[$projectID]) ? $teams[$projectID] : 0; $project->leftTasks = isset($leftTasks[$projectID]) ? $leftTasks[$projectID] : 0; $project->leftBugs = isset($leftBugs[$projectID]) ? $leftBugs[$projectID] : 0; @@ -303,6 +303,9 @@ class projectModel extends model $project->allStories = $allStories[$projectID]; $project->doneStories = $doneStories[$projectID]; $project->leftStories = $leftStories[$projectID]; + + if(is_float($project->consumed)) $project->consumed = round($project->consumed, 1); + if(is_float($project->estimate)) $project->estimate = round($project->estimate, 1); } return $projects; diff --git a/module/search/view/index.html.php b/module/search/view/index.html.php index d8db9e44d4..a0edb58275 100644 --- a/module/search/view/index.html.php +++ b/module/search/view/index.html.php @@ -35,7 +35,7 @@ adjustMenuWidth();

- url . (strpos($object->url, '?') !== false ? '&onlybody=yes' : '?onlybody=yes'), "" . $lang->search->preview, '', "class='iframe' data-width='90%' data-title=\"$lang->preview\"")?> + url . (strpos($object->url, '?') !== false ? '&onlybody=yes' : '?onlybody=yes'), $lang->search->preview, '', "class='iframe' data-width='90%'")?>

session->project; $products = $this->loadModel('project')->getProducts($projectID, false); } - if($this->app->openApp == 'execution') $products = $this->loadModel('execution')->getProducts($this->session->execution, false); - if($this->app->openApp == 'qa' or $this->app->openApp == 'my' or $this->app->openApp == 'product') $products = $this->product->getPairs(); + elseif($this->app->openApp == 'execution') + { + $products = $this->loadModel('execution')->getProducts($this->session->execution, false); + } + else + { + $products = $this->product->getPairs(); + } + $this->view->products = $this->products = $products; - if(empty($this->products)) die($this->locate($this->createLink('product', 'showErrorNone', "moduleName={$this->app->openApp}&activeMenu=testcase&projectID=$projectID"))); + $openApp = ($this->app->openApp == 'project' or $this->app->openApp == 'execution') ? $this->app->openApp : 'qa'; + if(empty($this->products)) die($this->locate($this->createLink('product', 'showErrorNone', "moduleName=$openApp&activeMenu=testcase&projectID=$projectID"))); } /** diff --git a/module/testreport/control.php b/module/testreport/control.php index 9aae880b1d..24077c8665 100644 --- a/module/testreport/control.php +++ b/module/testreport/control.php @@ -45,22 +45,24 @@ class testreport extends control $this->app->loadLang('report'); /* Get product data. */ - $objectID = 0; + $projectID = 0; if($this->app->openApp == 'project') { - $objectID = $this->session->project; - $products = $this->loadModel('project')->getProducts($objectID, false); + $projectID = $this->session->project; + $products = $this->loadModel('project')->getProducts($projectID, false); } - - if($this->app->openApp == 'execution') + elseif($this->app->openApp == 'execution') { - $objectID = $this->session->execution; - $products = $this->loadModel('execution')->getProducts($objectID, false); + $products = $this->loadModel('execution')->getProducts($this->session->execution, false); + } + else + { + $products = $this->product->getPairs(); } - if($this->app->openApp == 'qa' or $this->app->openApp == 'my') $products = $this->loadModel('product')->getPairs(); $this->view->products = $this->products = $products; - if(empty($this->products)) die($this->locate($this->createLink('product', 'showErrorNone', "moduleName={$this->app->openApp}&activeMenu=testreport&objectID=$objectID"))); + $openApp = ($this->app->openApp == 'project' or $this->app->openApp == 'execution') ? $this->app->openApp : 'qa'; + if(empty($this->products)) die($this->locate($this->createLink('product', 'showErrorNone', "moduleName=$openApp&activeMenu=testreport&projectID=$projectID"))); } /** diff --git a/module/testtask/control.php b/module/testtask/control.php index ea9f607912..b5fd585ce2 100644 --- a/module/testtask/control.php +++ b/module/testtask/control.php @@ -46,10 +46,18 @@ class testtask extends control $projectID = $this->session->project; $products = $this->loadModel('project')->getProducts($projectID, false); } - if($this->app->openApp == 'execution') $products = $this->loadModel('execution')->getProducts($this->session->execution, false); - if($this->app->openApp == 'qa' or $this->app->openApp == 'my') $products = $this->product->getPairs(); + elseif($this->app->openApp == 'execution') + { + $products = $this->loadModel('execution')->getProducts($this->session->execution, false); + } + else + { + $products = $this->product->getPairs(); + } + $this->view->products = $this->products = $products; - if(empty($this->products)) die($this->locate($this->createLink('product', 'showErrorNone', "moduleName={$this->app->openApp}&activeMenu=testtask&projectID=$projectID"))); + $openApp = ($this->app->openApp == 'project' or $this->app->openApp == 'execution') ? $this->app->openApp : 'qa'; + if(empty($this->products)) die($this->locate($this->createLink('product', 'showErrorNone', "moduleName=$openApp&activeMenu=testtask&projectID=$projectID"))); } /** diff --git a/module/user/css/profile.css b/module/user/css/profile.css index 8c8afd024b..26e159866b 100644 --- a/module/user/css/profile.css +++ b/module/user/css/profile.css @@ -4,7 +4,7 @@ .row td {width: 33%; text-align: left; font-weight: 700;} .main-actions {margin: 20px 0 20px 0; text-align: center;} .user-title {margin: 10px 10px -10px 10px; font-size: 14px; font-weight: bold; padding-left: 10px;} -.avatar {display: inline-block; width: 50px; height: 50px; line-height: 50px;} +.cell .avatar {display: inline-block; width: 50px; height: 50px; line-height: 50px;} .user-name {margin-left: 15px; font-weight: bold;} .user-name, .user-role {font-size: 16px; vertical-align: top; line-height: 50px;} .line {border-top: 1px solid #eee; margin: 10px;}