* Product Kanban compatible with classic mode.
This commit is contained in:
@@ -1180,6 +1180,7 @@ class product extends control
|
||||
$this->view->projectList = $projectList;
|
||||
$this->view->projectProduct = $projectProduct;
|
||||
$this->view->latestExecutions = $projectLatestExecutions;
|
||||
$this->view->executionList = $executionList;
|
||||
$this->view->hourList = $hourList;
|
||||
$this->view->emptyHour = (object) array('totalEstimate' => 0, 'totalConsumed' => 0, 'totalLeft' => 0, 'progress' => 0);
|
||||
$this->view->releaseList = $releaseList;
|
||||
|
||||
@@ -68,14 +68,14 @@ function processKanbanData(key, programsData)
|
||||
{
|
||||
/* doing execution */
|
||||
items.doingExecution = [];
|
||||
var productProjects = projectProduct[productID];
|
||||
if(productProjects)
|
||||
var productExecutions = classicExecution[productID];
|
||||
if(productExecutions)
|
||||
{
|
||||
$.each(productProjects, function(projectID)
|
||||
console.log(productExecutions);
|
||||
$.each(productExecutions, function(executionID, execution)
|
||||
{
|
||||
var execution = latestExecutions[projectID];
|
||||
if(!execution || !execution.id) return;
|
||||
var executionItem = $.extend({}, execution, {id: 'execution-' + execution.id, _id: execution.id});
|
||||
var executionItem = $.extend({}, execution, {id: 'execution-' + executionID, _id: executionID});
|
||||
items.doingExecution.push(executionItem);
|
||||
});
|
||||
}
|
||||
@@ -115,7 +115,6 @@ function processKanbanData(key, programsData)
|
||||
*/
|
||||
function renderDoingProjectItem(item, $item)
|
||||
{
|
||||
console.log('renderDoingProjectItem', item);
|
||||
$item.removeClass('kanban-item').addClass('project-row clearfix').empty();
|
||||
|
||||
var $projectCol = $('<div class="project-col"></div>').appendTo($item);
|
||||
|
||||
@@ -132,15 +132,16 @@ $lang->product->unplan = 'Unplanned';
|
||||
$lang->product->viewByUser = 'By User';
|
||||
|
||||
/* Product Kanban. */
|
||||
$lang->product->myProduct = 'Products Ownedbyme';
|
||||
$lang->product->otherProduct = 'Other Products';
|
||||
$lang->product->unclosedProduct = 'Open Products';
|
||||
$lang->product->unexpiredPlan = 'Unexpired Plans';
|
||||
$lang->product->doing = 'Doing';
|
||||
$lang->product->doingProject = 'Ongoing Projects';
|
||||
$lang->product->doingExecution = 'Ongoing Executions';
|
||||
$lang->product->normalRelease = 'Normal Releases';
|
||||
$lang->product->emptyProgram = 'Independent Products';
|
||||
$lang->product->myProduct = 'Products Ownedbyme';
|
||||
$lang->product->otherProduct = 'Other Products';
|
||||
$lang->product->unclosedProduct = 'Open Products';
|
||||
$lang->product->unexpiredPlan = 'Unexpired Plans';
|
||||
$lang->product->doing = 'Doing';
|
||||
$lang->product->doingProject = 'Ongoing Projects';
|
||||
$lang->product->doingExecution = 'Ongoing Executions';
|
||||
$lang->product->doingClassicExecution = 'Ongoing ' . $lang->executionCommon;
|
||||
$lang->product->normalRelease = 'Normal Releases';
|
||||
$lang->product->emptyProgram = 'Independent Products';
|
||||
|
||||
$lang->product->allStory = 'All ';
|
||||
$lang->product->allProduct = 'All';
|
||||
|
||||
@@ -132,15 +132,16 @@ $lang->product->unplan = "未计划";
|
||||
$lang->product->viewByUser = '按用户查看';
|
||||
|
||||
/* Product Kanban. */
|
||||
$lang->product->myProduct = '我负责的产品';
|
||||
$lang->product->otherProduct = '其他产品';
|
||||
$lang->product->unclosedProduct = '未关闭的产品';
|
||||
$lang->product->unexpiredPlan = '未过期的计划';
|
||||
$lang->product->doing = '进行中';
|
||||
$lang->product->doingProject = '进行中的项目';
|
||||
$lang->product->doingExecution = '进行中的执行';
|
||||
$lang->product->normalRelease = '正常的发布';
|
||||
$lang->product->emptyProgram = '无项目集归属产品';
|
||||
$lang->product->myProduct = '我负责的' . $lang->productCommon;
|
||||
$lang->product->otherProduct = '其他' . $lang->productCommon;
|
||||
$lang->product->unclosedProduct = '未关闭的' . $lang->productCommon;
|
||||
$lang->product->unexpiredPlan = '未过期的计划';
|
||||
$lang->product->doing = '进行中';
|
||||
$lang->product->doingProject = '进行中的项目';
|
||||
$lang->product->doingExecution = '进行中的执行';
|
||||
$lang->product->doingClassicExecution = '进行中的' . $lang->executionCommon;
|
||||
$lang->product->normalRelease = '正常的发布';
|
||||
$lang->product->emptyProgram = '无项目集归属产品';
|
||||
|
||||
$lang->product->allStory = '所有';
|
||||
$lang->product->allProduct = '全部' . $lang->productCommon;
|
||||
|
||||
@@ -132,15 +132,16 @@ $lang->product->unplan = "未計劃";
|
||||
$lang->product->viewByUser = '按用戶查看';
|
||||
|
||||
/* Product Kanban. */
|
||||
$lang->product->myProduct = '我負責的產品';
|
||||
$lang->product->otherProduct = '其他產品';
|
||||
$lang->product->unclosedProduct = '未關閉的產品';
|
||||
$lang->product->unexpiredPlan = '未過期的計劃';
|
||||
$lang->product->doing = '進行中';
|
||||
$lang->product->doingProject = '進行中的項目';
|
||||
$lang->product->doingExecution = '進行中的執行';
|
||||
$lang->product->normalRelease = '正常的發布';
|
||||
$lang->product->emptyProgram = '無項目集歸屬產品';
|
||||
$lang->product->myProduct = '我負責的產品';
|
||||
$lang->product->otherProduct = '其他產品';
|
||||
$lang->product->unclosedProduct = '未關閉的產品';
|
||||
$lang->product->unexpiredPlan = '未過期的計劃';
|
||||
$lang->product->doing = '進行中';
|
||||
$lang->product->doingProject = '進行中的項目';
|
||||
$lang->product->doingExecution = '進行中的執行';
|
||||
$lang->product->doingClassicExecution = '進行中的' . $lang->executionCommon;
|
||||
$lang->product->normalRelease = '正常的發布';
|
||||
$lang->product->emptyProgram = '無項目集歸屬產品';
|
||||
|
||||
$lang->product->allStory = '所有';
|
||||
$lang->product->allProduct = '全部' . $lang->productCommon;
|
||||
|
||||
@@ -1526,7 +1526,7 @@ class productModel extends model
|
||||
* Get stats for product kanban.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
* @return array
|
||||
*/
|
||||
public function getStats4Kanban()
|
||||
{
|
||||
@@ -1571,8 +1571,19 @@ class productModel extends model
|
||||
{
|
||||
foreach($executionList as $projectID => $executions)
|
||||
{
|
||||
/* Used to computer execution progress. */
|
||||
$latestExecutionList[key($executions)] = current($executions);
|
||||
$projectLatestExecutions[$projectID] = current($executions);
|
||||
|
||||
/* Used for display in page. */
|
||||
$projectLatestExecutions[$projectID] = current($executions);
|
||||
}
|
||||
}
|
||||
|
||||
if($this->config->systemMode == 'classic')
|
||||
{
|
||||
foreach($executionList as $productID => $executions)
|
||||
{
|
||||
foreach($executions as $executionID => $execution) $latestExecutionList[$executionID] = $execution;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ if($config->systemMode == 'new')
|
||||
}
|
||||
else
|
||||
{
|
||||
$kanbanColumns['doingExecution'] = array('name' => $lang->product->doing, 'type' => 'doingExecution');
|
||||
$kanbanColumns['doingExecution'] = array('name' => $lang->product->doingClassicExecution, 'type' => 'doingExecution');
|
||||
}
|
||||
$kanbanColumns['normalRelease'] = array('name' => $lang->product->normalRelease, 'type' => 'normalRelease');
|
||||
$userPrivs = array();
|
||||
@@ -57,6 +57,7 @@ js::set('planList', $planList);
|
||||
js::set('projectList', $projectList);
|
||||
js::set('projectProduct', $projectProduct);
|
||||
js::set('latestExecutions', $latestExecutions);
|
||||
js::set('classicExecution', $executionList);
|
||||
js::set('releaseList', $releaseList);
|
||||
js::set('hourList', $hourList);
|
||||
js::set('doingText', $lang->product->doing);
|
||||
|
||||
Reference in New Issue
Block a user