Merge branch 'master' of https://git.zcorp.cc/zentaopms
This commit is contained in:
+19
-18
@@ -3,9 +3,9 @@
|
||||
* The view file of datatable module of ZenTaoPMS.
|
||||
*
|
||||
* @copyright Copyright 2014-2014 青岛易软天创网络科技有限公司 (QingDao Nature Easy Soft Network Technology Co,LTD www.cnezsoft.com)
|
||||
* @license business(商业软件)
|
||||
* @license business(商业软件)
|
||||
* @author Hao sun <sunhao@cnezsoft.com>
|
||||
* @package datatable
|
||||
* @package datatable
|
||||
* @version $Id$
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
@@ -15,8 +15,8 @@ class datatableModel extends model
|
||||
{
|
||||
/**
|
||||
* Get field list.
|
||||
*
|
||||
* @param string $module
|
||||
*
|
||||
* @param string $module
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
@@ -41,7 +41,7 @@ class datatableModel extends model
|
||||
$fields = $this->loadModel('workflowfield')->getList($module);
|
||||
foreach($fields as $field)
|
||||
{
|
||||
if($field->buildin) continue;
|
||||
if($field->buildin) continue;
|
||||
$this->config->$module->datatable->fieldList[$field->field]['title'] = $field->name;
|
||||
$this->config->$module->datatable->fieldList[$field->field]['width'] = '120';
|
||||
$this->config->$module->datatable->fieldList[$field->field]['fixed'] = 'no';
|
||||
@@ -119,12 +119,12 @@ class datatableModel extends model
|
||||
|
||||
/**
|
||||
* Sort cols.
|
||||
*
|
||||
* @param int $a
|
||||
* @param int $b
|
||||
*
|
||||
* @param int $a
|
||||
* @param int $b
|
||||
* @static
|
||||
* @access public
|
||||
* @return void
|
||||
* @return int
|
||||
*/
|
||||
public static function sortCols($a, $b)
|
||||
{
|
||||
@@ -134,10 +134,11 @@ class datatableModel extends model
|
||||
|
||||
/**
|
||||
* Print table head.
|
||||
*
|
||||
* @param object $col
|
||||
* @param string $orderBy
|
||||
* @param string $vars
|
||||
*
|
||||
* @param object $col
|
||||
* @param string $orderBy
|
||||
* @param string $vars
|
||||
* @param bool $checkBox
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
@@ -173,11 +174,11 @@ class datatableModel extends model
|
||||
}
|
||||
|
||||
/**
|
||||
* Set fixed field width
|
||||
*
|
||||
* @param object $setting
|
||||
* @param int $minLeftWidth
|
||||
* @param int $minRightWidth
|
||||
* Set fixed field width
|
||||
*
|
||||
* @param object $setting
|
||||
* @param int $minLeftWidth
|
||||
* @param int $minRightWidth
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
|
||||
@@ -190,7 +190,7 @@ class issueModel extends model
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getUserIssuePairs($account, $limit = 10, $status = 'all')
|
||||
public function getUserIssuePairs($account, $limit = 0, $status = 'all')
|
||||
{
|
||||
$stmt = $this->dao->select('t1.id, t1.title, t2.name as project')
|
||||
->from(TABLE_ISSUE)->alias('t1')
|
||||
@@ -198,7 +198,7 @@ class issueModel extends model
|
||||
->where('t1.assignedTo')->eq($account)
|
||||
->andWhere('t1.deleted')->eq(0)
|
||||
->beginIF($status != 'all')->andWhere('t1.status')->in($status)->fi()
|
||||
->limit($limit)
|
||||
->beginIF($limit)->limit($limit)->fi()
|
||||
->query();
|
||||
|
||||
$issues = array();
|
||||
|
||||
@@ -68,7 +68,7 @@
|
||||
<button type='button' class='btn icon-caret-down dropdown-toggle' data-toggle='dropdown' title="<?php echo $this->lang->more;?>"></button>
|
||||
<ul class='dropdown-menu pull-right text-center' role='menu'>
|
||||
<?php common::printIcon('program', 'PRJSuspend', "projectID=$project->id", $project, 'list', 'pause', '', 'iframe', true);?>
|
||||
<?php if($project->status != 'doing') common::printIcon('program', 'PRJClose', "projectID=$project->id", $project, 'list', 'off', '', 'iframe', true);?>
|
||||
<?php if($project->status != 'doing') common::printIcon('program', 'PRJClose', "projectID=$project->id", $project, 'list', 'off', '', 'iframe', true);?>
|
||||
<?php if($project->status != 'closed') common::printIcon('program', 'PRJActivate', "projectID=$project->id", $project, 'list', 'magic', '', 'iframe', true);?>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -264,7 +264,7 @@ class riskModel extends model
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getUserRiskPairs($account, $limit = 10, $status = 'all')
|
||||
public function getUserRiskPairs($account, $limit = 0, $status = 'all')
|
||||
{
|
||||
$stmt = $this->dao->select('t1.id, t1.name, t2.name as project')
|
||||
->from(TABLE_RISK)->alias('t1')
|
||||
@@ -272,7 +272,7 @@ class riskModel extends model
|
||||
->where('t1.assignedTo')->eq($account)
|
||||
->andWhere('t1.deleted')->eq(0)
|
||||
->beginIF($status != 'all')->andWhere('t1.status')->in($status)->fi()
|
||||
->limit($limit)
|
||||
->beginIF($limit)->limit($limit)->fi()
|
||||
->query();
|
||||
|
||||
$risks = array();
|
||||
|
||||
@@ -1089,7 +1089,7 @@ class testtaskModel extends model
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getUserTesttaskPairs($account, $limit = 10, $status = 'all', $skipProjectIDList = '')
|
||||
public function getUserTesttaskPairs($account, $limit = 0, $status = 'all', $skipProjectIDList = '')
|
||||
{
|
||||
$stmt = $this->dao->select('t1.id, t1.name, t2.name as project')
|
||||
->from(TABLE_TESTTASK)->alias('t1')
|
||||
@@ -1098,7 +1098,7 @@ class testtaskModel extends model
|
||||
->andWhere('t1.deleted')->eq(0)
|
||||
->beginIF($status != 'all')->andWhere('t1.status')->in($status)->fi()
|
||||
->beginIF(!empty($skipProjectIDList))->andWhere('t1.project')->notin($skipProjectIDList)->fi()
|
||||
->limit($limit)
|
||||
->beginIF($limit)->limit($limit)->fi()
|
||||
->query();
|
||||
|
||||
$testtaskPairs = array();
|
||||
|
||||
+21
-8
@@ -24,6 +24,7 @@ class todo extends control
|
||||
$this->loadModel('task');
|
||||
$this->loadModel('bug');
|
||||
$this->loadModel('my')->setMenu();
|
||||
if(!isset($this->config->qcVersion)) unset($this->lang->todo->typeList['review']);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -545,10 +546,15 @@ class todo extends control
|
||||
->orderBy($orderBy)->fetchAll('id');
|
||||
|
||||
/* Get users, bugs, tasks and times. */
|
||||
$users = $this->loadModel('user')->getPairs('noletter');
|
||||
$bugs = $this->loadModel('bug')->getUserBugPairs($account);
|
||||
$tasks = $this->loadModel('task')->getUserTaskPairs($account);
|
||||
$times = date::buildTimeList($this->config->todo->times->begin, $this->config->todo->times->end, $this->config->todo->times->delta);
|
||||
$users = $this->loadModel('user')->getPairs('noletter');
|
||||
$bugs = $this->loadModel('bug')->getUserBugPairs($account);
|
||||
$stories = $this->loadModel('story')->getUserStoryPairs($account, 100, 'story');
|
||||
$tasks = $this->loadModel('task')->getUserTaskPairs($account);
|
||||
$issues = $this->loadModel('issue')->getUserIssuePairs($account);
|
||||
$risks = $this->loadModel('risk')->getUserRiskPairs($account);
|
||||
$testTasks = $this->loadModel('testtask')->getUserTesttaskPairs($account);
|
||||
if(isset($this->config->qcVersion)) $reviews = $this->loadModel('review')->getUserReviewPairs($account, 0, 'wait');
|
||||
$times = date::buildTimeList($this->config->todo->times->begin, $this->config->todo->times->end, $this->config->todo->times->delta);
|
||||
|
||||
foreach($todos as $todo)
|
||||
{
|
||||
@@ -556,10 +562,17 @@ class todo extends control
|
||||
$todo->begin = $todo->begin == '2400' ? '' : (isset($times[$todo->begin]) ? $times[$todo->begin] : $todo->begin);
|
||||
$todo->end = $todo->end == '2400' ? '' : (isset($times[$todo->end]) ? $times[$todo->end] : $todo->end);
|
||||
|
||||
if(isset($users[$todo->account])) $todo->account = $users[$todo->account];
|
||||
if($todo->type == 'bug') $todo->name = isset($bugs[$todo->idvalue]) ? $bugs[$todo->idvalue] . "(#$todo->idvalue)" : '';
|
||||
if($todo->type == 'task') $todo->name = isset($tasks[$todo->idvalue]) ? $tasks[$todo->idvalue] . "(#$todo->idvalue)" : '';
|
||||
if(isset($todoLang->typeList[$todo->type])) $todo->type = $todoLang->typeList[$todo->type];
|
||||
$type = $todo->type;
|
||||
if(isset($users[$todo->account])) $todo->account = $users[$todo->account];
|
||||
if($type == 'bug') $todo->name = isset($bugs[$todo->idvalue]) ? $bugs[$todo->idvalue] . "(#$todo->idvalue)" : '';
|
||||
if($type == 'story') $todo->name = isset($stories[$todo->idvalue]) ? $stories[$todo->idvalue] . "(#$todo->idvalue)" : '';
|
||||
if($type == 'task') $todo->name = isset($tasks[$todo->idvalue]) ? $tasks[$todo->idvalue] . "(#$todo->idvalue)" : '';
|
||||
if($type == 'issue') $todo->name = isset($issues[$todo->idvalue]) ? $issues[$todo->idvalue] . "(#$todo->idvalue)" : '';
|
||||
if($type == 'risk') $todo->name = isset($risks[$todo->idvalue]) ? $risks[$todo->idvalue] . "(#$todo->idvalue)" : '';
|
||||
if($type == 'testtask') $todo->name = isset($testTasks[$todo->idvalue]) ? $testTasks[$todo->idvalue] . "(#$todo->idvalue)" : '';
|
||||
if($type == 'review' && isset($this->config->qcVersion)) $todo->name = isset($reviews[$todo->idvalue]) ? $reviews[$todo->idvalue] . "(#$todo->idvalue)" : '';
|
||||
|
||||
if(isset($todoLang->typeList[$type])) $todo->type = $todoLang->typeList[$type];
|
||||
if(isset($todoLang->priList[$todo->pri])) $todo->pri = $todoLang->priList[$todo->pri];
|
||||
if(isset($todoLang->statusList[$todo->status])) $todo->status = $todoLang->statusList[$todo->status];
|
||||
if($todo->private == 1) $todo->desc = $this->lang->todo->thisIsPrivate;
|
||||
|
||||
+1
-1
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user