* Adjust block module code.

This commit is contained in:
leiyong
2021-03-09 12:30:23 +08:00
parent 44b04fbe18
commit 86b18553a7
21 changed files with 533 additions and 531 deletions
+1
View File
@@ -396,6 +396,7 @@ class actionModel extends model
}
elseif(($actionName == 'opened' or $actionName == 'managed' or $actionName == 'edited') and ($objectType == 'execution' || $objectType == 'project'))
{
$this->app->loadLang('executon');
$linkedProducts = $this->dao->select('id,name')->from(TABLE_PRODUCT)->where('id')->in($action->extra)->fetchPairs('id', 'name');
$action->extra = '';
if($linkedProducts)
+31 -25
View File
@@ -213,17 +213,17 @@ class block extends control
$blocks = $this->block->getBlockList($module, $type);
$commonField = 'common';
if($module == 'program')
if($module == 'project')
{
$program = $this->loadModel('project')->getByID($this->session->project);
$commonField = $program->model . 'common';
$project = $this->loadModel('project')->getByID($this->session->project);
$commonField = $project->model . 'common';
}
/* Replace the block Title saved in the database. */
if($module == 'project')
if($module == 'execution')
{
$projectBlock = array();
foreach($this->lang->block->default['project'] as $block) $projectBlock[$block['block']] = $block['title'];
foreach($this->lang->block->default['execution'] as $block) $projectBlock[$block['block']] = $block['title'];
foreach($blocks as $block) $block->title = $projectBlock[$block->block];
}
@@ -245,7 +245,7 @@ class block extends control
continue;
}
$block->params = json_decode($block->params);
$block->params = json_decode($block->params);
if(isset($block->params->num) and !isset($block->params->count)) $block->params->count = $block->params->num;
$blockID = $block->block;
@@ -436,17 +436,17 @@ class block extends control
$dashboard = $this->get->dashboard;
/* Create a project block. */
if($dashboard == 'program')
if($dashboard == 'project')
{
$project = $this->loadModel('project')->getByID($this->session->project);
$model = $project->model;
}
/* Edit a project block. */
if($id and $block->module == 'program')
if($id and $block->module == 'project')
{
$model = $block->type;
$dashboard = 'program';
$dashboard = 'project';
}
$blocks = $this->block->getAvailableBlocks($module, $dashboard, $model);
@@ -757,7 +757,8 @@ class block extends control
{
$this->session->set('buildList', $this->app->getURI(true));
$this->app->loadLang('build');
$this->view->builds = $this->dao->select('t1.*, t2.name as productName')->from(TABLE_BUILD)->alias('t1')
$builds = $this->dao->select('t1.*, t2.name as productName')->from(TABLE_BUILD)->alias('t1')
->leftJoin(TABLE_PRODUCT)->alias('t2')->on('t1.product=t2.id')
->where('t1.deleted')->eq('0')
->beginIF(!$this->app->user->admin)->andWhere('t1.project')->in($this->app->user->view->projects)->fi()
@@ -765,6 +766,7 @@ class block extends control
->orderBy('t1.id desc')
->beginIF($this->viewType != 'json')->limit((int)$this->params->count)->fi()
->fetchAll();
$this->view->builds = $builds;
}
/**
@@ -773,9 +775,9 @@ class block extends control
* @access public
* @return void
*/
public function printProgramBlock()
public function printProjectBlock()
{
$this->app->loadLang('project');
$this->app->loadLang('execution');
$this->app->loadLang('task');
$count = isset($this->params->count) ? $this->params->count : 15;
$type = isset($this->params->type) ? $this->params->type : 'all';
@@ -833,7 +835,7 @@ class block extends control
* @access public
* @return void
*/
public function printProgramStatisticBlock()
public function printProjectStatisticBlock()
{
if(!empty($this->params->type) and preg_match('/[^a-zA-Z0-9_]/', $this->params->type)) die();
@@ -872,7 +874,7 @@ class block extends control
if($project->model == 'scrum')
{
$project->progress = $project->allStories == 0 ? 0 : round($project->doneStories / $project->allStories, 3) * 100;
$project->executions = $this->loadModel('execution')->getStats($projectID, 'all', 0, 0, 30, 'id_asc');
$project->executions = $this->project->getStats($projectID, 'all', 0, 0, 30, 'id_asc');
}
elseif($project->model == 'waterfall' and isset($this->config->maxVersion))
{
@@ -1034,7 +1036,7 @@ class block extends control
* @access public
* @return void
*/
public function printProjectStatisticBlock()
public function printExecutionStatisticBlock()
{
if(!empty($this->params->type) and preg_match('/[^a-zA-Z0-9_]/', $this->params->type)) die();
@@ -1305,6 +1307,7 @@ class block extends control
public function printScrumOverviewBlock()
{
$projectID = $this->session->project;
$this->app->loadLang('execution');
$totalData = $this->loadModel('project')->getOverviewList('byId', $projectID, 'id_desc', 1);
$this->view->totalData = $totalData;
@@ -1319,12 +1322,14 @@ class block extends control
*/
public function printScrumListBlock()
{
$this->app->loadClass('pager', $static = true);
if(!empty($this->params->type) and preg_match('/[^a-zA-Z0-9_]/', $this->params->type)) die();
$count = isset($this->params->count) ? (int)$this->params->count : 15;
$type = isset($this->params->type) ? $this->params->type : 'all';
$this->app->loadClass('pager', $static = true);
$pager = pager::init(0, $count, 1);
$this->view->executionStats = $this->loadModel('execution')->getStats($this->session->project, $type, 0, 0, 30, 'id_desc', $pager);
$this->app->loadLang('execution');
$this->view->executionStats = $this->loadModel('project')->getStats($this->session->project, $type, 0, 0, 30, 'id_desc', $pager);
}
/**
@@ -1394,15 +1399,15 @@ class block extends control
{
$projectID = $this->session->project;
$executions = $this->loadModel('project')->getExecutionPairs($projectID);
$executions = $this->loadModel('execution')->getPairs($projectID);
$products = $this->loadModel('product')->getProductPairsByProject($projectID);
$count = isset($this->params->count) ? (int)$this->params->count : 10;
$actions = array();
$actions = $this->dao->select('*')->from(TABLE_ACTION)
->where('project')->eq($projectID)
->beginIF(!empty($executions))->markLeft()->orWhere('project')->in(array_keys($executions))->fi()->markRight()
->beginIF(!empty($products))->markLeft()->orWhere('product')->in(array_keys($products))->fi()->markRight()
->where('objectType')->eq('project')
->andWhere('objectID')->eq($projectID)
->beginIF(!empty($executions))->markLeft()->orWhere('execution')->in(array_keys($executions))->fi()->markRight()
->orderBy('date_desc')
->limit($count)
->fetchAll();
@@ -1585,7 +1590,7 @@ class block extends control
* @access public
* @return void
*/
public function printProjectOverviewBlock()
public function printExecutionOverviewBlock()
{
$projectID = $this->view->block->module == 'my' ? 0 : (int)$this->session->project;
$executions = $this->loadModel('execution')->getList($projectID);
@@ -1649,7 +1654,7 @@ class block extends control
* @access public
* @return void
*/
public function printProjectBlock()
public function printExecutionBlock()
{
$this->app->loadClass('pager', $static = true);
if(!empty($this->params->type) and preg_match('/[^a-zA-Z0-9_]/', $this->params->type)) die();
@@ -1685,7 +1690,7 @@ class block extends control
$this->app->loadClass('date');
$this->app->loadLang('todo');
$stmt = $this->dao->select('*')->from(TABLE_TODO)
->where("(assignedTo = '{$this->app->user->account}' or (assignedTo = '' and account='{$this->app->user->account}'))")
->where("(assignedTo = '{$this->app->user->account}' or (account='{$this->app->user->account}'))")
->andWhere('cycle')->eq(0)
->orderBy('`date`');
if(isset($params->todoNum)) $stmt->limit($params->todoNum);
@@ -1708,6 +1713,7 @@ class block extends control
if(isset($hasViewPriv['task']))
{
$this->app->loadLang('task');
$this->app->loadLang('execution');
$stmt = $this->dao->select('*')->from(TABLE_TASK)
->where('assignedTo')->eq($this->app->user->account)
->andWhere('deleted')->eq('0')
@@ -1803,7 +1809,7 @@ class block extends control
* @access public
* @return void
*/
public function printProgramTeamBlock()
public function printProjectTeamBlock()
{
$count = isset($this->params->count) ? $this->params->count : 15;
$status = isset($this->params->type) ? $this->params->type : 'all';
+150 -151
View File
@@ -42,7 +42,7 @@ $lang->block->leftToday = '今天剩余工作总计';
$lang->block->myTask = '我的任务';
$lang->block->myStory = "我的{$lang->SRCommon}";
$lang->block->myBug = '我的BUG';
$lang->block->myProject = '未关闭的' . $lang->executionCommon;
$lang->block->myExecution = '未关闭的' . $lang->executionCommon;
$lang->block->myProduct = '未关闭的' . $lang->productCommon;
$lang->block->delayed = '已延期';
$lang->block->noData = '当前统计类型下暂无数据';
@@ -59,9 +59,9 @@ $lang->block->resolvedRisks = '解决的风险数';
$lang->block->createdIssues = '创建的问题数';
$lang->block->resolvedIssues = '解决的问题数';
$lang->block->createdDocs = '创建的文档数';
$lang->block->allProject = '所有' . $lang->executionCommon;
$lang->block->doingProject = '进行中的' . $lang->executionCommon;
$lang->block->finishProject = '累积' . $lang->executionCommon;
$lang->block->allExecution = '所有' . $lang->executionCommon;
$lang->block->doingExecution = '进行中的' . $lang->executionCommon;
$lang->block->finishExecution = '累积' . $lang->executionCommon;
$lang->block->estimatedHours = '预计';
$lang->block->consumedHours = '已消耗';
$lang->block->time = '第';
@@ -98,71 +98,71 @@ $lang->block->spent = '已花费';
$lang->block->budget = '预算';
$lang->block->left = '剩余';
$lang->block->default['waterfall']['program']['1']['title'] = '项目周报';
$lang->block->default['waterfall']['program']['1']['block'] = 'waterfallreport';
$lang->block->default['waterfall']['program']['1']['source'] = 'program';
$lang->block->default['waterfall']['program']['1']['grid'] = 8;
$lang->block->default['waterfall']['project']['1']['title'] = '项目周报';
$lang->block->default['waterfall']['project']['1']['block'] = 'waterfallreport';
$lang->block->default['waterfall']['project']['1']['source'] = 'project';
$lang->block->default['waterfall']['project']['1']['grid'] = 8;
$lang->block->default['waterfall']['program']['2']['title'] = '估算';
$lang->block->default['waterfall']['program']['2']['block'] = 'waterfallestimate';
$lang->block->default['waterfall']['program']['2']['source'] = 'program';
$lang->block->default['waterfall']['program']['2']['grid'] = 4;
$lang->block->default['waterfall']['project']['2']['title'] = '估算';
$lang->block->default['waterfall']['project']['2']['block'] = 'waterfallestimate';
$lang->block->default['waterfall']['project']['2']['source'] = 'project';
$lang->block->default['waterfall']['project']['2']['grid'] = 4;
$lang->block->default['waterfall']['program']['3']['title'] = "项目计划";
$lang->block->default['waterfall']['program']['3']['block'] = 'waterfallgantt';
$lang->block->default['waterfall']['program']['3']['source'] = 'program';
$lang->block->default['waterfall']['program']['3']['grid'] = 8;
$lang->block->default['waterfall']['project']['3']['title'] = "项目计划";
$lang->block->default['waterfall']['project']['3']['block'] = 'waterfallgantt';
$lang->block->default['waterfall']['project']['3']['source'] = 'project';
$lang->block->default['waterfall']['project']['3']['grid'] = 8;
$lang->block->default['waterfall']['program']['4']['title'] = '到目前为止项目进展趋势图';
$lang->block->default['waterfall']['program']['4']['block'] = 'waterfallprogress';
$lang->block->default['waterfall']['program']['4']['grid'] = 4;
$lang->block->default['waterfall']['project']['4']['title'] = '到目前为止项目进展趋势图';
$lang->block->default['waterfall']['project']['4']['block'] = 'waterfallprogress';
$lang->block->default['waterfall']['project']['4']['grid'] = 4;
$lang->block->default['waterfall']['program']['5']['title'] = '项目问题';
$lang->block->default['waterfall']['program']['5']['block'] = 'waterfallissue';
$lang->block->default['waterfall']['program']['5']['source'] = 'program';
$lang->block->default['waterfall']['program']['5']['grid'] = 8;
$lang->block->default['waterfall']['project']['5']['title'] = '项目问题';
$lang->block->default['waterfall']['project']['5']['block'] = 'waterfallissue';
$lang->block->default['waterfall']['project']['5']['source'] = 'project';
$lang->block->default['waterfall']['project']['5']['grid'] = 8;
$lang->block->default['waterfall']['program']['5']['params']['type'] = 'all';
$lang->block->default['waterfall']['program']['5']['params']['count'] = '15';
$lang->block->default['waterfall']['program']['5']['params']['orderBy'] = 'id_desc';
$lang->block->default['waterfall']['project']['5']['params']['type'] = 'all';
$lang->block->default['waterfall']['project']['5']['params']['count'] = '15';
$lang->block->default['waterfall']['project']['5']['params']['orderBy'] = 'id_desc';
$lang->block->default['waterfall']['program']['6']['title'] = '最新动态';
$lang->block->default['waterfall']['program']['6']['block'] = 'projectdynamic';
$lang->block->default['waterfall']['program']['6']['grid'] = 4;
$lang->block->default['waterfall']['program']['6']['source'] = 'program';
$lang->block->default['waterfall']['project']['6']['title'] = '最新动态';
$lang->block->default['waterfall']['project']['6']['block'] = 'projectdynamic';
$lang->block->default['waterfall']['project']['6']['grid'] = 4;
$lang->block->default['waterfall']['project']['6']['source'] = 'project';
$lang->block->default['waterfall']['program']['7']['title'] = '项目风险';
$lang->block->default['waterfall']['program']['7']['block'] = 'waterfallrisk';
$lang->block->default['waterfall']['program']['7']['source'] = 'program';
$lang->block->default['waterfall']['program']['7']['grid'] = 8;
$lang->block->default['waterfall']['project']['7']['title'] = '项目风险';
$lang->block->default['waterfall']['project']['7']['block'] = 'waterfallrisk';
$lang->block->default['waterfall']['project']['7']['source'] = 'project';
$lang->block->default['waterfall']['project']['7']['grid'] = 8;
$lang->block->default['waterfall']['program']['7']['params']['type'] = 'all';
$lang->block->default['waterfall']['program']['7']['params']['count'] = '15';
$lang->block->default['waterfall']['program']['7']['params']['orderBy'] = 'id_desc';
$lang->block->default['waterfall']['project']['7']['params']['type'] = 'all';
$lang->block->default['waterfall']['project']['7']['params']['count'] = '15';
$lang->block->default['waterfall']['project']['7']['params']['orderBy'] = 'id_desc';
$lang->block->default['scrum']['program']['1']['title'] = '项目整体情况';
$lang->block->default['scrum']['program']['1']['block'] = 'scrumoverview';
$lang->block->default['scrum']['program']['1']['grid'] = 8;
$lang->block->default['scrum']['project']['1']['title'] = '项目整体情况';
$lang->block->default['scrum']['project']['1']['block'] = 'scrumoverview';
$lang->block->default['scrum']['project']['1']['grid'] = 8;
$lang->block->default['scrum']['program']['2']['title'] = $lang->executionCommon . '列表';
$lang->block->default['scrum']['program']['2']['block'] = 'scrumlist';
$lang->block->default['scrum']['program']['2']['grid'] = 8;
$lang->block->default['scrum']['project']['2']['title'] = $lang->executionCommon . '列表';
$lang->block->default['scrum']['project']['2']['block'] = 'scrumlist';
$lang->block->default['scrum']['project']['2']['grid'] = 8;
$lang->block->default['scrum']['program']['3']['title'] = '待测版本';
$lang->block->default['scrum']['program']['3']['block'] = 'scrumtest';
$lang->block->default['scrum']['program']['3']['grid'] = 8;
$lang->block->default['scrum']['project']['3']['title'] = '待测版本';
$lang->block->default['scrum']['project']['3']['block'] = 'scrumtest';
$lang->block->default['scrum']['project']['3']['grid'] = 8;
$lang->block->default['scrum']['program']['3']['params']['type'] = 'wait';
$lang->block->default['scrum']['program']['3']['params']['count'] = '15';
$lang->block->default['scrum']['program']['3']['params']['orderBy'] = 'id_desc';
$lang->block->default['scrum']['project']['3']['params']['type'] = 'wait';
$lang->block->default['scrum']['project']['3']['params']['count'] = '15';
$lang->block->default['scrum']['project']['3']['params']['orderBy'] = 'id_desc';
$lang->block->default['scrum']['program']['4']['title'] = $lang->executionCommon . '总览';
$lang->block->default['scrum']['program']['4']['block'] = 'sprint';
$lang->block->default['scrum']['program']['4']['grid'] = 4;
$lang->block->default['scrum']['project']['4']['title'] = $lang->executionCommon . '总览';
$lang->block->default['scrum']['project']['4']['block'] = 'sprint';
$lang->block->default['scrum']['project']['4']['grid'] = 4;
$lang->block->default['scrum']['program']['5']['title'] = '最新动态';
$lang->block->default['scrum']['program']['5']['block'] = 'projectdynamic';
$lang->block->default['scrum']['program']['5']['grid'] = 4;
$lang->block->default['scrum']['project']['5']['title'] = '最新动态';
$lang->block->default['scrum']['project']['5']['block'] = 'projectdynamic';
$lang->block->default['scrum']['project']['5']['grid'] = 4;
$lang->block->default['product']['1']['title'] = $lang->productCommon . '统计';
$lang->block->default['product']['1']['block'] = 'statistic';
@@ -190,39 +190,39 @@ $lang->block->default['product']['4']['params']['count'] = 15;
$lang->block->default['product']['4']['params']['orderBy'] = 'id_desc';
$lang->block->default['product']['4']['params']['type'] = 'assignedTo';
$lang->block->default['project']['1']['title'] = $lang->executionCommon . '统计';
$lang->block->default['project']['1']['block'] = 'statistic';
$lang->block->default['project']['1']['grid'] = 8;
$lang->block->default['execution']['1']['title'] = $lang->executionCommon . '统计';
$lang->block->default['execution']['1']['block'] = 'statistic';
$lang->block->default['execution']['1']['grid'] = 8;
$lang->block->default['project']['1']['params']['type'] = 'all';
$lang->block->default['project']['1']['params']['count'] = '20';
$lang->block->default['execution']['1']['params']['type'] = 'all';
$lang->block->default['execution']['1']['params']['count'] = '20';
$lang->block->default['project']['2']['title'] = $lang->executionCommon . '总览';
$lang->block->default['project']['2']['block'] = 'overview';
$lang->block->default['project']['2']['grid'] = 4;
$lang->block->default['execution']['2']['title'] = $lang->executionCommon . '总览';
$lang->block->default['execution']['2']['block'] = 'overview';
$lang->block->default['execution']['2']['grid'] = 4;
$lang->block->default['project']['3']['title'] = '未关闭的' . $lang->executionCommon;
$lang->block->default['project']['3']['block'] = 'list';
$lang->block->default['project']['3']['grid'] = 8;
$lang->block->default['execution']['3']['title'] = '未关闭的' . $lang->executionCommon;
$lang->block->default['execution']['3']['block'] = 'list';
$lang->block->default['execution']['3']['grid'] = 8;
$lang->block->default['project']['3']['params']['count'] = 15;
$lang->block->default['project']['3']['params']['orderBy'] = 'id_desc';
$lang->block->default['project']['3']['params']['type'] = 'undone';
$lang->block->default['execution']['3']['params']['count'] = 15;
$lang->block->default['execution']['3']['params']['orderBy'] = 'id_desc';
$lang->block->default['execution']['3']['params']['type'] = 'undone';
$lang->block->default['project']['4']['title'] = '指派给我的任务';
$lang->block->default['project']['4']['block'] = 'task';
$lang->block->default['project']['4']['grid'] = 4;
$lang->block->default['execution']['4']['title'] = '指派给我的任务';
$lang->block->default['execution']['4']['block'] = 'task';
$lang->block->default['execution']['4']['grid'] = 4;
$lang->block->default['project']['4']['params']['count'] = 15;
$lang->block->default['project']['4']['params']['orderBy'] = 'id_desc';
$lang->block->default['project']['4']['params']['type'] = 'assignedTo';
$lang->block->default['execution']['4']['params']['count'] = 15;
$lang->block->default['execution']['4']['params']['orderBy'] = 'id_desc';
$lang->block->default['execution']['4']['params']['type'] = 'assignedTo';
$lang->block->default['project']['5']['title'] = '版本列表';
$lang->block->default['project']['5']['block'] = 'build';
$lang->block->default['project']['5']['grid'] = 8;
$lang->block->default['execution']['5']['title'] = '版本列表';
$lang->block->default['execution']['5']['block'] = 'build';
$lang->block->default['execution']['5']['grid'] = 8;
$lang->block->default['project']['5']['params']['count'] = 15;
$lang->block->default['project']['5']['params']['orderBy'] = 'id_desc';
$lang->block->default['execution']['5']['params']['count'] = 15;
$lang->block->default['execution']['5']['params']['orderBy'] = 'id_desc';
$lang->block->default['qa']['1']['title'] = '测试统计';
$lang->block->default['qa']['1']['block'] = 'statistic';
@@ -277,7 +277,7 @@ $lang->block->default['full']['my']['3']['params']['count'] = '20';
$lang->block->default['full']['my']['4']['title'] = '项目统计';
$lang->block->default['full']['my']['4']['block'] = 'statistic';
$lang->block->default['full']['my']['4']['source'] = 'program';
$lang->block->default['full']['my']['4']['source'] = 'project';
$lang->block->default['full']['my']['4']['grid'] = 8;
$lang->block->default['full']['my']['5']['title'] = '我的贡献';
@@ -287,7 +287,7 @@ $lang->block->default['full']['my']['5']['grid'] = 4;
$lang->block->default['full']['my']['6']['title'] = '我近期参与的项目';
$lang->block->default['full']['my']['6']['block'] = 'recentproject';
$lang->block->default['full']['my']['6']['source'] = 'program';
$lang->block->default['full']['my']['6']['source'] = 'project';
$lang->block->default['full']['my']['6']['grid'] = 8;
$lang->block->default['full']['my']['7']['title'] = '指派给我';
@@ -303,13 +303,13 @@ $lang->block->default['full']['my']['7']['params']['issueNum'] = '20';
$lang->block->default['full']['my']['7']['params']['storyNum'] = '20';
$lang->block->default['full']['my']['8']['title'] = '项目人力投入';
$lang->block->default['full']['my']['8']['block'] = 'programteam';
$lang->block->default['full']['my']['8']['source'] = 'program';
$lang->block->default['full']['my']['8']['block'] = 'projectteam';
$lang->block->default['full']['my']['8']['source'] = 'project';
$lang->block->default['full']['my']['8']['grid'] = 8;
$lang->block->default['full']['my']['9']['title'] = '项目列表';
$lang->block->default['full']['my']['9']['block'] = 'program';
$lang->block->default['full']['my']['9']['source'] = 'program';
$lang->block->default['full']['my']['9']['block'] = 'project';
$lang->block->default['full']['my']['9']['source'] = 'project';
$lang->block->default['full']['my']['9']['grid'] = 8;
$lang->block->default['full']['my']['9']['params']['orderBy'] = 'id_desc';
@@ -320,33 +320,32 @@ $lang->block->type = '类型';
$lang->block->orderBy = '排序';
$lang->block->availableBlocks = new stdclass();
$lang->block->availableBlocks->todo = '我的待办';
$lang->block->availableBlocks->task = '我的任务';
$lang->block->availableBlocks->bug = '我的Bug';
$lang->block->availableBlocks->case = '我的用例';
$lang->block->availableBlocks->story = "我的{$lang->SRCommon}";
$lang->block->availableBlocks->product = $lang->productCommon . '列表';
$lang->block->availableBlocks->execution = $lang->executionCommon . '列表';
$lang->block->availableBlocks->plan = "计划列表";
$lang->block->availableBlocks->release = '发布列表';
$lang->block->availableBlocks->build = '版本列表';
$lang->block->availableBlocks->testtask = '测试版本列表';
$lang->block->availableBlocks->risk = '我的风险';
$lang->block->availableBlocks->issue = '我的问题';
$lang->block->availableBlocks->todo = '我的待办';
$lang->block->availableBlocks->task = '我的任务';
$lang->block->availableBlocks->bug = '我的Bug';
$lang->block->availableBlocks->case = '我的用例';
$lang->block->availableBlocks->story = "我的{$lang->SRCommon}";
$lang->block->availableBlocks->product = $lang->productCommon . '列表';
$lang->block->availableBlocks->project = $lang->executionCommon . '列表';
$lang->block->availableBlocks->plan = "计划列表";
$lang->block->availableBlocks->release = '发布列表';
$lang->block->availableBlocks->build = '版本列表';
$lang->block->availableBlocks->testtask = '测试版本列表';
$lang->block->availableBlocks->risk = '我的风险';
$lang->block->availableBlocks->issue = '我的问题';
$lang->block->moduleList['project'] = '项目';
$lang->block->moduleList['product'] = $lang->productCommon;
$lang->block->moduleList['execution'] = $lang->executionCommon;
$lang->block->moduleList['qa'] = '测试';
$lang->block->moduleList['todo'] = '待办';
$lang->block->moduleList['program'] = '项目';
$lang->block->moduleList['product'] = $lang->productCommon;
$lang->block->moduleList['project'] = $lang->executionCommon;
$lang->block->moduleList['qa'] = '测试';
$lang->block->moduleList['todo'] = '待办';
$lang->block->modules['program'] = new stdclass();
$lang->block->modules['program']->availableBlocks = new stdclass();
$lang->block->modules['program']->availableBlocks->program = '项目列表';
$lang->block->modules['program']->availableBlocks->recentproject = '近期项目';
$lang->block->modules['program']->availableBlocks->statistic = '项目统计';
$lang->block->modules['program']->availableBlocks->programteam = '项目人力投入';
$lang->block->modules['project'] = new stdclass();
$lang->block->modules['project']->availableBlocks = new stdclass();
$lang->block->modules['project']->availableBlocks->project = '项目列表';
$lang->block->modules['project']->availableBlocks->recentproject = '近期项目';
$lang->block->modules['project']->availableBlocks->statistic = '项目统计';
$lang->block->modules['project']->availableBlocks->projectteam = '项目人力投入';
$lang->block->modules['scrum']['index'] = new stdclass();
$lang->block->modules['scrum']['index']->availableBlocks = new stdclass();
@@ -375,13 +374,13 @@ $lang->block->modules['product']->availableBlocks->story = "{$lang->SRCommon
$lang->block->modules['product']->availableBlocks->plan = "计划列表";
$lang->block->modules['product']->availableBlocks->release = '发布列表';
$lang->block->modules['project'] = new stdclass();
$lang->block->modules['project']->availableBlocks = new stdclass();
$lang->block->modules['project']->availableBlocks->statistic = $lang->executionCommon . '统计';
$lang->block->modules['project']->availableBlocks->overview = $lang->executionCommon . '总览';
$lang->block->modules['project']->availableBlocks->list = $lang->executionCommon . '列表';
$lang->block->modules['project']->availableBlocks->task = '任务列表';
$lang->block->modules['project']->availableBlocks->build = '版本列表';
$lang->block->modules['execution'] = new stdclass();
$lang->block->modules['execution']->availableBlocks = new stdclass();
$lang->block->modules['execution']->availableBlocks->statistic = $lang->executionCommon . '统计';
$lang->block->modules['execution']->availableBlocks->overview = $lang->executionCommon . '总览';
$lang->block->modules['execution']->availableBlocks->list = $lang->executionCommon . '列表';
$lang->block->modules['execution']->availableBlocks->task = '任务列表';
$lang->block->modules['execution']->availableBlocks->build = '版本列表';
$lang->block->modules['qa'] = new stdclass();
$lang->block->modules['qa']->availableBlocks = new stdclass();
@@ -403,11 +402,11 @@ $lang->block->orderByList->product['id_desc'] = 'ID 递减';
$lang->block->orderByList->product['status_asc'] = '状态正序';
$lang->block->orderByList->product['status_desc'] = '状态倒序';
$lang->block->orderByList->project = array();
$lang->block->orderByList->project['id_asc'] = 'ID 递增';
$lang->block->orderByList->project['id_desc'] = 'ID 递减';
$lang->block->orderByList->project['status_asc'] = '状态正序';
$lang->block->orderByList->project['status_desc'] = '状态倒序';
$lang->block->orderByList->execution = array();
$lang->block->orderByList->execution['id_asc'] = 'ID 递增';
$lang->block->orderByList->execution['id_desc'] = 'ID 递减';
$lang->block->orderByList->execution['status_asc'] = '状态正序';
$lang->block->orderByList->execution['status_desc'] = '状态倒序';
$lang->block->orderByList->task = array();
$lang->block->orderByList->task['id_asc'] = 'ID 递增';
@@ -478,15 +477,15 @@ $lang->block->typeList->product['closed'] = '已关闭';
$lang->block->typeList->product['all'] = '全部';
$lang->block->typeList->product['involved'] = '我参与';
$lang->block->typeList->program['undone'] = '未完成';
$lang->block->typeList->program['doing'] = '进行中';
$lang->block->typeList->program['all'] = '全部';
$lang->block->typeList->program['involved'] = '我参与的';
$lang->block->typeList->project['undone'] = '未完成';
$lang->block->typeList->project['doing'] = '进行中';
$lang->block->typeList->project['all'] = '全部';
$lang->block->typeList->project['involved'] = '我参与';
$lang->block->typeList->project['involved'] = '我参与的';
$lang->block->typeList->execution['undone'] = '未完成';
$lang->block->typeList->execution['doing'] = '进行中';
$lang->block->typeList->execution['all'] = '全部';
$lang->block->typeList->execution['involved'] = '我参与';
$lang->block->typeList->scrum['undone'] = '未完成';
$lang->block->typeList->scrum['doing'] = '进行中';
@@ -499,27 +498,27 @@ $lang->block->typeList->testtask['blocked'] = '阻塞版本';
$lang->block->typeList->testtask['done'] = '已测版本';
$lang->block->typeList->testtask['all'] = '全部';
$lang->block->modules['program']->moreLinkList = new stdclass();
$lang->block->modules['program']->moreLinkList->recentproject = 'program|prjbrowse|';
$lang->block->modules['program']->moreLinkList->statistic = 'program|prjbrowse|';
$lang->block->modules['program']->moreLinkList->project = 'program|prjbrowse|';
$lang->block->modules['program']->moreLinkList->cmmireport = 'weekly|index|';
$lang->block->modules['program']->moreLinkList->cmmiestimate = 'workestimation|index|';
$lang->block->modules['program']->moreLinkList->cmmiissue = 'issue|browse|';
$lang->block->modules['program']->moreLinkList->cmmirisk = 'risk|browse|';
$lang->block->modules['program']->moreLinkList->scrumlist = 'project|all|';
$lang->block->modules['program']->moreLinkList->scrumtest = 'testtask|browse|';
$lang->block->modules['program']->moreLinkList->scrumproduct = 'product|all|';
$lang->block->modules['program']->moreLinkList->sprint = 'project|all|';
$lang->block->modules['program']->moreLinkList->projectdynamic = 'company|dynamic|';
$lang->block->modules['project']->moreLinkList = new stdclass();
$lang->block->modules['project']->moreLinkList->recentproject = 'project|browse|';
$lang->block->modules['project']->moreLinkList->statistic = 'project|browse|';
$lang->block->modules['project']->moreLinkList->project = 'project|browse|';
$lang->block->modules['project']->moreLinkList->cmmireport = 'weekly|index|';
$lang->block->modules['project']->moreLinkList->cmmiestimate = 'workestimation|index|';
$lang->block->modules['project']->moreLinkList->cmmiissue = 'issue|browse|';
$lang->block->modules['project']->moreLinkList->cmmirisk = 'risk|browse|';
$lang->block->modules['project']->moreLinkList->scrumlist = 'project|all|';
$lang->block->modules['project']->moreLinkList->scrumtest = 'testtask|browse|';
$lang->block->modules['project']->moreLinkList->scrumproduct = 'product|all|';
$lang->block->modules['project']->moreLinkList->sprint = 'project|all|';
$lang->block->modules['project']->moreLinkList->projectdynamic = 'company|dynamic|';
$lang->block->modules['product']->moreLinkList = new stdclass();
$lang->block->modules['product']->moreLinkList->list = 'product|all|';
$lang->block->modules['product']->moreLinkList->story = 'my|story|type=%s';
$lang->block->modules['project']->moreLinkList = new stdclass();
$lang->block->modules['project']->moreLinkList->list = 'project|all|status=%s&project=';
$lang->block->modules['project']->moreLinkList->task = 'my|task|type=%s';
$lang->block->modules['execution']->moreLinkList = new stdclass();
$lang->block->modules['execution']->moreLinkList->list = 'execution|all|status=%s&executionID=';
$lang->block->modules['execution']->moreLinkList->task = 'my|task|type=%s';
$lang->block->modules['qa']->moreLinkList = new stdclass();
$lang->block->modules['qa']->moreLinkList->bug = 'my|bug|type=%s';
@@ -541,9 +540,9 @@ $lang->block->welcomeList['19:00'] = '%s,晚上好!';
$lang->block->gridOptions[8] = '左侧';
$lang->block->gridOptions[4] = '右侧';
$lang->block->flowchart = array();
$lang->block->flowchart['admin'] = array('管理员', '维护公司', '添加用户', '维护权限');
$lang->block->flowchart['product'] = array($lang->productCommon . '经理', '创建' . $lang->productCommon, '维护模块', "维护计划", "维护{$lang->SRCommon}", '创建发布');
$lang->block->flowchart['project'] = array($lang->executionCommon . '经理', '创建' . $lang->executionCommon, '维护团队', '关联' . $lang->productCommon, "关联{$lang->SRCommon}", '分解任务');
$lang->block->flowchart['dev'] = array('研发人员', '领取任务和Bug', '更新状态', '完成任务和Bug');
$lang->block->flowchart['tester'] = array('测试人员', '撰写用例', '执行用例', '提交Bug', '验证Bug', '关闭Bug');
$lang->block->flowchart = array();
$lang->block->flowchart['admin'] = array('管理员', '维护公司', '添加用户', '维护权限');
$lang->block->flowchart['product'] = array($lang->productCommon . '经理', '创建' . $lang->productCommon, '维护模块', "维护计划", "维护{$lang->SRCommon}", '创建发布');
$lang->block->flowchart['execution'] = array($lang->executionCommon . '经理', '创建' . $lang->executionCommon, '维护团队', '关联' . $lang->productCommon, "关联{$lang->SRCommon}", '分解任务');
$lang->block->flowchart['dev'] = array('研发人员', '领取任务和Bug', '更新状态', '完成任务和Bug');
$lang->block->flowchart['tester'] = array('测试人员', '撰写用例', '执行用例', '提交Bug', '验证Bug', '关闭Bug');
+4 -6
View File
@@ -220,16 +220,14 @@ class blockModel extends model
{
$flow = isset($this->config->global->flow) ? $this->config->global->flow : 'full';
$account = $this->app->user->account;
if($module == 'program')
if($module == 'project')
{
$blocks = $this->lang->block->default[$type]['program'];
$projectID = $this->session->PRJ;
$project = $this->loadModel('program')->getPRJByID($projectID);
$blocks = $this->lang->block->default[$type]['project'];
/* Mark project block has init. */
$this->loadModel('setting')->setItem("$account.$module.{$project->model}common.blockInited", true);
$this->loadModel('setting')->setItem("$account.$module.{$type}common.blockInited", true);
}
else
else
{
$blocks = $module == 'my' ? $this->lang->block->default[$flow][$module] : $this->lang->block->default[$module];
+1 -1
View File
@@ -53,7 +53,7 @@
?>
<tr>
<td class='c-id-xs'><?php echo sprintf('%03d', $bug->id);?></td>
<td class='c-name' style='color: <?php echo $bug->color?>' title='<?php echo $bug->title?>'><?php echo html::a($this->createLink('bug', 'view', "bugID=$bug->id", '', '', $bug->PRJ), $bug->title)?></td>
<td class='c-name' style='color: <?php echo $bug->color?>' title='<?php echo $bug->title?>'><?php echo html::a($this->createLink('bug', 'view', "bugID=$bug->id", '', '', $bug->project), $bug->title)?></td>
<?php if($longBlock):?>
<td class='c-severity'>
<?php if($hasCustomSeverity):?>
+73
View File
@@ -0,0 +1,73 @@
<?php
/**
* The project block view file of block module of ZenTaoPMS.
*
* @copyright Copyright 2009-2015 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL (http://zpl.pub/page/zplv12.html)
* @author Yidong Wang <yidong@cnezsoft.com>
* @package block
* @version $Id$
* @link http://www.zentao.net
*/
?>
<?php if(empty($executionStats)): ?>
<div class='empty-tip'><?php common::printLink('project', 'create', '', "<i class='icon-plus'></i> " . $lang->project->create, '', "class='btn btn-primary'")?></div>
<?php else:?>
<div class="panel-body has-table scrollbar-hover">
<table class='table table-borderless table-hover table-fixed table-fixed-head tablesorter block-projects tablesorter'>
<thead>
<tr class='text-center'>
<th class='c-name text-left'><?php echo $lang->execution->name;?></th>
<th class="c-date"><?php echo $lang->execution->end;?></th>
<?php if($longBlock):?>
<?php $thClass = common::checkNotCN() ? 'w-85px' : 'c-hours';?>
<th class="c-status"><?php echo $lang->statusAB;?></th>
<th class='<?php echo $thClass?>'><?php echo $lang->execution->totalEstimate;?></th>
<th class="c-hours"><?php echo $lang->execution->totalConsumed;?></th>
<th class="c-hours"><?php echo $lang->execution->totalLeft;?></th>
<?php endif;?>
<th class="c-progress"><?php echo $lang->execution->progress;?></th>
<?php if($longBlock):?>
<th><?php echo $lang->execution->burn;?></th>
<?php endif;?>
</tr>
</thead>
<tbody class="text-center">
<?php $id = 0; ?>
<?php foreach($executionStats as $execution):?>
<?php
$appid = isset($_GET['entry']) ? "class='app-btn text-center' data-id='{$this->get->entry}'" : "class='text-center'";
$viewLink = $this->createLink('execution', 'task', 'executionID=' . $execution->id);
?>
<tr data-url='<?php echo empty($sso) ? $viewLink : $sso . $sign . 'referer=' . base64_encode($viewLink); ?>' <?php echo $appid?>>
<td class='c-name text-left' title='<?php echo $execution->name;?>'><nobr><?php echo html::a($viewLink, $execution->name, '', "title='$execution->name'");?></nobr></td>
<td class="c-date"><?php echo $execution->end;?></td>
<?php if($longBlock):?>
<td class="w-70px">
<?php if(isset($execution->delay)):?>
<span class="status-project status-delayed" title='<?php echo $lang->execution->delayed;?>'><?php echo $lang->execution->delayed;?></span>
<?php else:?>
<?php $statusName = $this->processStatus('project', $execution);?>
<span class="status-project status-<?php echo $execution->status?>" title='<?php echo $statusName;?>'><?php echo $statusName;?></span>
<?php endif;?>
</td>
<td class="c-hours" title="<?php echo $execution->hours->totalEstimate . ' ' . $lang->execution->workHour;?>"><?php echo $execution->hours->totalEstimate . ' ' . $lang->execution->workHourUnit;?></td>
<td class="c-hours" title="<?php echo $execution->hours->totalConsumed . ' ' . $lang->execution->workHour;?>"><?php echo $execution->hours->totalConsumed . ' ' . $lang->execution->workHourUnit;?></td>
<td class="c-hours" title="<?php echo $execution->hours->totalLeft . ' ' . $lang->execution->workHour;?>"><?php echo $execution->hours->totalLeft . ' ' . $lang->execution->workHourUnit;?></td>
<?php endif;?>
<td class="c-progress">
<div class="progress progress-text-left">
<div class="progress-bar progress-bar-success" role="progressbar" aria-valuenow="<?php echo $execution->hours->progress;?>" aria-valuemin="0" aria-valuemax="100" style="width: <?php echo $execution->hours->progress;?>%">
<span class="progress-text"><?php echo $execution->hours->progress;?>%</span>
</div>
</div>
</td>
<?php if($longBlock):?>
<td id='spark-<?php echo $id++?>' class='no-padding text-left sparkline' values='<?php echo join(',', $execution->burns);?>'></td>
<?php endif;?>
</tr>
<?php endforeach;?>
</tbody>
</table>
</div>
<?php endif;?>
@@ -16,9 +16,9 @@
<div class="panel-body table-row">
<div class="col-4 text-middle text-center">
<div class="tile">
<div class="tile-title"><?php echo $lang->project->allProject;?></div>
<div class="tile-title"><?php echo $lang->execution->allExecution;?></div>
<div class="tile-amount"><?php echo $total;?></div>
<a class="btn btn-primary btn-circle btn-icon-right btn-sm" href="<?php echo $this->createLink('project', 'all', 'type=all');?>"><?php echo $lang->project->viewAll;?> <span class="label label-badge label-icon"><i class="icon icon-arrow-right"></i></span></a>
<a class="btn btn-primary btn-circle btn-icon-right btn-sm" href="<?php echo $this->createLink('project', 'all', 'type=all');?>"><?php echo $lang->execution->viewAll;?> <span class="label label-badge label-icon"><i class="icon icon-arrow-right"></i></span></a>
</div>
</div>
<div class="col-8 text-middle">
@@ -55,21 +55,9 @@ html[lang="en"] .product-info .type-info {color: #A6AAB8; text-align: center; po
.block-statistic.block-sm .nav-secondary > li.active > a.btn-view {width: auto; left: 0; right: 0;}
.block-statistic.block-sm .nav-secondary > li.active > a.btn-view > i {display: none;}
.block-statistic.block-sm .nav-secondary > li.active > a.btn-view:hover {cursor: pointer; background: rgba(0,0,0,.1)}
.block-statistic .program-info .info span+span{margin-left: 15px}
.block-statistic .project-info{margin-top: 25px}
.block-statistic .project-info .col-xs-5, .block-statistic .project-info .col-xs-7{margin-top: 8px}
.block-statistic .project-info .col-xs-5{padding-left: 0px;}
.status-count{margin:auto}
.status-count tr:first-child td:last-child{color:#000;font-weight:bold}
.block-statistic .progress-group{margin-top: 20px; margin-bottom: 10px; height: 65px;}
.block-statistic .weekly-title{font-weight: bold; font-size:14px; color: #3C4253;}
.block-statistic .weekly-small{font-size:12px; color: #838A9D;}
.block-statistic .weekly-progress {font-weight: bold; font-size:24px;}
.block-statistic .weekly-name{font-size:14px; color: #838A9D;}
.block-statistic .weekly-value{font-size:14px;}
.block-statistic .col-6 .stage{margin-left: 10px}
</style>
<script>
<?php $blockNavId = 'nav-' . uniqid(); ?>
@@ -86,17 +74,17 @@ $(function()
e.preventDefault();
});
var $projectLi = $('#activeProject');
if($projectLi.length)
var $executionLi = $('#activeExecution');
if($executionLi.length)
{
var projectLi = $projectLi[0];
$(".col ul.nav").animate({scrollTop: projectLi.offsetTop}, "slow");
var executionLi = $executionLi[0];
$(".col ul.nav").animate({scrollTop: executionLi.offsetTop}, "slow");
}
});
</script>
<div class="panel-body">
<div class="table-row">
<?php if(empty($projects)):?>
<?php if(empty($executions)):?>
<div class="table-empty-tip">
<p><span class="text-muted"><?php echo $lang->block->noData;?></span></p>
</div>
@@ -104,139 +92,110 @@ $(function()
<div class="col col-nav">
<ul class="nav nav-stacked nav-secondary scrollbar-hover" id='<?php echo $blockNavId;?>'>
<li class='switch-icon prev'><a><i class='icon icon-arrow-left'></i></a></li>
<?php $selected = key($projects);?>
<?php foreach($projects as $project):?>
<li <?php if($project->id == $selected) echo "class='active' id='activeProject'";?> projectID='<?php echo $project->id;?>'>
<a href="###" data-target="#tab3Content<?php echo $project->id;?>" data-toggle="tab"><?php echo $project->name;?></a>
<?php echo html::a(helper::createLink('program', 'index', "projectID=$project->id"), "<i class='icon-arrow-right text-primary'></i>", '', "class='btn-view' title={$lang->project->index}");?>
<?php $selected = key($executions);?>
<?php $selected = !isset($executions[$selected]) ? key($executions) : $selected;?>
<?php foreach($executions as $execution):?>
<li <?php if($execution->id == $selected) echo "class='active' id='activeExecution'";?> executionID='<?php echo $execution->id;?>'>
<a href="###" data-target="#tab3Content<?php echo $execution->id;?>" data-toggle="tab" title='<?php echo $execution->name;?>'><?php echo $execution->name;?></a>
<?php echo html::a(helper::createLink('project', 'task', "executionID=$execution->id"), "<i class='icon-arrow-right text-primary'></i>", '', "class='btn-view' title={$lang->execution->task}");?>
</li>
<?php endforeach;?>
<li class='switch-icon next'><a><i class='icon icon-arrow-right'></i></a></li>
</ul>
</div>
<div class="col tab-content">
<?php foreach($projects as $project):?>
<div class="tab-pane fade<?php if($project->id == $selected) echo ' active in';?>" id="tab3Content<?php echo $project->id;?>">
<?php foreach($executions as $execution):?>
<div class="tab-pane fade<?php if($execution->id == $selected) echo ' active in';?>" id="tab3Content<?php echo $execution->id;?>">
<div class="table-row">
<?php if($project->model == 'scrum'):?>
<div class="col-5 text-middle text-center">
<div class="progress-pie inline-block space" data-value="<?php echo $project->progress;?>" data-doughnut-size="84">
<div class="progress-pie inline-block space" data-value="<?php echo $execution->progress;?>" data-doughnut-size="84">
<canvas width="120" height="120"></canvas>
<div class="progress-info">
<small><?php echo $lang->story->common . $lang->project->doneStories;?></small>
<strong><?php echo $project->doneStories;?></strong>
<small><?php echo $lang->task->statusList['done'];?></small>
<strong><?php echo $execution->progress;?><small><?php echo $lang->percent;?></small></strong>
</div>
</div>
<div class="table-row text-center small text-muted with-padding">
<div class="col-4 text-bottom">
<div><?php echo $lang->project->allStories;?></div>
<div><?php echo $project->allStories;?></div>
<div><?php echo $lang->execution->totalEstimate;?></div>
<div><?php echo (float)$execution->totalEstimate;?> <span class="muted"><?php echo $lang->task->hour;?></span></div>
</div>
<div class="col-4">
<span class="label label-dot label-primary"></span>
<div><?php echo $lang->project->doneStories;?></div>
<div><?php echo $project->doneStories;?></div>
<div><?php echo $lang->execution->totalConsumed;?></div>
<div><?php echo (float)$execution->totalConsumed;?> <span class="muted"><?php echo $lang->task->hour;?></span></div>
</div>
<div class="col-4">
<span class="label label-dot label-pale"></span>
<div><?php echo $lang->project->leftStories;?></div>
<div><?php echo $project->leftStories;?></div>
<div><?php echo $lang->execution->totalLeft;?></div>
<div><?php echo (float)$execution->totalLeft;?> <span class="muted"><?php echo $lang->task->hour;?></span></div>
</div>
</div>
</div>
<div class="col-7">
<div class="project-info">
<h4><?php echo $lang->project->allInput;?></h4>
<div class='info'>
<span><i class='icon icon-group'></i> <?php echo sprintf($lang->project->membersUnit, $project->teamCount);?></span>
<span><i class='icon icon-clock'></i> <?php echo sprintf($lang->project->hoursUnit, $project->estimate);?></span>
<span><i class='icon icon-cost'></i> <?php echo $project->budget . ' ' . zget($lang->project->unitList, $project->budgetUnit);?></span>
</div>
</div>
<div class="project-info">
<?php $i = 0;?>
<h4><?php echo $lang->project->lastIteration;?></h4>
<?php foreach($project->executions as $execution):?>
<?php $i ++;?>
<?php if($i > 3) break;?>
<div class='col-xs-5'><?php echo $execution->name;?></div>
<div class='col-xs-7'>
<div class='progress progress-text-left'>
<div class="progress-bar progress-bar-success" role="progressbar" aria-valuenow="<?php echo $execution->hours->progress;?>" aria-valuemin="0" aria-valuemax="100" style="width: <?php echo $execution->hours->progress;?>%">
<span class='progress-text'><?php echo $execution->hours->progress . '%';?></span>
</div>
<div class="product-info">
<div class="progress-info"><i class="icon icon-check-circle text-success icon-sm"></i> <span class="text-muted"><?php echo $lang->task->yesterdayFinished;?></span> <strong><?php echo $execution->yesterdayFinished;?></strong></div>
<div class="progress">
<div class="progress-bar" role="progressbar" aria-valuenow="<?php echo $execution->taskProgress;?>" aria-valuemin="0" aria-valuemax="100" style="width: <?php echo $execution->taskProgress;?>%">
</div>
</div>
<?php endforeach;?>
</div>
</div>
<?php else:?>
<div class="col-6">
<div class='table-row text-left weekly-row with-padding'>
<span class='weekly-title'><?php echo $lang->project->weekly;?></span>
<span class='stage text-muted'><?php echo $project->current;?></span>
</div>
<div class='progress-group col-10 center-block'>
<div class='progress-num text-center'>
<div class='weekly-title'><?php echo $lang->project->PRJProgress;?></div>
<div class='weekly-progress'><?php echo $project->progress . '%';?></div>
</div>
<div class='progress'>
<div class="progress-bar" role="progressbar" aria-valuenow="82" aria-valuemin="0" aria-valuemax="100" style="width: <?php echo $project->progress;?>%"></div>
<div class="type-info">
<div class="type-label">
<table class='status-count'>
<tr>
<td class='text-right'><?php echo $lang->task->allTasks;?> :</td>
<td class='text-left'><?php echo empty($execution->totalTasks) ? 0 : html::a($this->createLink('project', 'task', "executionID={$execution->id}&status=all"), $execution->totalTasks);?></td>
</tr>
<tr>
<td class='text-right'><?php echo $lang->task->noFinished;?> :</td>
<td class='text-left'><?php echo empty($execution->undoneTasks) ? 0 : html::a($this->createLink('project', 'task', "executionID={$execution->id}&status=undone"), $execution->undoneTasks);?></td>
</tr>
</table>
</div>
</div>
</div>
<div class="table-row text-center small with-padding col-10 center-block">
<div class="col-4 text-bottom">
<div class='weekly-name'><?php echo $lang->project->pv;?></div>
<div class='weekly-value'><?php echo $project->pv;?></div>
<div class="product-info">
<div class="progress-info"><i class="icon icon-check-circle text-success icon-sm"></i> <span class="text-muted"><?php echo $lang->story->released;?></span> <strong><?php echo $execution->releasedStories;?></strong></div>
<div class="progress">
<div class="progress-bar" role="progressbar" aria-valuenow="<?php echo $execution->storyProgress;?>" aria-valuemin="0" aria-valuemax="100" style="width: <?php echo $execution->storyProgress;?>%"></div>
</div>
<div class="col-4">
<div class='weekly-name'><?php echo $lang->project->ev;?></div>
<div class='weekly-value'><?php echo $project->ev;?></div>
<div class="type-info">
<div class="type-label">
<table class='status-count'>
<tr>
<td class='text-right'><?php echo $lang->story->total;?> :</td>
<td class='text-left'><?php echo empty($execution->totalStories) ? 0 : html::a($this->createLink('project', 'story', "executionID={$execution->id}&orderBy=order_desc&type=all"), $execution->totalStories);?></td>
</tr>
<tr>
<td class='text-right'><?php echo $lang->story->unclosed;?> :</td>
<td class='text-left'><?php echo empty($execution->unclosedStories) ? 0 : html::a($this->createLink('project', 'story', "executionID={$execution->id}&orderBy=order_desc&type=unclosed"), $execution->unclosedStories);?></td>
</tr>
</table>
</div>
</div>
<div class="col-4">
<div class='weekly-name'><?php echo $lang->project->sv;?></div>
<div class='weekly-value'><?php echo $project->sv;?></div>
</div>
<div class="product-info">
<div class="progress-info"><i class="icon icon-check-circle text-success icon-sm"></i> <span class="text-muted"><?php echo $lang->bug->yesterdayResolved;?></span> <strong><?php echo $execution->yesterdayResolved;?></strong></div>
<div class="progress">
<div class="progress-bar" role="progressbar" aria-valuenow="<?php echo $execution->bugProgress;?>" aria-valuemin="0" aria-valuemax="100" style="width: <?php echo $execution->bugProgress;?>%">
</div>
</div>
<div class="type-info">
<div class="type-label">
<table class='status-count'>
<tr>
<td class='text-right'><?php echo $lang->bug->allBugs;?> :</td>
<td class='text-left'><?php echo empty($execution->totalBugs) ? 0 : html::a($this->createLink('project', 'bug', "executionID={$execution->id}&orderBy=status,id_desc&build=0&type=all"), $execution->totalBugs);?></td>
</tr>
<tr>
<td class='text-right'><?php echo $lang->bug->unResolved;?> :</td>
<td class='text-left'><?php echo empty($execution->activeBugs) ? 0 : html::a($this->createLink('project', 'bug', "executionID={$execution->id}&orderBy=status,id_desc&build=0&type=unresolved"), $execution->activeBugs);?></td>
</tr>
</table>
</div>
</div>
</div>
</div>
<div class='col-6'>
<div class='table-row weekly-row with-padding'>
<div class='col-4 text-center'>
<span class='weekly-title'><?php echo $lang->project->allInput;?></span>
</div>
<div class='col-8'></div>
</div>
<div class='progress-group'>
<div class="table-row text-center small with-padding">
<div class="col-4 text-bottom">
<div class='weekly-name'><?php echo $lang->project->PRJPM;?></div>
<div class='weekly-value'><?php echo $project->PM ? zget($users, $project->PM) : $lang->project->emptyPM;?></div>
</div>
<div class="col-4">
<div class='weekly-name'><?php echo $lang->project->teamCount;?></div>
<div class='weekly-value'><?php echo $project->teamCount;?></div>
</div>
<div class="col-4">
<div class='weekly-name'><?php echo $lang->project->PRJBudget;?></div>
<div class='weekly-value'><?php echo $project->budget;?></div>
</div>
</div>
</div>
<div class="table-row text-center small with-padding">
<div class="col-4 text-bottom">
<div class='weekly-name'><?php echo $lang->project->ac;?></div>
<div class='weekly-value'><?php echo $project->ac;?></div>
</div>
<div class="col-4">
<div class='weekly-name'><?php echo $lang->project->cv;?></div>
<div class='weekly-value'><?php echo $project->cv;?></div>
</div>
<div>
</div>
</div>
</div>
<?php endif;?>
</div>
</div>
<?php endforeach;?>
@@ -8,13 +8,12 @@ $maxConsumed = 0;
<div class='panel-body'>
<div class='table-row'>
<div class='table-col chart-titles'>
<div class='chart-col-title strong'><span><?php echo $lang->project->name;?></span></div>
<?php foreach($projects as $project):?>
<?php
$maxTeamCount = max($maxTeamCount, $project->teamCount);
$maxConsumed = max($maxConsumed, $project->consumed);
?>
<div class='chart-title text-ellipsis' title="<?php echo $project->name;?>"><span><?php echo $project->name;?></span></div>
<div class='chart-title text-ellipsis'><span><?php echo $project->name;?></span></div>
<?php endforeach;?>
</div>
<div class='table-col chart-rows'>
@@ -37,7 +36,7 @@ $maxConsumed = 0;
<div class='chart-col-item'>
<div class='progress'>
<div class='progress-bar' style='width: <?php echo $maxConsumed ? (100 * $project->consumed / $maxConsumed) : 0; ?>%'>
<div class='progress-text' title="<?php echo $project->consumed . $lang->execution->workHour;?>"><?php echo $project->consumed . $lang->execution->workHourUnit;?></div>
<div class='progress-text'><?php echo $project->consumed;?></div>
</div>
</div>
</div>
@@ -48,7 +47,7 @@ $maxConsumed = 0;
</div>
<style>
.block-projectteam .panel-body {margin-top: -10px}
.chart-titles {width: 110px; padding-right: 10px; position: relative; z-index: 1}
.chart-titles {width: 110px; padding-right: 10px; padding-top: 30px; position: relative; z-index: 1}
.chart-rows {position: relative; z-index: 0}
.chart-title {width: 100px; line-height: 20px; padding: 5px 0; height: 30px}
.chart-title > span {background: #fff}
@@ -56,10 +55,10 @@ $maxConsumed = 0;
.project-team, .project-consumed {padding: 0}
.project-team {border-right: 1px solid #e5e8ec}
.project-team > .chart-col-title {text-align: right}
.chart-col-item {height: 30px; padding: 5px 0}
.chart-col-item {height: 30px; padding: 5px 0; position: relative}
.chart-col-text {width: 50px; position: absolute; top: 5px; line-height: 20px; left: 0}
.project-team .chart-col-item {padding-left: 50px}
.project-team .chart-col-item:before {content: ' '; z-index: 0; left: -100px; top: 14px; right: 0; border-top: 1px dotted #e5e8ec}
.project-team .chart-col-item {padding-left: 50px; position: relative}
.project-team .chart-col-item:before {position: absolute; content: ' '; z-index: 0; left: -100px; top: 14px; right: 0; border-top: 1px dotted #e5e8ec}
.project-consumed .chart-col-item {padding-right: 50px}
.chart-col-item .progress {background: none; border-radius: 0; overflow: visible; margin: 6px 0 0 0; position: relative; z-index: 1}
.chart-col-item .progress > .progress-bar {border-radius: 0; position: relative; min-width: 1px}
-50
View File
@@ -1,50 +0,0 @@
<?php if(empty($projects)): ?>
<div class='empty-tip'><?php echo $lang->block->emptyTip;?></div>
<?php else:?>
<style>
.block-programs .c-pri {width: 45px;text-align: center;}
.block-programs .c-status {width: 80px;}
</style>
<div class='panel-body has-table scrollbar-hover'>
<table class='table table-borderless table-hover table-fixed table-fixed-head tablesorter block-programs <?php if(!$longBlock) echo 'block-sm';?>'>
<thead>
<tr>
<th class='c-name w-100px'><?php echo $lang->project->name;?></th>
<th class='w-100px'><?php echo $lang->program->PM;?></th>
<th class='w-80px'><?php echo $lang->program->status;?></th>
<?php if($longBlock):?>
<th class='w-60px'><?php echo $lang->program->teamCount;?></th>
<th class='w-90px text-right'><?php echo $lang->task->consumed;?></th>
<th class='w-80px text-right'><?php echo $lang->program->budget;?></th>
<th class='w-80px'><?php echo $lang->project->leftStories;?></th>
<th class='w-80px'><?php echo $lang->project->leftTasks;?></th>
<th class='w-80px'><?php echo $lang->project->leftBugs;?></th>
<?php endif;?>
</tr>
</thead>
<tbody>
<?php foreach($projects as $project):?>
<?php
$viewLink = $this->createLink('program', 'index', "programID={$project->id}");
?>
<tr>
<td title='<?php echo $project->name?>'><?php echo html::a($viewLink, $project->name);?></td>
<td><?php echo zget($users, $project->PM, $project->PM)?></td>
<td class='c-status'>
<span class="status-program status-<?php echo $project->status?>"><?php echo zget($lang->project->statusList, $project->status);?></span>
</td>
<?php if($longBlock):?>
<td class='text-center'><?php echo $project->teamCount;?></td>
<td class='text-right' title="<?php echo $project->consumed . ' ' . $lang->execution->workHour;?>"><?php echo $project->consumed . ' ' . $lang->execution->workHourUnit;?></td>
<?php $programBudget = in_array($this->app->getClientLang(), ['zh-cn','zh-tw']) && $project->budget >= 10000 ? number_format($project->budget / 10000, 1) . $this->lang->program->tenThousand : number_format((float)$project->budget, 1);?>
<td class='text-right'><?php echo $project->budget != 0 ? zget($lang->project->currencySymbol, $project->budgetUnit) . ' ' . $programBudget : $lang->project->future;?></td>
<td class='text-center'><?php echo $project->leftStories;?></td>
<td class='text-center'><?php echo $project->leftTasks;?></td>
<td class='text-center'><?php echo $project->leftBugs;?></td>
<?php endif;?>
</tr>
<?php endforeach;?>
</tbody>
</table>
</div>
<?php endif;?>
+35 -58
View File
@@ -1,72 +1,49 @@
<?php
/**
* The project block view file of block module of ZenTaoPMS.
*
* @copyright Copyright 2009-2015 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL (http://zpl.pub/page/zplv12.html)
* @author Yidong Wang <yidong@cnezsoft.com>
* @package block
* @version $Id$
* @link http://www.zentao.net
*/
?>
<?php if(empty($executionStats)): ?>
<div class='empty-tip'><?php common::printLink('project', 'create', '', "<i class='icon-plus'></i> " . $lang->project->create, '', "class='btn btn-primary'")?></div>
<?php if(empty($projects)): ?>
<div class='empty-tip'><?php echo $lang->block->emptyTip;?></div>
<?php else:?>
<div class="panel-body has-table scrollbar-hover">
<table class='table table-borderless table-hover table-fixed table-fixed-head tablesorter block-projects tablesorter'>
<style>
.block-programs .c-pri {width: 45px;text-align: center;}
.block-programs .c-status {width: 80px;}
</style>
<div class='panel-body has-table scrollbar-hover'>
<table class='table table-borderless table-hover table-fixed table-fixed-head tablesorter block-programs <?php if(!$longBlock) echo 'block-sm';?>'>
<thead>
<tr class='text-center'>
<th class='c-name text-left'><?php echo $lang->project->name;?></th>
<th class="c-date"><?php echo $lang->project->end;?></th>
<tr>
<th class='c-name w-100px'><?php echo $lang->project->name;?></th>
<th class='w-100px'><?php echo $lang->program->PM;?></th>
<th class='w-80px'><?php echo $lang->program->status;?></th>
<?php if($longBlock):?>
<?php $thClass = common::checkNotCN() ? 'w-85px' : 'c-hours';?>
<th class="c-status"><?php echo $lang->statusAB;?></th>
<th class='<?php echo $thClass?>'><?php echo $lang->execution->totalEstimate;?></th>
<th class="c-hours"><?php echo $lang->execution->totalConsumed;?></th>
<th class="c-hours"><?php echo $lang->execution->totalLeft;?></th>
<?php endif;?>
<th class="c-progress"><?php echo $lang->project->progress;?></th>
<?php if($longBlock):?>
<th><?php echo $lang->execution->burn;?></th>
<th class='w-60px'><?php echo $lang->program->teamCount;?></th>
<th class='w-90px text-right'><?php echo $lang->task->consumed;?></th>
<th class='w-80px text-right'><?php echo $lang->program->budget;?></th>
<th class='w-80px'><?php echo $lang->project->leftStories;?></th>
<th class='w-80px'><?php echo $lang->project->leftTasks;?></th>
<th class='w-80px'><?php echo $lang->project->leftBugs;?></th>
<?php endif;?>
</tr>
</thead>
<tbody class="text-center">
<?php $id = 0; ?>
<?php foreach($executionStats as $execution):?>
<tbody>
<?php foreach($projects as $project):?>
<?php
$appid = isset($_GET['entry']) ? "class='app-btn text-center' data-id='{$this->get->entry}'" : "class='text-center'";
$viewLink = $this->createLink('execution', 'task', 'execution=' . $execution->id);
$viewLink = $this->createLink('program', 'index', "programID={$project->id}");
?>
<tr data-url='<?php echo empty($sso) ? $viewLink : $sso . $sign . 'referer=' . base64_encode($viewLink); ?>' <?php echo $appid?>>
<td class='c-name text-left' title='<?php echo $execution->name;?>'><nobr><?php echo html::a($this->createLink('execution', 'task', 'execution=' . $execution->id), $execution->name, '', "title='$execution->name'");?></nobr></td>
<td class="c-date"><?php echo $execution->end;?></td>
<?php if($longBlock):?>
<td class="w-70px">
<?php if(isset($execution->delay)):?>
<span class="status-project status-delayed" title='<?php echo $lang->execution->delayed;?>'><?php echo $lang->execution->delayed;?></span>
<?php else:?>
<?php $statusName = $this->processStatus('project', $execution);?>
<span class="status-project status-<?php echo $execution->status?>" title='<?php echo $statusName;?>'><?php echo $statusName;?></span>
<?php endif;?>
</td>
<td class="c-hours" title="<?php echo $execution->hours->totalEstimate . ' ' . $lang->execution->workHour;?>"><?php echo $execution->hours->totalEstimate . ' ' . $lang->execution->workHourUnit;?></td>
<td class="c-hours" title="<?php echo $execution->hours->totalConsumed . ' ' . $lang->execution->workHour;?>"><?php echo $execution->hours->totalConsumed . ' ' . $lang->execution->workHourUnit;?></td>
<td class="c-hours" title="<?php echo $execution->hours->totalLeft . ' ' . $lang->execution->workHour;?>"><?php echo $execution->hours->totalLeft . ' ' . $lang->execution->workHourUnit;?></td>
<?php endif;?>
<td class="c-progress">
<div class="progress progress-text-left">
<div class="progress-bar progress-bar-success" role="progressbar" aria-valuenow="<?php echo $execution->hours->progress;?>" aria-valuemin="0" aria-valuemax="100" style="width: <?php echo $execution->hours->progress;?>%">
<span class="progress-text"><?php echo $execution->hours->progress;?>%</span>
</div>
</div>
<tr>
<td title='<?php echo $project->name?>'><?php echo html::a($viewLink, $project->name);?></td>
<td><?php echo zget($users, $project->PM, $project->PM)?></td>
<td class='c-status'>
<span class="status-program status-<?php echo $project->status?>"><?php echo zget($lang->project->statusList, $project->status);?></span>
</td>
<?php if($longBlock):?>
<td id='spark-<?php echo $id++?>' class='no-padding text-left sparkline' values='<?php echo join(',', $execution->burns);?>'></td>
<td class='text-center'><?php echo $project->teamCount;?></td>
<td class='text-right' title="<?php echo $project->consumed . ' ' . $lang->execution->workHour;?>"><?php echo $project->consumed . ' ' . $lang->execution->workHourUnit;?></td>
<?php $programBudget = in_array($this->app->getClientLang(), ['zh-cn','zh-tw']) && $project->budget >= 10000 ? number_format($project->budget / 10000, 1) . $this->lang->program->tenThousand : number_format((float)$project->budget, 1);?>
<td class='text-right'><?php echo $project->budget != 0 ? zget($lang->project->currencySymbol, $project->budgetUnit) . ' ' . $programBudget : $lang->project->future;?></td>
<td class='text-center'><?php echo $project->leftStories;?></td>
<td class='text-center'><?php echo $project->leftTasks;?></td>
<td class='text-center'><?php echo $project->leftBugs;?></td>
<?php endif;?>
</tr>
<?php endforeach;?>
</tr>
<?php endforeach;?>
</tbody>
</table>
</div>
+117 -76
View File
@@ -55,9 +55,21 @@ html[lang="en"] .product-info .type-info {color: #A6AAB8; text-align: center; po
.block-statistic.block-sm .nav-secondary > li.active > a.btn-view {width: auto; left: 0; right: 0;}
.block-statistic.block-sm .nav-secondary > li.active > a.btn-view > i {display: none;}
.block-statistic.block-sm .nav-secondary > li.active > a.btn-view:hover {cursor: pointer; background: rgba(0,0,0,.1)}
.block-statistic .program-info .info span+span{margin-left: 15px}
.block-statistic .project-info{margin-top: 25px}
.block-statistic .project-info .col-xs-5, .block-statistic .project-info .col-xs-7{margin-top: 8px}
.block-statistic .project-info .col-xs-5{padding-left: 0px;}
.status-count{margin:auto}
.status-count tr:first-child td:last-child{color:#000;font-weight:bold}
.block-statistic .progress-group{margin-top: 20px; margin-bottom: 10px; height: 65px;}
.block-statistic .weekly-title{font-weight: bold; font-size:14px; color: #3C4253;}
.block-statistic .weekly-small{font-size:12px; color: #838A9D;}
.block-statistic .weekly-progress {font-weight: bold; font-size:24px;}
.block-statistic .weekly-name{font-size:14px; color: #838A9D;}
.block-statistic .weekly-value{font-size:14px;}
.block-statistic .col-6 .stage{margin-left: 10px}
</style>
<script>
<?php $blockNavId = 'nav-' . uniqid(); ?>
@@ -74,17 +86,17 @@ $(function()
e.preventDefault();
});
var $executionLi = $('#activeExecution');
if($executionLi.length)
var $projectLi = $('#activeProject');
if($projectLi.length)
{
var executionLi = $executionLi[0];
$(".col ul.nav").animate({scrollTop: executionLi.offsetTop}, "slow");
var projectLi = $projectLi[0];
$(".col ul.nav").animate({scrollTop: projectLi.offsetTop}, "slow");
}
});
</script>
<div class="panel-body">
<div class="table-row">
<?php if(empty($executions)):?>
<?php if(empty($projects)):?>
<div class="table-empty-tip">
<p><span class="text-muted"><?php echo $lang->block->noData;?></span></p>
</div>
@@ -92,110 +104,139 @@ $(function()
<div class="col col-nav">
<ul class="nav nav-stacked nav-secondary scrollbar-hover" id='<?php echo $blockNavId;?>'>
<li class='switch-icon prev'><a><i class='icon icon-arrow-left'></i></a></li>
<?php $selected = key($executions);?>
<?php $selected = !isset($executions[$selected]) ? key($executions) : $selected;?>
<?php foreach($executions as $execution):?>
<li <?php if($execution->id == $selected) echo "class='active' id='activeExecution'";?> executionID='<?php echo $execution->id;?>'>
<a href="###" data-target="#tab3Content<?php echo $execution->id;?>" data-toggle="tab" title='<?php echo $execution->name;?>'><?php echo $execution->name;?></a>
<?php echo html::a(helper::createLink('project', 'task', "executionID=$execution->id"), "<i class='icon-arrow-right text-primary'></i>", '', "class='btn-view' title={$lang->project->task}");?>
<?php $selected = key($projects);?>
<?php foreach($projects as $project):?>
<li <?php if($project->id == $selected) echo "class='active' id='activeProject'";?> projectID='<?php echo $project->id;?>'>
<a href="###" data-target="#tab3Content<?php echo $project->id;?>" data-toggle="tab"><?php echo $project->name;?></a>
<?php echo html::a(helper::createLink('program', 'index', "projectID=$project->id"), "<i class='icon-arrow-right text-primary'></i>", '', "class='btn-view' title={$lang->project->index}");?>
</li>
<?php endforeach;?>
<li class='switch-icon next'><a><i class='icon icon-arrow-right'></i></a></li>
</ul>
</div>
<div class="col tab-content">
<?php foreach($executions as $execution):?>
<div class="tab-pane fade<?php if($execution->id == $selected) echo ' active in';?>" id="tab3Content<?php echo $execution->id;?>">
<?php foreach($projects as $project):?>
<div class="tab-pane fade<?php if($project->id == $selected) echo ' active in';?>" id="tab3Content<?php echo $project->id;?>">
<div class="table-row">
<?php if($project->model == 'scrum'):?>
<div class="col-5 text-middle text-center">
<div class="progress-pie inline-block space" data-value="<?php echo $execution->progress;?>" data-doughnut-size="84">
<div class="progress-pie inline-block space" data-value="<?php echo $project->progress;?>" data-doughnut-size="84">
<canvas width="120" height="120"></canvas>
<div class="progress-info">
<small><?php echo $lang->task->statusList['done'];?></small>
<strong><?php echo $execution->progress;?><small><?php echo $lang->percent;?></small></strong>
<small><?php echo $lang->story->common . $lang->project->doneStories;?></small>
<strong><?php echo $project->doneStories;?></strong>
</div>
</div>
<div class="table-row text-center small text-muted with-padding">
<div class="col-4 text-bottom">
<div><?php echo $lang->project->totalEstimate;?></div>
<div><?php echo (float)$execution->totalEstimate;?> <span class="muted"><?php echo $lang->task->hour;?></span></div>
<div><?php echo $lang->project->allStories;?></div>
<div><?php echo $project->allStories;?></div>
</div>
<div class="col-4">
<span class="label label-dot label-primary"></span>
<div><?php echo $lang->project->totalConsumed;?></div>
<div><?php echo (float)$execution->totalConsumed;?> <span class="muted"><?php echo $lang->task->hour;?></span></div>
<div><?php echo $lang->project->doneStories;?></div>
<div><?php echo $project->doneStories;?></div>
</div>
<div class="col-4">
<span class="label label-dot label-pale"></span>
<div><?php echo $lang->project->totalLeft;?></div>
<div><?php echo (float)$execution->totalLeft;?> <span class="muted"><?php echo $lang->task->hour;?></span></div>
<div><?php echo $lang->project->leftStories;?></div>
<div><?php echo $project->leftStories;?></div>
</div>
</div>
</div>
<div class="col-7">
<div class="product-info">
<div class="progress-info"><i class="icon icon-check-circle text-success icon-sm"></i> <span class="text-muted"><?php echo $lang->task->yesterdayFinished;?></span> <strong><?php echo $execution->yesterdayFinished;?></strong></div>
<div class="progress">
<div class="progress-bar" role="progressbar" aria-valuenow="<?php echo $execution->taskProgress;?>" aria-valuemin="0" aria-valuemax="100" style="width: <?php echo $execution->taskProgress;?>%">
</div>
</div>
<div class="type-info">
<div class="type-label">
<table class='status-count'>
<tr>
<td class='text-right'><?php echo $lang->task->allTasks;?> :</td>
<td class='text-left'><?php echo empty($execution->totalTasks) ? 0 : html::a($this->createLink('project', 'task', "executionID={$execution->id}&status=all"), $execution->totalTasks);?></td>
</tr>
<tr>
<td class='text-right'><?php echo $lang->task->noFinished;?> :</td>
<td class='text-left'><?php echo empty($execution->undoneTasks) ? 0 : html::a($this->createLink('project', 'task', "executionID={$execution->id}&status=undone"), $execution->undoneTasks);?></td>
</tr>
</table>
</div>
<div class="project-info">
<h4><?php echo $lang->project->allInput;?></h4>
<div class='info'>
<span><i class='icon icon-group'></i> <?php echo sprintf($lang->project->membersUnit, $project->teamCount);?></span>
<span><i class='icon icon-clock'></i> <?php echo sprintf($lang->project->hoursUnit, $project->estimate);?></span>
<span><i class='icon icon-cost'></i> <?php echo $project->budget . ' ' . zget($lang->project->unitList, $project->budgetUnit);?></span>
</div>
</div>
<div class="product-info">
<div class="progress-info"><i class="icon icon-check-circle text-success icon-sm"></i> <span class="text-muted"><?php echo $lang->story->released;?></span> <strong><?php echo $execution->releasedStories;?></strong></div>
<div class="progress">
<div class="progress-bar" role="progressbar" aria-valuenow="<?php echo $execution->storyProgress;?>" aria-valuemin="0" aria-valuemax="100" style="width: <?php echo $execution->storyProgress;?>%"></div>
</div>
<div class="type-info">
<div class="type-label">
<table class='status-count'>
<tr>
<td class='text-right'><?php echo $lang->story->total;?> :</td>
<td class='text-left'><?php echo empty($execution->totalStories) ? 0 : html::a($this->createLink('project', 'story', "executionID={$execution->id}&orderBy=order_desc&type=all"), $execution->totalStories);?></td>
</tr>
<tr>
<td class='text-right'><?php echo $lang->story->unclosed;?> :</td>
<td class='text-left'><?php echo empty($execution->unclosedStories) ? 0 : html::a($this->createLink('project', 'story', "executionID={$execution->id}&orderBy=order_desc&type=unclosed"), $execution->unclosedStories);?></td>
</tr>
</table>
<div class="project-info">
<?php $i = 0;?>
<h4><?php echo $lang->project->lastIteration;?></h4>
<?php foreach($project->executions as $execution):?>
<?php $i ++;?>
<?php if($i > 3) break;?>
<div class='col-xs-5'><?php echo $execution->name;?></div>
<div class='col-xs-7'>
<div class='progress progress-text-left'>
<div class="progress-bar progress-bar-success" role="progressbar" aria-valuenow="<?php echo $execution->hours->progress;?>" aria-valuemin="0" aria-valuemax="100" style="width: <?php echo $execution->hours->progress;?>%">
<span class='progress-text'><?php echo $execution->hours->progress . '%';?></span>
</div>
</div>
</div>
<?php endforeach;?>
</div>
</div>
<?php else:?>
<div class="col-6">
<div class='table-row text-left weekly-row with-padding'>
<span class='weekly-title'><?php echo $lang->project->weekly;?></span>
<span class='stage text-muted'><?php echo $project->current;?></span>
</div>
<div class='progress-group col-10 center-block'>
<div class='progress-num text-center'>
<div class='weekly-title'><?php echo $lang->project->progress;?></div>
<div class='weekly-progress'><?php echo $project->progress . '%';?></div>
</div>
<div class='progress'>
<div class="progress-bar" role="progressbar" aria-valuenow="82" aria-valuemin="0" aria-valuemax="100" style="width: <?php echo $project->progress;?>%"></div>
</div>
</div>
<div class="product-info">
<div class="progress-info"><i class="icon icon-check-circle text-success icon-sm"></i> <span class="text-muted"><?php echo $lang->bug->yesterdayResolved;?></span> <strong><?php echo $execution->yesterdayResolved;?></strong></div>
<div class="progress">
<div class="progress-bar" role="progressbar" aria-valuenow="<?php echo $execution->bugProgress;?>" aria-valuemin="0" aria-valuemax="100" style="width: <?php echo $execution->bugProgress;?>%">
</div>
<div class="table-row text-center small with-padding col-10 center-block">
<div class="col-4 text-bottom">
<div class='weekly-name'><?php echo $lang->project->pv;?></div>
<div class='weekly-value'><?php echo $project->pv;?></div>
</div>
<div class="type-info">
<div class="type-label">
<table class='status-count'>
<tr>
<td class='text-right'><?php echo $lang->bug->allBugs;?> :</td>
<td class='text-left'><?php echo empty($execution->totalBugs) ? 0 : html::a($this->createLink('project', 'bug', "executionID={$execution->id}&orderBy=status,id_desc&build=0&type=all"), $execution->totalBugs);?></td>
</tr>
<tr>
<td class='text-right'><?php echo $lang->bug->unResolved;?> :</td>
<td class='text-left'><?php echo empty($execution->activeBugs) ? 0 : html::a($this->createLink('project', 'bug', "executionID={$execution->id}&orderBy=status,id_desc&build=0&type=unresolved"), $execution->activeBugs);?></td>
</tr>
</table>
</div>
<div class="col-4">
<div class='weekly-name'><?php echo $lang->project->ev;?></div>
<div class='weekly-value'><?php echo $project->ev;?></div>
</div>
<div class="col-4">
<div class='weekly-name'><?php echo $lang->project->sv;?></div>
<div class='weekly-value'><?php echo $project->sv;?></div>
</div>
</div>
</div>
<div class='col-6'>
<div class='table-row weekly-row with-padding'>
<div class='col-4 text-center'>
<span class='weekly-title'><?php echo $lang->project->allInput;?></span>
</div>
<div class='col-8'></div>
</div>
<div class='progress-group'>
<div class="table-row text-center small with-padding">
<div class="col-4 text-bottom">
<div class='weekly-name'><?php echo $lang->project->PM;?></div>
<div class='weekly-value'><?php echo $project->PM ? zget($users, $project->PM) : $lang->project->emptyPM;?></div>
</div>
<div class="col-4">
<div class='weekly-name'><?php echo $lang->project->teamCount;?></div>
<div class='weekly-value'><?php echo $project->teamCount;?></div>
</div>
<div class="col-4">
<div class='weekly-name'><?php echo $lang->project->budget;?></div>
<div class='weekly-value'><?php echo $project->budget;?></div>
</div>
</div>
</div>
<div class="table-row text-center small with-padding">
<div class="col-4 text-bottom">
<div class='weekly-name'><?php echo $lang->project->ac;?></div>
<div class='weekly-value'><?php echo $project->ac;?></div>
</div>
<div class="col-4">
<div class='weekly-name'><?php echo $lang->project->cv;?></div>
<div class='weekly-value'><?php echo $project->cv;?></div>
</div>
<div>
</div>
</div>
</div>
<?php endif;?>
</div>
</div>
<?php endforeach;?>
+7 -6
View File
@@ -8,12 +8,13 @@ $maxConsumed = 0;
<div class='panel-body'>
<div class='table-row'>
<div class='table-col chart-titles'>
<div class='chart-col-title strong'><span><?php echo $lang->project->name;?></span></div>
<?php foreach($projects as $project):?>
<?php
$maxTeamCount = max($maxTeamCount, $project->teamCount);
$maxConsumed = max($maxConsumed, $project->consumed);
?>
<div class='chart-title text-ellipsis'><span><?php echo $project->name;?></span></div>
<div class='chart-title text-ellipsis' title="<?php echo $project->name;?>"><span><?php echo $project->name;?></span></div>
<?php endforeach;?>
</div>
<div class='table-col chart-rows'>
@@ -36,7 +37,7 @@ $maxConsumed = 0;
<div class='chart-col-item'>
<div class='progress'>
<div class='progress-bar' style='width: <?php echo $maxConsumed ? (100 * $project->consumed / $maxConsumed) : 0; ?>%'>
<div class='progress-text'><?php echo $project->consumed;?></div>
<div class='progress-text' title="<?php echo $project->consumed . $lang->execution->workHour;?>"><?php echo $project->consumed . $lang->execution->workHourUnit;?></div>
</div>
</div>
</div>
@@ -47,7 +48,7 @@ $maxConsumed = 0;
</div>
<style>
.block-projectteam .panel-body {margin-top: -10px}
.chart-titles {width: 110px; padding-right: 10px; padding-top: 30px; position: relative; z-index: 1}
.chart-titles {width: 110px; padding-right: 10px; position: relative; z-index: 1}
.chart-rows {position: relative; z-index: 0}
.chart-title {width: 100px; line-height: 20px; padding: 5px 0; height: 30px}
.chart-title > span {background: #fff}
@@ -55,10 +56,10 @@ $maxConsumed = 0;
.project-team, .project-consumed {padding: 0}
.project-team {border-right: 1px solid #e5e8ec}
.project-team > .chart-col-title {text-align: right}
.chart-col-item {height: 30px; padding: 5px 0; position: relative}
.chart-col-item {height: 30px; padding: 5px 0}
.chart-col-text {width: 50px; position: absolute; top: 5px; line-height: 20px; left: 0}
.project-team .chart-col-item {padding-left: 50px; position: relative}
.project-team .chart-col-item:before {position: absolute; content: ' '; z-index: 0; left: -100px; top: 14px; right: 0; border-top: 1px dotted #e5e8ec}
.project-team .chart-col-item {padding-left: 50px}
.project-team .chart-col-item:before {content: ' '; z-index: 0; left: -100px; top: 14px; right: 0; border-top: 1px dotted #e5e8ec}
.project-consumed .chart-col-item {padding-right: 50px}
.chart-col-item .progress {background: none; border-radius: 0; overflow: visible; margin: 6px 0 0 0; position: relative; z-index: 1}
.chart-col-item .progress > .progress-bar {border-radius: 0; position: relative; min-width: 1px}
+11 -11
View File
@@ -22,13 +22,13 @@
<?php if($longBlock):?>
<?php $thClass = common::checkNotCN() ? 'w-85px' : 'c-hours';?>
<th class="c-status"><?php echo $lang->statusAB;?></th>
<th class='<?php echo $thClass?>'><?php echo $lang->project->totalEstimate;?></th>
<th class="c-hours"><?php echo $lang->project->totalConsumed;?></th>
<th class="c-hours"><?php echo $lang->project->totalLeft;?></th>
<th class='<?php echo $thClass?>'><?php echo $lang->execution->totalEstimate;?></th>
<th class="c-hours"><?php echo $lang->execution->totalConsumed;?></th>
<th class="c-hours"><?php echo $lang->execution->totalLeft;?></th>
<?php endif;?>
<th class="c-progress"><?php echo $lang->project->progress;?></th>
<th class="c-progress"><?php echo $lang->execution->progress;?></th>
<?php if($longBlock):?>
<th><?php echo $lang->project->burn;?></th>
<th><?php echo $lang->execution->burn;?></th>
<?php endif;?>
</tr>
</thead>
@@ -37,23 +37,23 @@
<?php foreach($executionStats as $execution):?>
<?php
$appid = isset($_GET['entry']) ? "class='app-btn text-center' data-id='{$this->get->entry}'" : "class='text-center'";
$viewLink = $this->createLink('project', 'task', 'project=' . $execution->id);
$viewLink = $this->createLink('execution', 'task', 'executionID=' . $execution->id);
?>
<tr data-url='<?php echo empty($sso) ? $viewLink : $sso . $sign . 'referer=' . base64_encode($viewLink); ?>' <?php echo $appid?>>
<td class='c-name text-left' title='<?php echo $execution->name;?>'><nobr><?php echo html::a($this->createLink('project', 'task', 'project=' . $execution->id), $execution->name, '', "title='$execution->name'");?></nobr></td>
<td class='c-name text-left' title='<?php echo $execution->name;?>'><nobr><?php echo html::a($viewLink, $execution->name, '', "title='$execution->name'");?></nobr></td>
<td class="c-date"><?php echo $execution->end;?></td>
<?php if($longBlock):?>
<td class="w-70px">
<?php if(isset($execution->delay)):?>
<span class="status-project status-delayed" title='<?php echo $lang->project->delayed;?>'><?php echo $lang->project->delayed;?></span>
<span class="status-project status-delayed" title='<?php echo $lang->execution->delayed;?>'><?php echo $lang->execution->delayed;?></span>
<?php else:?>
<?php $statusName = $this->processStatus('project', $execution);?>
<span class="status-project status-<?php echo $execution->status?>" title='<?php echo $statusName;?>'><?php echo $statusName;?></span>
<?php endif;?>
</td>
<td class="c-hours" title="<?php echo $execution->hours->totalEstimate . ' ' . $lang->project->workHour;?>"><?php echo $execution->hours->totalEstimate . ' ' . $lang->project->workHourUnit;?></td>
<td class="c-hours" title="<?php echo $execution->hours->totalConsumed . ' ' . $lang->project->workHour;?>"><?php echo $execution->hours->totalConsumed . ' ' . $lang->project->workHourUnit;?></td>
<td class="c-hours" title="<?php echo $execution->hours->totalLeft . ' ' . $lang->project->workHour;?>"><?php echo $execution->hours->totalLeft . ' ' . $lang->project->workHourUnit;?></td>
<td class="c-hours" title="<?php echo $execution->hours->totalEstimate . ' ' . $lang->execution->workHour;?>"><?php echo $execution->hours->totalEstimate . ' ' . $lang->execution->workHourUnit;?></td>
<td class="c-hours" title="<?php echo $execution->hours->totalConsumed . ' ' . $lang->execution->workHour;?>"><?php echo $execution->hours->totalConsumed . ' ' . $lang->execution->workHourUnit;?></td>
<td class="c-hours" title="<?php echo $execution->hours->totalLeft . ' ' . $lang->execution->workHour;?>"><?php echo $execution->hours->totalLeft . ' ' . $lang->execution->workHourUnit;?></td>
<?php endif;?>
<td class="c-progress">
<div class="progress progress-text-left">
@@ -37,18 +37,18 @@
</div>
<div class="col-4 tile">
<div class="overview-title"><i class="icon icon-clock"></i> <?php echo $lang->block->consumedHours;?></div>
<div class="tile-amount" title="<?php echo $totalData[$projectID]->consumed . $lang->project->workHour;?>">
<?php echo $totalData[$projectID]->consumed ? html::a($this->createLink('project', 'index', 'locate=no'), $totalData[$projectID]->consumed . $lang->project->workHourUnit) : 0;?>
<div class="tile-amount" title="<?php echo $totalData[$projectID]->consumed . $lang->execution->workHour;?>">
<?php echo $totalData[$projectID]->consumed ? html::a($this->createLink('project', 'index', 'locate=no'), $totalData[$projectID]->consumed . $lang->execution->workHourUnit) : 0;?>
</div>
<div class="tile-info">
<span class="extra-tips"><?php echo $lang->block->estimatedHours . ' ' . $totalData[$projectID]->estimate . $lang->project->workHour;?></span>
<span class="extra-tips"><?php echo $lang->block->estimatedHours . ' ' . $totalData[$projectID]->estimate . $lang->execution->workHour;?></span>
</div>
</div>
<div class="col-4 tile">
<div class="overview-title"><i class="icon icon-cost"></i> <?php echo $lang->block->spent;?></div>
<div class="tile-amount">¥0</div>
<div class="tile-info">
<?php $budget = $totalData[$projectID]->budget != 0 ? zget($lang->program->currencySymbol, $totalData[$projectID]->budgetUnit) . number_format($totalData[$projectID]->budget, 2) : $lang->program->future;?>
<?php $budget = $totalData[$projectID]->budget != 0 ? zget($lang->project->currencySymbol, $totalData[$projectID]->budgetUnit) . number_format($totalData[$projectID]->budget, 2) : $lang->program->future;?>
<span class="extra-tips"><?php echo $lang->block->budget . ' ' . $budget;?></span>
</div>
</div>
+3 -3
View File
@@ -19,7 +19,7 @@
<div class="panel-body table-row">
<div class="col-4 text-middle text-center">
<div class="tile">
<div class="tile-title"><?php echo $lang->block->allProject;?></div>
<div class="tile-title"><?php echo $lang->block->allExecution;?></div>
<?php $projectLink = $this->createLink('project', 'all', 'status=all')?>
<div class="tile-amount"><?php echo $summary->total ? html::a($projectLink, $summary->total) : 0;?></div>
</div>
@@ -30,13 +30,13 @@
<span class="bar" style="height: <?php echo $progress->doing * 100;?>%">
<span class="value"><?php echo $summary->doing;?></span>
</span>
<span class="title"><?php echo $lang->block->doingProject;?></span>
<span class="title"><?php echo $lang->block->doingExecution;?></span>
</li>
<li>
<span class="bar" style="height: <?php echo $progress->closed * 100;?>%">
<span class="value"><?php echo $summary->closed;?></span>
</span>
<span class="title"><?php echo $lang->block->finishProject;?></span>
<span class="title"><?php echo $lang->block->finishExecution;?></span>
</li>
</ul>
</div>
+2 -2
View File
@@ -44,9 +44,9 @@
<tr>
<td class='c-id-xs'><?php echo sprintf('%03d', $task->id);?></td>
<td class='c-pri <?php if($longBlock) echo "c-pri-long"?>'><span class='label-pri label-pri-<?php echo $task->pri;?>' title='<?php echo zget($lang->task->priList, $task->pri, $task->pri)?>'><?php echo zget($lang->task->priList, $task->pri, $task->pri)?></span></td>
<td class='c-name' style='color: <?php echo $task->color?>' title='<?php echo $task->name?>'><?php echo html::a($this->createLink('task', 'view', "taskID=$task->id", '', '', $task->PRJ), $task->name)?></td>
<td class='c-name' style='color: <?php echo $task->color?>' title='<?php echo $task->name?>'><?php echo html::a($this->createLink('task', 'view', "taskID=$task->id", '', '', $task->project), $task->name)?></td>
<?php if($longBlock):?>
<td class='c-estimate text-center' title="<?php echo $task->estimate . ' ' . $lang->project->workHour;?>"><?php echo $task->estimate . ' ' . $lang->project->workHourUnit;?></td>
<td class='c-estimate text-center' title="<?php echo $task->estimate . ' ' . $lang->execution->workHour;?>"><?php echo $task->estimate . ' ' . $lang->execution->workHourUnit;?></td>
<td class='c-deadline'><?php if(substr($task->deadline, 0, 4) > 0) echo $task->deadline;?></td>
<?php endif;?>
<?php $status = $this->processStatus('task', $task);?>
+2 -1
View File
@@ -11,7 +11,8 @@
*/
/* 字段列表。*/
$lang->executionCommon = $lang->executionCommon;
$lang->execution->allExecutions = '所有' . $lang->executionCommon;
$lang->execution->common = $lang->executionCommon . '视图';
$lang->execution->allExecution = '所有' . $lang->executionCommon;
$lang->execution->id = $lang->executionCommon . '编号';
$lang->execution->type = $lang->executionCommon . '类型';
$lang->execution->name = $lang->executionCommon . '名称';
+2 -5
View File
@@ -62,9 +62,9 @@ class executionModel extends model
*/
public function setMenu($executions, $executionID, $buildID = 0, $extra = '')
{
$project = $this->getByID($this->session->project);
if(empty($executions))
{
$project = $this->loadModel('project')->getByID($this->session->project);
if($project->model == 'waterfall')
{
if(($this->app->moduleName == 'programplan' && $this->app->methodName != 'create') || $this->app->moduleName == 'execution') die(js::locate(helper::createLink('programplan', 'create', "projectID=$project->id")));
@@ -77,11 +77,8 @@ class executionModel extends model
if(!$executionID and $this->session->execution) $executionID = $this->session->execution;
if(!$executionID or !in_array($executionID, array_keys($executions))) $executionID = key($executions);
$this->session->set('execution', $executionID);
$products = $this->loadModel('product')->getPairs();
/* Unset story, bug, build and testtask if type is ops. */
$execution = $this->getByID($executionID);
if($execution and $execution->lifetime == 'ops')
@@ -94,7 +91,7 @@ class executionModel extends model
}
/* Hide story and qa menu when execution is story or design type. */
if($execution and ($execution->attribute == 'story' || $execution->attribute == 'design'))
if($execution and ($execution->attribute == 'story' or $execution->attribute == 'design'))
{
unset($this->lang->execution->menu->story);
unset($this->lang->execution->menu->qa);
+1 -2
View File
@@ -221,12 +221,11 @@ class projectModel extends model
->fetchAll('project');
$this->app->loadClass('pager', $static = true);
$this->loadModel('execution');
foreach($projects as $projectID => $project)
{
$orderBy = $project->model == 'waterfall' ? 'id_asc' : 'id_desc';
$pager = $project->model == 'waterfall' ? null : new pager(0, 1, 1);
$project->executions = $this->execution->getStats($projectID, 'undone', 0, 0, 30, $orderBy, $pager);
$project->executions = $this->getStats($projectID, 'undone', 0, 0, 30, $orderBy, $pager);
$project->teamCount = isset($teams[$projectID]) ? $teams[$projectID]->count : 0;
$project->estimate = isset($estimates[$projectID]) ? round($estimates[$projectID]->estimate, 2) : 0;
$project->parentName = $this->getParentName($project->parent);
+5 -4
View File
@@ -24,6 +24,7 @@ class todoModel extends model
$objectType = $this->post->type;
$hasObject = in_array($objectType, $this->config->todo->moduleList);
$idvalue = 0;
if($hasObject && $objectType) $idvalue = $this->post->uid ? $this->post->$objectType : $this->post->idvalue;
$todo = fixer::input('post')
->add('account', $this->app->user->account)
@@ -446,7 +447,7 @@ class todoModel extends model
$begin = $end = $type;
}
if($account == '') $account = $this->app->user->account;
if(empty($account)) $account = $this->app->user->account;
$stmt = $this->dao->select('*')->from(TABLE_TODO)
->where('1')
@@ -476,10 +477,10 @@ class todoModel extends model
if($todo->type == 'story') $todo->name = $this->dao->findById($todo->idvalue)->from(TABLE_STORY)->fetch('title');
if($todo->type == 'task') $todo->name = $this->dao->findById($todo->idvalue)->from(TABLE_TASK)->fetch('name');
if($todo->type == 'bug') $todo->name = $this->dao->findById($todo->idvalue)->from(TABLE_BUG)->fetch('title');
if($todo->type == 'issue') $todo->name = $this->dao->findById($todo->idvalue)->from(TABLE_ISSUE)->fetch('title');
if($todo->type == 'risk') $todo->name = $this->dao->findById($todo->idvalue)->from(TABLE_RISK)->fetch('name');
if($todo->type == 'review') $todo->name = $this->dao->findById($todo->idvalue)->from(TABLE_REVIEW)->fetch('title');
if($todo->type == 'testtask') $todo->name = $this->dao->findById($todo->idvalue)->from(TABLE_TESTTASK)->fetch('name');
if($todo->type == 'issue' && isset($this->config->maxVersion)) $todo->name = $this->dao->findById($todo->idvalue)->from(TABLE_ISSUE)->fetch('title');
if($todo->type == 'risk' && isset($this->config->maxVersion)) $todo->name = $this->dao->findById($todo->idvalue)->from(TABLE_RISK)->fetch('name');
if($todo->type == 'review' && isset($this->config->maxVersion)) $todo->name = $this->dao->findById($todo->idvalue)->from(TABLE_REVIEW)->fetch('title');
$todo->begin = date::formatTime($todo->begin);
$todo->end = date::formatTime($todo->end);