* Add new block set method and more link.
This commit is contained in:
+132
-27
@@ -59,6 +59,8 @@ class blockModel extends model
|
||||
unset($_SESSION['album'][$uid]);
|
||||
}
|
||||
|
||||
if(strpos($data->block, 'cmmi') !== false) $data->type = 'cmmi';
|
||||
if(strpos($data->block, 'scrum') !== false) $data->type = 'scrum';
|
||||
$data->params = helper::jsonEncode($data->params);
|
||||
$this->dao->replace(TABLE_BLOCK)->data($data)->exec();
|
||||
if(!dao::isError()) $this->loadModel('score')->create('block', 'set');
|
||||
@@ -129,11 +131,12 @@ class blockModel extends model
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function getBlockList($module = 'my')
|
||||
public function getBlockList($module = 'my', $type = '')
|
||||
{
|
||||
$blocks = $this->dao->select('*')->from(TABLE_BLOCK)->where('account')->eq($this->app->user->account)
|
||||
->andWhere('module')->eq($module)
|
||||
->andWhere('hidden')->eq(0)
|
||||
->beginIF($type)->andWhere('type')->eq($type)->fi()
|
||||
->beginIF($this->config->global->flow == 'onlyStory')->andWhere('source')->notin('project,qa')->fi()
|
||||
->beginIF($this->config->global->flow == 'onlyTask')->andWhere('source')->notin('product,qa')->fi()
|
||||
->beginIF($this->config->global->flow == 'onlyTest')->andWhere('source')->notin('product,project')->fi()
|
||||
@@ -233,6 +236,7 @@ class blockModel extends model
|
||||
{
|
||||
$block['order'] = $index;
|
||||
$block['module'] = $module;
|
||||
$block['type'] = $type;
|
||||
$block['account'] = $account;
|
||||
$block['params'] = isset($block['params']) ? helper::jsonEncode($block['params']) : '';
|
||||
if(!isset($block['source'])) $block['source'] = $module;
|
||||
@@ -446,6 +450,26 @@ class blockModel extends model
|
||||
return json_encode($params);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get program params.
|
||||
*
|
||||
* @access public
|
||||
* @return json
|
||||
*/
|
||||
public function getProgramParams()
|
||||
{
|
||||
$this->app->loadLang('program');
|
||||
$params->type['name'] = $this->lang->block->type;
|
||||
$params->type['options'] = $this->lang->program->featureBar;
|
||||
$params->type['control'] = 'select';
|
||||
|
||||
$params->orderBy['name'] = $this->lang->block->orderBy;
|
||||
$params->orderBy['options'] = $this->lang->block->orderByList->product;
|
||||
$params->orderBy['control'] = 'select';
|
||||
|
||||
return json_encode($this->onlyNumParams($params));
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Build params.
|
||||
*
|
||||
@@ -547,6 +571,17 @@ class blockModel extends model
|
||||
return json_encode($params);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get recent program pararms.
|
||||
*
|
||||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
public function getRecentprogramParams()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get product overview pararms.
|
||||
*
|
||||
@@ -558,6 +593,102 @@ class blockModel extends model
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get cmmi program report pararms.
|
||||
*
|
||||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
public function getCmmireportParams()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get program estimate pararms.
|
||||
*
|
||||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
public function getCmmiestimateParams()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get program gantt pararms.
|
||||
*
|
||||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
public function getCmmiganttParams()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get program progress pararms.
|
||||
*
|
||||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
public function getCmmiprogressParams()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get cmmi issue params.
|
||||
*
|
||||
* @param string $module
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function getCmmiissueParams($module = '')
|
||||
{
|
||||
$this->app->loadLang('issue');
|
||||
$params = new stdclass();
|
||||
$params->type['name'] = $this->lang->block->type;
|
||||
$params->type['options'] = $this->lang->issue->labelList;
|
||||
$params->type['control'] = 'select';
|
||||
|
||||
$params->num['name'] = $this->lang->block->num;
|
||||
$params->num['default'] = 20;
|
||||
$params->num['control'] = 'input';
|
||||
|
||||
$params->orderBy['name'] = $this->lang->block->orderBy;
|
||||
$params->orderBy['options'] = $this->lang->block->orderByList->product;
|
||||
$params->orderBy['control'] = 'select';
|
||||
|
||||
return json_encode($params);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get cmmi risk params.
|
||||
*
|
||||
* @param string $module▫
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function getCmmiriskParams($module = '')
|
||||
{
|
||||
$this->app->loadLang('risk');
|
||||
$params = new stdclass();
|
||||
$params->type['name'] = $this->lang->block->type;
|
||||
$params->type['options'] = $this->lang->risk->featureBar['browse'];
|
||||
$params->type['control'] = 'select';
|
||||
|
||||
$params->num['name'] = $this->lang->block->num;
|
||||
$params->num['default'] = 20;
|
||||
$params->num['control'] = 'input';
|
||||
|
||||
$params->orderBy['name'] = $this->lang->block->orderBy;
|
||||
$params->orderBy['options'] = $this->lang->block->orderByList->product;
|
||||
$params->orderBy['control'] = 'select';
|
||||
|
||||
return json_encode($params);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get project params.
|
||||
*
|
||||
@@ -713,32 +844,6 @@ class blockModel extends model
|
||||
return $key == $hash;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get cmmi issue params.
|
||||
*
|
||||
* @param string $module▫
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function getCmmiissueParams($module = '')
|
||||
{
|
||||
$this->app->loadLang('issue');
|
||||
$params = new stdclass();
|
||||
$params->type['name'] = $this->lang->block->type;
|
||||
$params->type['options'] = $this->lang->issue->labelList;
|
||||
$params->type['control'] = 'select';
|
||||
|
||||
$params->num['name'] = $this->lang->block->num;
|
||||
$params->num['default'] = 20;
|
||||
$params->num['control'] = 'input';
|
||||
|
||||
$params->orderBy['name'] = $this->lang->block->orderBy;
|
||||
$params->orderBy['options'] = $this->lang->block->orderByList->product;
|
||||
$params->orderBy['control'] = 'select';
|
||||
|
||||
return json_encode($params);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get testtask params.
|
||||
*▫
|
||||
|
||||
Reference in New Issue
Block a user