* Finish task #43393.
This commit is contained in:
@@ -24,6 +24,7 @@ $lang->null = '空';
|
||||
$lang->ellipsis = '…';
|
||||
$lang->percent = '%';
|
||||
$lang->dash = '-';
|
||||
$lang->create = '新建';
|
||||
|
||||
$lang->zentaoPMS = '禅道';
|
||||
$lang->pmsName = '开源版';
|
||||
|
||||
@@ -1825,12 +1825,12 @@ class execution extends control
|
||||
* Kanban.
|
||||
*
|
||||
* @param int $executionID
|
||||
* @param string $type
|
||||
* @param string $browseType story|bug|task|all
|
||||
* @param string $orderBy
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function kanban($executionID, $type = 'story', $orderBy = 'order_asc')
|
||||
public function kanban($executionID, $browseType = 'all', $orderBy = 'order_asc')
|
||||
{
|
||||
/* Save to session. */
|
||||
$uri = $this->app->getURI(true);
|
||||
@@ -1840,11 +1840,11 @@ class execution extends control
|
||||
/* Compatibility IE8. */
|
||||
if(strpos($this->server->http_user_agent, 'MSIE 8.0') !== false) header("X-UA-Compatible: IE=EmulateIE7");
|
||||
|
||||
$kanbanGroup = $this->loadModel('kanban')->getExecutionKanban($executionID);
|
||||
$kanbanGroup = $this->loadModel('kanban')->getExecutionKanban($executionID, $browseType);
|
||||
if(empty($kanbanGroup))
|
||||
{
|
||||
$this->kanban->createLanes($executionID);
|
||||
$kanbanGroup = $this->kanban->getExecutionKanban($executionID);
|
||||
$kanbanGroup = $this->kanban->getExecutionKanban($executionID, $browseType);
|
||||
}
|
||||
|
||||
$this->execution->setMenu($executionID);
|
||||
@@ -1877,7 +1877,7 @@ class execution extends control
|
||||
$this->view->browseType = '';
|
||||
$this->view->kanbanGroup = $kanbanGroup;
|
||||
$this->view->execution = $execution;
|
||||
$this->view->type = $type;
|
||||
$this->view->browseType = $browseType;
|
||||
$this->view->canBeChanged = $canBeChanged;
|
||||
|
||||
$this->display();
|
||||
|
||||
@@ -1,3 +1,9 @@
|
||||
function changeView(view)
|
||||
{
|
||||
var link = createLink('execution', 'kanban', "executionID=" + executionID + '&type=' + view);
|
||||
location.href = link;
|
||||
}
|
||||
|
||||
/**
|
||||
* Render user avatar
|
||||
* @param {String|{account: string, avatar: string}} user User account or user object
|
||||
@@ -335,11 +341,11 @@ $(function()
|
||||
};
|
||||
|
||||
/* Create story kanban 创建需求看板 */
|
||||
createKanban('story', kanbanGroup.story, commonOptions);
|
||||
if(browseType == 'all' || browseType == 'story') createKanban('story', kanbanGroup.story, commonOptions);
|
||||
|
||||
/* Create bug kanban 创建 Bug 看板 */
|
||||
createKanban('bug', kanbanGroup.bug, commonOptions);
|
||||
if(browseType == 'all' || browseType == 'bug') createKanban('bug', kanbanGroup.bug, commonOptions);
|
||||
|
||||
/* Create task kanban 创建 任务 看板 */
|
||||
createKanban('task', kanbanGroup.task, commonOptions);
|
||||
if(browseType == 'all' || browseType == 'task') createKanban('task', kanbanGroup.task, commonOptions);
|
||||
});
|
||||
|
||||
@@ -386,6 +386,11 @@ $lang->execution->kanbanHideCols = '看板隐藏已关闭、已取消列';
|
||||
$lang->execution->kanbanShowOption = '显示折叠信息';
|
||||
$lang->execution->kanbanColsColor = '看板列自定义颜色';
|
||||
|
||||
$lang->execution->kanbanViewList['all'] = '综合看板';
|
||||
$lang->execution->kanbanViewList['story'] = "{$lang->SRCommon}看板";
|
||||
$lang->execution->kanbanViewList['bug'] = 'Bug看板';
|
||||
$lang->execution->kanbanViewList['task'] = '任务看板';
|
||||
|
||||
$lang->kanbanSetting = new stdclass();
|
||||
$lang->kanbanSetting->noticeReset = '是否恢复看板默认设置?';
|
||||
$lang->kanbanSetting->optionList['0'] = '隐藏';
|
||||
|
||||
@@ -12,6 +12,9 @@
|
||||
<?php include '../../common/view/kanban.html.php';?>
|
||||
|
||||
<div id='mainMenu' class='clearfix'>
|
||||
<div class='btn-toolbar pull-left'>
|
||||
<div class="input-control space w-150px"><?php echo html::select('view', $lang->execution->kanbanViewList, $browseType, "onchange='changeView(this.value)' class='form-control chosen'");?></div>
|
||||
</div>
|
||||
<div class='btn-toolbar pull-right'>
|
||||
<?php
|
||||
$link = $this->createLink('task', 'export', "execution=$executionID&orderBy=$orderBy&type=kanban");
|
||||
@@ -104,4 +107,5 @@
|
||||
</div>
|
||||
<?php js::set('executionID', $executionID);?>
|
||||
<?php js::set('kanbanGroup', $kanbanGroup);?>
|
||||
<?php js::set('browseType', $browseType);?>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
|
||||
@@ -17,16 +17,16 @@ class kanbanModel extends model
|
||||
* Get Kanban by execution id.
|
||||
*
|
||||
* @param int $executionID
|
||||
* @param string $objectType all|story|bug|task
|
||||
* @param string $browseType all|story|bug|task
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getExecutionKanban($executionID, $objectType = 'all')
|
||||
public function getExecutionKanban($executionID, $browseType = 'all')
|
||||
{
|
||||
$lanes = $this->dao->select('*')->from(TABLE_KANBANLANE)
|
||||
->where('execution')->eq($executionID)
|
||||
->andWhere('deleted')->eq(0)
|
||||
->beginIF($objectType != 'all')->andWhere('type')->eq($objectType)
|
||||
->beginIF($browseType != 'all')->andWhere('type')->eq($browseType)
|
||||
->fetchAll('id');
|
||||
|
||||
if(empty($lanes)) return array();
|
||||
@@ -44,9 +44,9 @@ class kanbanModel extends model
|
||||
->fetchPairs('id', 'type');
|
||||
|
||||
/* Get group objects. */
|
||||
$objectGroup['story'] = $this->loadModel('story')->getExecutionStories($executionID);
|
||||
$objectGroup['bug'] = $this->loadModel('bug')->getExecutionBugs($executionID);
|
||||
$objectGroup['task'] = $this->loadModel('execution')->getKanbanTasks($executionID, "id");
|
||||
if($browseType == 'all' or $browseType == 'story') $objectGroup['story'] = $this->loadModel('story')->getExecutionStories($executionID);
|
||||
if($browseType == 'all' or $browseType == 'bug') $objectGroup['bug'] = $this->loadModel('bug')->getExecutionBugs($executionID);
|
||||
if($browseType == 'all' or $browseType == 'task') $objectGroup['task'] = $this->loadModel('execution')->getKanbanTasks($executionID, "id");
|
||||
|
||||
/* Build kanban group data. */
|
||||
$kanbanGroup = array();
|
||||
|
||||
Reference in New Issue
Block a user