diff --git a/module/my/control.php b/module/my/control.php
index 000b87e273..7a99609c65 100644
--- a/module/my/control.php
+++ b/module/my/control.php
@@ -842,14 +842,16 @@ class my extends control
die(js::locate($this->createLink('my', 'index'), 'parent'));
}
- $this->view->title = $this->lang->my->common . $this->lang->colon . $this->lang->my->preference;
- $this->view->position[] = $this->lang->my->preference;
+ $this->view->title = $this->lang->my->common . $this->lang->colon . $this->lang->my->preference;
+ $this->view->position[] = $this->lang->my->preference;
+
$this->view->URSRList = $this->loadModel('custom')->getURSRPairs();
$this->view->URSR = isset($this->config->URSR) ? $this->config->URSR : $this->setting->getItem('owner=system&module=custom&key=URSR');
$this->view->programLink = isset($this->config->programLink) ? $this->config->programLink : 'program-pgmbrowse';
$this->view->productLink = isset($this->config->productLink) ? $this->config->productLink : 'product-all';
$this->view->projectLink = isset($this->config->projectLink) ? $this->config->projectLink : 'program-prjbrowse';
$this->view->preferenceSetted = isset($this->config->preferenceSetted) ? true : false;
+
$this->display();
}
diff --git a/module/my/css/profile.css b/module/my/css/profile.css
index b5bb959391..2503e3d1e5 100644
--- a/module/my/css/profile.css
+++ b/module/my/css/profile.css
@@ -1,13 +1,13 @@
-.body-modal .main-header{padding: 13px 0px 0px 0;}
-.row{height: 340px;}
-.row table{width: 100%; margin-top: 5px;}
-table+table{border-top: 1px solid #eee;}
-.row th{width: 17%; line-height: 30px; padding-right: 20px; text-align: right; font-weight: 500;}
-.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;}
-#avatarForm{width: 100%; height: 100%;}
-.avatar .btn-avatar{padding: 0;vertical-align: revert; border: 0; background-color: auto; color: #fff; font-size: 20px;}
-.user-name{margin-left: 15px; font-weight: bold;}
-.user-name, .user-role{line-height: 50px; font-size: 16px; vertical-align: top;}
+.body-modal .main-header {padding: 13px 0px 0px 0;}
+.row {height: 340px;}
+.row table {width: 100%; margin-top: 5px;}
+table+table {border-top: 1px solid #eee;}
+.row th {width: 17%; line-height: 30px; padding-right: 20px; text-align: right; font-weight: 500;}
+.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;}
+#avatarForm {width: 100%; height: 100%;}
+.avatar .btn-avatar {padding: 0;vertical-align: revert; border: 0; background-color: auto; color: #fff; font-size: 20px;}
+.user-name {margin-left: 15px; font-weight: bold;}
+.user-name, .user-role {line-height: 50px; font-size: 16px; vertical-align: top;}
diff --git a/module/product/control.php b/module/product/control.php
index c4bb95f238..c0ad2a19f5 100644
--- a/module/product/control.php
+++ b/module/product/control.php
@@ -799,18 +799,16 @@ class product extends control
$this->app->loadClass('pager', $static = true);
$pager = new pager(0, 30, 1);
- $this->executeHooks($productID);
-
$this->view->title = $product->name . $this->lang->colon . $this->lang->product->view;
$this->view->position[] = html::a($this->createLink($this->moduleName, 'browse'), $product->name);
$this->view->position[] = $this->lang->product->view;
- $this->view->product = $product;
- $this->view->actions = $this->loadModel('action')->getList('product', $productID);
- $this->view->users = $this->user->getPairs('noletter');
- $this->view->lines = array('') + $this->product->getLinePairs();
- $this->view->dynamics = $this->loadModel('action')->getDynamic('all', 'all', 'date_desc', $pager, $productID);
- $this->view->roadmaps = $this->product->getRoadmap($productID, 0, 6);
+ $this->view->product = $product;
+ $this->view->actions = $this->loadModel('action')->getList('product', $productID);
+ $this->view->users = $this->user->getPairs('noletter');
+ $this->view->lines = array('') + $this->product->getLinePairs();
+ $this->view->dynamics = $this->action->getDynamic('all', 'all', 'date_desc', $pager, $productID);
+ $this->view->roadmaps = $this->product->getRoadmap($productID, 0, 6);
$this->display();
}
diff --git a/module/product/css/view.css b/module/product/css/view.css
index 170e1050d8..0ff2225fa2 100644
--- a/module/product/css/view.css
+++ b/module/product/css/view.css
@@ -1,5 +1,5 @@
.branch-list {padding-left: 0; margin: 0;}
.branch-list > li {float: left; list-style: none; width: 50%; margin: 5px 0;}
.data-basic.table-data tbody > tr > th {width: 100px;}
-.col-12 .cell table td{word-wrap: break-word; word-break: normal;}
+.col-12 .cell table td {word-wrap: break-word; word-break: normal;}
.row > .col-sm-12:first-child {padding-bottom: 20px;}
diff --git a/module/product/model.php b/module/product/model.php
index 44aeb5b9ce..38f1dc9629 100644
--- a/module/product/model.php
+++ b/module/product/model.php
@@ -459,8 +459,9 @@ class productModel extends model
$currentProductName = $currentProduct->name;
}
- $fromModule = $this->lang->navGroup->qa == 'qa' ? 'qa' : '';
+ $fromModule = $this->lang->navGroup->qa == 'qa' ? 'qa' : '';
$dropMenuLink = helper::createLink('product', 'ajaxGetDropMenu', "objectID=$productID&module=$currentModule&method=$currentMethod&extra=$extra&from=$fromModule");
+
$output = "
";
diff --git a/module/product/view/edit.html.php b/module/product/view/edit.html.php
index 1682e30fbe..e82e5fab62 100644
--- a/module/product/view/edit.html.php
+++ b/module/product/view/edit.html.php
@@ -18,7 +18,7 @@
diff --git a/module/productplan/view/browse.html.php b/module/productplan/view/browse.html.php
index f2a0de8e24..4dbe278e22 100644
--- a/module/productplan/view/browse.html.php
+++ b/module/productplan/view/browse.html.php
@@ -60,9 +60,9 @@
productplan->begin);?> |
productplan->end);?> |
-
productplan->stories;?> |
-
productplan->bugs;?> |
-
productplan->hour;?> |
+
productplan->stories;?> |
+
productplan->bugs;?> |
+
productplan->hour;?> |
productplan->execution;?> |
productplan->desc;?> |
program->datatable->fieldList['PRJName']['width'] = 'auto';
$config->program->datatable->fieldList['PRJName']['required'] = 'yes';
$config->program->datatable->fieldList['PRJName']['sort'] = 'no';
-//$config->program->datatable->fieldList['PRJProgram']['title'] = 'common';
-//$config->program->datatable->fieldList['PRJProgram']['fixed'] = 'left';
-//$config->program->datatable->fieldList['PRJProgram']['width'] = '140';
-//$config->program->datatable->fieldList['PRJProgram']['required'] = 'no';
-//$config->program->datatable->fieldList['PRJProgram']['sort'] = 'no';
-
$config->program->datatable->fieldList['PM']['title'] = 'PM';
$config->program->datatable->fieldList['PM']['fixed'] = 'no';
$config->program->datatable->fieldList['PM']['width'] = '80';
diff --git a/module/program/control.php b/module/program/control.php
index a14256563b..c94b7a5c44 100644
--- a/module/program/control.php
+++ b/module/program/control.php
@@ -460,8 +460,6 @@ class program extends control
*/
public function PGMStakeholder($programID = 0, $orderBy = 't1.id_desc', $recTotal = 0, $recPerPage = 15, $pageID = 1)
{
- $this->loadModel('user');
- $this->app->loadLang('user');
$this->lang->navGroup->program = 'program';
$this->lang->program->switcherMenu = $this->program->getPGMSwitcher($programID, true);
$this->lang->program->mainMenuAction = $this->program->getPGMMainAction();
@@ -1009,11 +1007,11 @@ class program extends control
$parentProgram = $this->program->getPGMByID($programID);
/* If the story of the product which linked the project, you don't allow to remove the product. */
- $notRemoveProducts = array();
+ $unmodifiableProducts = array();
foreach($linkedProducts as $productID => $linkedProduct)
{
$projectStories = $this->dao->select('*')->from(TABLE_PROJECTSTORY)->where('project')->eq($projectID)->andWhere('product')->eq($productID)->fetchAll('story');
- if(!empty($projectStories)) array_push($notRemoveProducts, $productID);
+ if(!empty($projectStories)) array_push($unmodifiableProducts, $productID);
}
foreach($linkedProducts as $product)
@@ -1038,7 +1036,7 @@ class program extends control
$this->view->allProducts = array('0' => '') + $allProducts;
$this->view->productPlans = $productPlans;
$this->view->linkedProducts = $linkedProducts;
- $this->view->notRemoveProducts = $notRemoveProducts;
+ $this->view->unmodifiableProducts = $unmodifiableProducts;
$this->view->branchGroups = $this->loadModel('branch')->getByProducts(array_keys($linkedProducts), '', $linkedBranches);
$this->view->URSRPairs = $this->loadModel('custom')->getURSRPairs();
$this->view->from = $from;
@@ -1093,8 +1091,8 @@ class program extends control
foreach($projects as $project) $appendPMUsers[$project->PM] = $project->PM;
- $this->view->title = $this->lang->program->batchEdit;
- $this->view->position[] = $this->lang->program->batchEdit;
+ $this->view->title = $this->lang->program->batchEdit;
+ $this->view->position[] = $this->lang->program->batchEdit;
$this->view->projectIdList = $projectIdList;
$this->view->projects = $projects;
@@ -1803,11 +1801,11 @@ class program extends control
$linkedBranches = array();
/* If the story of the product which linked the project, you don't allow to remove the product. */
- $notRemoveProducts = array();
+ $unmodifiableProducts = array();
foreach($linkedProducts as $productID => $linkedProduct)
{
$projectStories = $this->dao->select('*')->from(TABLE_PROJECTSTORY)->where('project')->eq($projectID)->andWhere('product')->eq($productID)->fetchAll('story');
- if(!empty($projectStories)) array_push($notRemoveProducts, $productID);
+ if(!empty($projectStories)) array_push($unmodifiableProducts, $productID);
}
/* Merge allProducts and linkedProducts for closed product. */
@@ -1822,7 +1820,7 @@ class program extends control
$this->view->position[] = $this->lang->project->manageProducts;
$this->view->allProducts = $allProducts;
$this->view->linkedProducts = $linkedProducts;
- $this->view->notRemoveProducts = $notRemoveProducts;
+ $this->view->unmodifiableProducts = $unmodifiableProducts;
$this->view->branchGroups = $this->loadModel('branch')->getByProducts(array_keys($allProducts), '', $linkedBranches);
$this->display();
diff --git a/module/program/css/common.css b/module/program/css/common.css
index 613a945348..0ec990860f 100644
--- a/module/program/css/common.css
+++ b/module/program/css/common.css
@@ -1,2 +1,2 @@
.future {display: inline-block}
-.c-number {overflow:hidden;text-align:right!important;text-overflow:ellipsis;white-space:nowrap}
+.c-number {overflow: hidden; text-align: right!important; text-overflow: ellipsis; white-space: nowrap;}
diff --git a/module/program/js/prjedit.js b/module/program/js/prjedit.js
index 5b45cdb4e4..3f97f538d6 100644
--- a/module/program/js/prjedit.js
+++ b/module/program/js/prjedit.js
@@ -25,7 +25,7 @@ $(function()
for(var i in data.message)
{
var product = data.message[i];
- $('#promptTable').append("
| " + product +" " + linkedProjectsTip +" |
");
+ $('#promptTable').append("
| " + product +" " + linkedProjectsTip +" |
");
for(var j in data.multiLinkedProjects)
{
if(i == j)
@@ -34,7 +34,7 @@ $(function()
for(k in data.multiLinkedProjects[j])
{
var project = data.multiLinkedProjects[j][k];
- html += "
" + project +"
";
+ html += "
" + project +"
";
}
$('#promptTable').append("
| " + html + " |
");
}
@@ -56,7 +56,7 @@ $(function()
/* If the story of the product which linked the execution under the project, you don't allow to remove the product. */
$("#productsBox select").each(function()
{
- var isExisted = $.inArray($(this).attr('data-last'), notRemoveProducts);
+ var isExisted = $.inArray($(this).attr('data-last'), unmodifiableProducts);
if(isExisted != -1)
{
$(this).prop('disabled', true).trigger("chosen:updated");
diff --git a/module/program/model.php b/module/program/model.php
index 57cfe0926b..2cc4237685 100644
--- a/module/program/model.php
+++ b/module/program/model.php
@@ -465,12 +465,13 @@ class programModel extends model
*/
public function getTopPGMByID($programID)
{
- $topPGM = 0;
- if(empty($programID)) return $topPGM;
+ if(empty($programID)) return 0;
$program = $this->getPGMByID($programID);
- if(!empty($program)) list($topPGM) = explode(',', trim($program->path, ','));
- return $topPGM;
+ if(empty($program)) return 0;
+
+ $path = explode(',', trim($program->path, ','));
+ return $path[0];
}
/**
diff --git a/module/program/view/prjbatchedit.html.php b/module/program/view/prjbatchedit.html.php
index f967ddf336..fb3913b3f4 100644
--- a/module/program/view/prjbatchedit.html.php
+++ b/module/program/view/prjbatchedit.html.php
@@ -22,9 +22,9 @@