* adjust code.
This commit is contained in:
+46
-46
@@ -215,7 +215,7 @@ class block extends control
|
||||
$commonField = 'common';
|
||||
if($module == 'program')
|
||||
{
|
||||
$program = $this->loadModel('project')->getByID($this->session->PRJ);
|
||||
$program = $this->loadModel('project')->getByID($this->session->project);
|
||||
$commonField = $program->model . 'common';
|
||||
}
|
||||
|
||||
@@ -438,7 +438,7 @@ class block extends control
|
||||
/* Create a project block. */
|
||||
if($dashboard == 'program')
|
||||
{
|
||||
$project = $this->loadModel('program')->getPRJByID($this->session->PRJ);
|
||||
$project = $this->loadModel('project')->getByID($this->session->project);
|
||||
$model = $project->model;
|
||||
}
|
||||
|
||||
@@ -594,7 +594,7 @@ class block extends control
|
||||
$this->session->set('storyList', $uri);
|
||||
if(preg_match('/[^a-zA-Z0-9_]/', $this->params->type)) die();
|
||||
|
||||
$projectID = $this->view->block->module == 'my' ? 0 : (int)$this->session->PRJ;
|
||||
$projectID = $this->view->block->module == 'my' ? 0 : (int)$this->session->project;
|
||||
$this->view->tasks = $this->loadModel('task')->getUserTasks($this->app->user->account, $this->params->type, $this->viewType == 'json' ? 0 : (int)$this->params->count, null, $this->params->orderBy, $projectID);
|
||||
}
|
||||
|
||||
@@ -609,7 +609,7 @@ class block extends control
|
||||
$this->session->set('bugList', $this->app->getURI(true));
|
||||
if(preg_match('/[^a-zA-Z0-9_]/', $this->params->type)) die();
|
||||
|
||||
$projectID = $this->lang->navGroup->qa == 'project' ? $this->session->PRJ : 0;
|
||||
$projectID = $this->lang->navGroup->qa == 'project' ? $this->session->project : 0;
|
||||
$projectID = $this->view->block->module == 'my' ? 0 : $projectID;
|
||||
$this->view->bugs = $this->loadModel('bug')->getUserBugs($this->app->user->account, $this->params->type, $this->params->orderBy, $this->viewType == 'json' ? 0 : (int)$this->params->count, null, $projectID);
|
||||
}
|
||||
@@ -626,7 +626,7 @@ class block extends control
|
||||
$this->app->loadLang('testcase');
|
||||
$this->app->loadLang('testtask');
|
||||
|
||||
$projectID = $this->lang->navGroup->qa == 'project' ? $this->session->PRJ : 0;
|
||||
$projectID = $this->lang->navGroup->qa == 'project' ? $this->session->project : 0;
|
||||
$projectID = $this->view->block->module == 'my' ? 0 : $projectID;
|
||||
|
||||
$cases = array();
|
||||
@@ -670,7 +670,7 @@ class block extends control
|
||||
$this->session->set('testtaskList', $this->app->getURI(true));
|
||||
if(preg_match('/[^a-zA-Z0-9_]/', $this->params->type)) die();
|
||||
|
||||
$projectID = $this->lang->navGroup->qa == 'project' ? $this->session->PRJ : 0;
|
||||
$projectID = $this->lang->navGroup->qa == 'project' ? $this->session->project : 0;
|
||||
$projectID = $this->view->block->module == 'my' ? 0 : $projectID;
|
||||
|
||||
$this->view->testtasks = $this->dao->select('t1.*,t2.name as productName,t3.name as buildName,t4.name as projectName')->from(TABLE_TESTTASK)->alias('t1')
|
||||
@@ -740,7 +740,7 @@ class block extends control
|
||||
->leftJoin(TABLE_PRODUCT)->alias('t2')->on('t1.product=t2.id')
|
||||
->leftJoin(TABLE_BUILD)->alias('t3')->on('t1.build=t3.id')
|
||||
->where('t1.deleted')->eq('0')
|
||||
->beginIF($this->view->block->module != 'my' and $this->session->PRJ)->andWhere('t1.PRJ')->eq((int)$this->session->PRJ)->fi()
|
||||
->beginIF($this->view->block->module != 'my' and $this->session->project)->andWhere('t1.PRJ')->eq((int)$this->session->project)->fi()
|
||||
->beginIF(!$this->app->user->admin)->andWhere('t1.product')->in($this->app->user->view->products)->fi()
|
||||
->orderBy('t1.id desc')
|
||||
->beginIF($this->viewType != 'json')->limit((int)$this->params->count)->fi()
|
||||
@@ -761,7 +761,7 @@ class block extends control
|
||||
->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()
|
||||
->beginIF($this->view->block->module != 'my' and $this->session->PRJ)->andWhere('t1.PRJ')->eq((int)$this->session->PRJ)->fi()
|
||||
->beginIF($this->view->block->module != 'my' and $this->session->project)->andWhere('t1.PRJ')->eq((int)$this->session->project)->fi()
|
||||
->orderBy('t1.id desc')
|
||||
->beginIF($this->viewType != 'json')->limit((int)$this->params->count)->fi()
|
||||
->fetchAll();
|
||||
@@ -781,7 +781,7 @@ class block extends control
|
||||
$type = isset($this->params->type) ? $this->params->type : 'all';
|
||||
$orderBy = isset($this->params->orderBy) ? $this->params->orderBy : 'id_desc';
|
||||
|
||||
$this->view->projects = $this->loadModel('program')->getPRJOverview('byStatus', $type, $orderBy, $count);
|
||||
$this->view->projects = $this->loadModel('project')->getOverviewList('byStatus', $type, $orderBy, $count);
|
||||
$this->view->users = $this->loadModel('user')->getPairs('noletter');
|
||||
}
|
||||
|
||||
@@ -848,7 +848,7 @@ class block extends control
|
||||
$count = isset($this->params->count) ? (int)$this->params->count : 15;
|
||||
|
||||
/* Get projects. */
|
||||
$projects = $this->loadModel('program')->getPRJOverview('byStatus', $status, 'id_desc', $count);
|
||||
$projects = $this->loadModel('project')->getOverviewList('byStatus', $status, 'id_desc', $count);
|
||||
if(empty($projects))
|
||||
{
|
||||
$this->view->projects = $projects;
|
||||
@@ -857,8 +857,8 @@ class block extends control
|
||||
|
||||
$today = helper::today();
|
||||
if(isset($this->config->maxVersion)) $monday = date('Ymd', strtotime($this->loadModel('weekly')->getThisMonday($today)));
|
||||
$tasks = $this->dao->select("PRJ,
|
||||
sum(consumed) as totalConsumed,
|
||||
$tasks = $this->dao->select("PRJ,
|
||||
sum(consumed) as totalConsumed,
|
||||
sum(if(status != 'cancel' and status != 'closed', `left`, 0)) as totalLeft")
|
||||
->from(TABLE_TASK)
|
||||
->where('PRJ')->in(array_keys($projects))
|
||||
@@ -872,7 +872,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->project->getExecutionStats($projectID, 'all', 0, 0, 30, 'id_asc');
|
||||
$project->executions = $this->loadModel('execution')->getStats($projectID, 'all', 0, 0, 30, 'id_asc');
|
||||
}
|
||||
elseif($project->model == 'waterfall' and isset($this->config->maxVersion))
|
||||
{
|
||||
@@ -1046,7 +1046,7 @@ class block extends control
|
||||
$count = isset($this->params->count) ? (int)$this->params->count : 0;
|
||||
|
||||
/* Get projects. */
|
||||
$projectID = $this->view->block->module == 'my' ? 0 : (int)$this->session->PRJ;
|
||||
$projectID = $this->view->block->module == 'my' ? 0 : (int)$this->session->project;
|
||||
$executions = $this->loadModel('project')->getOrderedExecutions($projectID, $status, $count);
|
||||
if(empty($executions))
|
||||
{
|
||||
@@ -1166,7 +1166,7 @@ class block extends control
|
||||
*/
|
||||
public function printWaterfallReportBlock()
|
||||
{
|
||||
$project = $this->loadModel('program')->getPRJByID($this->session->PRJ);
|
||||
$project = $this->loadModel('project')->getByID($this->session->project);
|
||||
$today = helper::today();
|
||||
$date = date('Ymd', strtotime('this week Monday'));
|
||||
$begin = $project->begin;
|
||||
@@ -1174,16 +1174,16 @@ class block extends control
|
||||
$current = zget($weeks, $date, '');
|
||||
|
||||
$task = $this->dao->select("
|
||||
sum(consumed) as totalConsumed,
|
||||
sum(consumed) as totalConsumed,
|
||||
sum(if(status != 'cancel' and status != 'closed', `left`, 0)) as totalLeft")
|
||||
->from(TABLE_TASK)->where('PRJ')->eq($this->session->PRJ)
|
||||
->from(TABLE_TASK)->where('PRJ')->eq($this->session->project)
|
||||
->andWhere('deleted')->eq(0)
|
||||
->andWhere('parent')->lt(1)
|
||||
->fetch();
|
||||
|
||||
$this->view->pv = $this->weekly->getPV($this->session->PRJ, $today);
|
||||
$this->view->ev = $this->weekly->getEV($this->session->PRJ, $today);
|
||||
$this->view->ac = $this->weekly->getAC($this->session->PRJ, $today);
|
||||
$this->view->pv = $this->weekly->getPV($this->session->project, $today);
|
||||
$this->view->ev = $this->weekly->getEV($this->session->project, $today);
|
||||
$this->view->ac = $this->weekly->getAC($this->session->project, $today);
|
||||
$this->view->sv = $this->weekly->getSV($this->view->ev, $this->view->pv);
|
||||
$this->view->cv = $this->weekly->getCV($this->view->ev, $this->view->ac);
|
||||
|
||||
@@ -1199,11 +1199,11 @@ class block extends control
|
||||
*/
|
||||
public function printWaterfallGanttBlock()
|
||||
{
|
||||
$products = $this->loadModel('product')->getProductPairsByProject($this->session->PRJ);
|
||||
$products = $this->loadModel('product')->getProductPairsByProject($this->session->project);
|
||||
$productID = $this->session->product ? $this->session->product : 0;
|
||||
$productID = isset($products[$productID]) ? $productID : key($products);
|
||||
|
||||
$this->view->plans = $this->loadModel('programplan')->getDataForGantt($this->session->PRJ, $productID, 0, 'task', false);
|
||||
$this->view->plans = $this->loadModel('programplan')->getDataForGantt($this->session->project, $productID, 0, 'task', false);
|
||||
$this->view->products = $products;
|
||||
$this->view->productID = $productID;
|
||||
}
|
||||
@@ -1220,7 +1220,7 @@ class block extends control
|
||||
$this->session->set('issueList', $uri);
|
||||
if(preg_match('/[^a-zA-Z0-9_]/', $this->params->type)) die();
|
||||
$this->view->users = $this->loadModel('user')->getPairs('noletter');
|
||||
$this->view->issues = $this->loadModel('issue')->getBlockIssues($this->session->PRJ, $this->params->type, $this->viewType == 'json' ? 0 : (int)$this->params->count, $this->params->orderBy);
|
||||
$this->view->issues = $this->loadModel('issue')->getBlockIssues($this->session->project, $this->params->type, $this->viewType == 'json' ? 0 : (int)$this->params->count, $this->params->orderBy);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1234,7 +1234,7 @@ class block extends control
|
||||
$uri = $this->app->getURI(true);
|
||||
$this->session->set('riskList', $uri);
|
||||
$this->view->users = $this->loadModel('user')->getPairs('noletter');
|
||||
$this->view->risks = $this->loadModel('risk')->getBlockRisks($this->session->PRJ, $this->params->type, $this->viewType == 'json' ? 0 : (int)$this->params->count, $this->params->orderBy);
|
||||
$this->view->risks = $this->loadModel('risk')->getBlockRisks($this->session->project, $this->params->type, $this->viewType == 'json' ? 0 : (int)$this->params->count, $this->params->orderBy);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1246,14 +1246,14 @@ class block extends control
|
||||
public function printWaterfallEstimateBlock()
|
||||
{
|
||||
$this->app->loadLang('durationestimation');
|
||||
$programID = $this->session->PRJ;
|
||||
$members = $this->loadModel('project')->getTeamMemberPairs($programID);
|
||||
$budget = $this->loadModel('workestimation')->getBudget($programID);
|
||||
$projectID = $this->session->project;
|
||||
$members = $this->loadModel('project')->getTeamMemberPairs($projectID);
|
||||
$budget = $this->loadModel('workestimation')->getBudget($projectID);
|
||||
if(empty($budget)) $budget = new stdclass();
|
||||
|
||||
$this->view->people = $this->dao->select('sum(people) as people')->from(TABLE_DURATIONESTIMATION)->where('PRJ')->eq($this->session->PRJ)->fetch('people');
|
||||
$this->view->people = $this->dao->select('sum(people) as people')->from(TABLE_DURATIONESTIMATION)->where('PRJ')->eq($this->session->project)->fetch('people');
|
||||
$this->view->members = count($members) ? count($members) - 1 : 0;
|
||||
$this->view->consumed = $this->dao->select('sum(cast(consumed as decimal(10,2))) as consumed')->from(TABLE_TASK)->where('PRJ')->eq($programID)->andWhere('deleted')->eq(0)->andWhere('parent')->lt(1)->fetch('consumed');
|
||||
$this->view->consumed = $this->dao->select('sum(cast(consumed as decimal(10,2))) as consumed')->from(TABLE_TASK)->where('PRJ')->eq($projectID)->andWhere('deleted')->eq(0)->andWhere('parent')->lt(1)->fetch('consumed');
|
||||
$this->view->budget = $budget;
|
||||
}
|
||||
|
||||
@@ -1267,8 +1267,8 @@ class block extends control
|
||||
{
|
||||
$this->loadModel('milestone');
|
||||
$this->loadModel('weekly');
|
||||
$projectID = $this->session->PRJ;
|
||||
$project = $this->loadModel('program')->getPRJByID($projectID);
|
||||
$projectID = $this->session->project;
|
||||
$project = $this->loadModel('project')->getByID($projectID);
|
||||
|
||||
$begin = $project->begin;
|
||||
$today = helper::today();
|
||||
@@ -1304,8 +1304,8 @@ class block extends control
|
||||
*/
|
||||
public function printScrumOverviewBlock()
|
||||
{
|
||||
$projectID = $this->session->PRJ;
|
||||
$totalData = $this->loadModel('program')->getPRJOverview('byId', $projectID, 'id_desc', 1);
|
||||
$projectID = $this->session->project;
|
||||
$totalData = $this->loadModel('project')->getOverviewList('byId', $projectID, 'id_desc', 1);
|
||||
|
||||
$this->view->totalData = $totalData;
|
||||
$this->view->projectID = $projectID;
|
||||
@@ -1324,7 +1324,7 @@ class block extends control
|
||||
$count = isset($this->params->count) ? (int)$this->params->count : 15;
|
||||
$type = isset($this->params->type) ? $this->params->type : 'all';
|
||||
$pager = pager::init(0, $count, 1);
|
||||
$this->view->executionStats = $this->loadModel('project')->getExecutionStats($this->session->PRJ, $type, 0, 0, 30, 'id_desc', $pager);
|
||||
$this->view->executionStats = $this->loadModel('execution')->getStats($this->session->project, $type, 0, 0, 30, 'id_desc', $pager);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1340,7 +1340,7 @@ class block extends control
|
||||
$releases = array();
|
||||
$count = isset($this->params->count) ? (int)$this->params->count : 15;
|
||||
|
||||
$products = $this->dao->select('id, name')->from(TABLE_PRODUCT)->where('program')->eq($this->session->PRJ)->limit(15)->fetchPairs();
|
||||
$products = $this->dao->select('id, name')->from(TABLE_PRODUCT)->where('program')->eq($this->session->project)->limit(15)->fetchPairs();
|
||||
$productIdList = array_keys($products);
|
||||
if(!empty($productIdList))
|
||||
{
|
||||
@@ -1367,7 +1367,7 @@ class block extends control
|
||||
$sprints = $this->dao->select('status, count(*) as sprints')->from(TABLE_EXECUTION)
|
||||
->where('deleted')->eq(0)
|
||||
->andWhere('type')->eq('sprint')
|
||||
->andWhere('parent')->eq($this->session->PRJ)
|
||||
->andWhere('parent')->eq($this->session->project)
|
||||
->groupBy('status')
|
||||
->fetchPairs();
|
||||
|
||||
@@ -1392,7 +1392,7 @@ class block extends control
|
||||
*/
|
||||
public function printProjectDynamicBlock()
|
||||
{
|
||||
$projectID = $this->session->PRJ;
|
||||
$projectID = $this->session->project;
|
||||
|
||||
$executions = $this->loadModel('project')->getExecutionPairs($projectID);
|
||||
$products = $this->loadModel('product')->getProductPairsByProject($projectID);
|
||||
@@ -1424,7 +1424,7 @@ class block extends control
|
||||
$this->session->set('releaseList', $this->app->getURI(true));
|
||||
$this->session->set('productPlanList', $this->app->getURI(true));
|
||||
|
||||
$products = $this->loadModel('product')->getPairs('', $this->session->PRJ);
|
||||
$products = $this->loadModel('product')->getPairs('', $this->session->project);
|
||||
if(!is_numeric($productID)) $productID = key($products);
|
||||
|
||||
$this->view->roadmaps = $this->product->getRoadmap($productID, 0, 6);
|
||||
@@ -1461,7 +1461,7 @@ class block extends control
|
||||
->leftJoin(TABLE_PROJECT)->alias('t4')->on('t1.project=t4.id')
|
||||
->leftJoin(TABLE_PROJECTPRODUCT)->alias('t5')->on('t1.project=t5.project')
|
||||
->where('t1.deleted')->eq('0')
|
||||
->andWhere('t1.PRJ')->eq($this->session->PRJ)->fi()
|
||||
->andWhere('t1.PRJ')->eq($this->session->project)->fi()
|
||||
->andWhere('t1.product = t5.product')
|
||||
->beginIF($status != 'all')->andWhere('t1.status')->eq($status)->fi()
|
||||
->orderBy('t1.id desc')
|
||||
@@ -1483,7 +1483,7 @@ class block extends control
|
||||
$status = isset($this->params->type) ? $this->params->type : '';
|
||||
$count = isset($this->params->count) ? (int)$this->params->count : 0;
|
||||
|
||||
$projectID = $this->lang->navGroup->qa == 'project' ? $this->session->PRJ : 0;
|
||||
$projectID = $this->lang->navGroup->qa == 'project' ? $this->session->project : 0;
|
||||
$products = $this->loadModel('product')->getOrderedProducts($status, $count, $projectID);
|
||||
if(empty($products))
|
||||
{
|
||||
@@ -1587,7 +1587,7 @@ class block extends control
|
||||
*/
|
||||
public function printProjectOverviewBlock()
|
||||
{
|
||||
$projectID = $this->view->block->module == 'my' ? 0 : (int)$this->session->PRJ;
|
||||
$projectID = $this->view->block->module == 'my' ? 0 : (int)$this->session->project;
|
||||
$executions = $this->loadModel('project')->getExecutionList($projectID);
|
||||
|
||||
$total = 0;
|
||||
@@ -1620,7 +1620,7 @@ class block extends control
|
||||
{
|
||||
$casePairs = $this->dao->select('lastRunResult, COUNT(*) AS count')->from(TABLE_CASE)
|
||||
->where('1=1')
|
||||
->beginIF($this->view->block->module != 'my' and $this->session->PRJ)->andWhere('PRJ')->eq((int)$this->session->PRJ)->fi()
|
||||
->beginIF($this->view->block->module != 'my' and $this->session->project)->andWhere('PRJ')->eq((int)$this->session->project)->fi()
|
||||
->groupBy('lastRunResult')
|
||||
->fetchPairs();
|
||||
|
||||
@@ -1657,8 +1657,8 @@ class block extends control
|
||||
$status = isset($this->params->type) ? $this->params->type : 'all';
|
||||
$pager = pager::init(0, $count, 1);
|
||||
|
||||
$projectID = $this->view->block->module == 'my' ? 0 : (int)$this->session->PRJ;
|
||||
$this->view->executionStats = $this->loadModel('project')->getExecutionStats($projectID, $status, 0, 0, 30, 'id_asc', $pager);
|
||||
$projectID = $this->view->block->module == 'my' ? 0 : (int)$this->session->project;
|
||||
$this->view->executionStats = $this->loadModel('execution')->getStats($projectID, $status, 0, 0, 30, 'id_asc', $pager);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1794,7 +1794,7 @@ class block extends control
|
||||
/* load pager. */
|
||||
$this->app->loadClass('pager', $static = true);
|
||||
$pager = new pager(0, 3, 1);
|
||||
$this->view->projects = $this->loadModel('program')->getPRJInfo('all', 30, 'id_desc', $pager);
|
||||
$this->view->projects = $this->loadModel('project')->getInfoList('all', 30, 'id_desc', $pager);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1811,7 +1811,7 @@ class block extends control
|
||||
|
||||
/* Get projects. */
|
||||
$this->app->loadLang('task');
|
||||
$this->view->projects = $this->loadModel('program')->getPRJOverview('byStatus', $status, $orderBy, $count);
|
||||
$this->view->projects = $this->loadModel('project')->getOverviewList('byStatus', $status, $orderBy, $count);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -9,16 +9,16 @@
|
||||
<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->program->PRJName;?></th>
|
||||
<th class='w-100px'><?php echo $lang->program->PGMPM;?></th>
|
||||
<th class='w-80px'><?php echo $lang->program->PGMStatus;?></th>
|
||||
<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->PGMBudget;?></th>
|
||||
<th class='w-80px'><?php echo $lang->program->leftStories;?></th>
|
||||
<th class='w-80px'><?php echo $lang->program->leftTasks;?></th>
|
||||
<th class='w-80px'><?php echo $lang->program->leftBugs;?></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>
|
||||
@@ -35,9 +35,9 @@
|
||||
</td>
|
||||
<?php if($longBlock):?>
|
||||
<td class='text-center'><?php echo $project->teamCount;?></td>
|
||||
<td class='text-right' title="<?php echo $project->consumed . ' ' . $lang->project->workHour;?>"><?php echo $project->consumed . ' ' . $lang->project->workHourUnit;?></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->program->currencySymbol, $project->budgetUnit) . ' ' . $programBudget : $lang->program->future;?></td>
|
||||
<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>
|
||||
|
||||
@@ -108,7 +108,7 @@ $(function()
|
||||
<?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->program->PGMIndex}");?>
|
||||
<?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>
|
||||
@@ -123,39 +123,39 @@ $(function()
|
||||
<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->story->common . $lang->program->doneStories;?></small>
|
||||
<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->program->allStories;?></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->program->doneStories;?></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->program->leftStories;?></div>
|
||||
<div><?php echo $lang->project->leftStories;?></div>
|
||||
<div><?php echo $project->leftStories;?></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-7">
|
||||
<div class="project-info">
|
||||
<h4><?php echo $lang->program->allInput;?></h4>
|
||||
<h4><?php echo $lang->project->allInput;?></h4>
|
||||
<div class='info'>
|
||||
<span><i class='icon icon-group'></i> <?php echo sprintf($lang->program->membersUnit, $project->teamCount);?></span>
|
||||
<span><i class='icon icon-clock'></i> <?php echo sprintf($lang->program->hoursUnit, $project->estimate);?></span>
|
||||
<span><i class='icon icon-cost'></i> <?php echo $project->budget . ' ' . zget($lang->program->unitList, $project->budgetUnit);?></span>
|
||||
<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->program->lastIteration;?></h4>
|
||||
<h4><?php echo $lang->project->lastIteration;?></h4>
|
||||
<?php foreach($project->executions as $execution):?>
|
||||
<?php $i ++;?>
|
||||
<?php if($i > 3) break;?>
|
||||
@@ -173,12 +173,12 @@ $(function()
|
||||
<?php else:?>
|
||||
<div class="col-6">
|
||||
<div class='table-row text-left weekly-row with-padding'>
|
||||
<span class='weekly-title'><?php echo $lang->program->weekly;?></span>
|
||||
<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->program->PRJProgress;?></div>
|
||||
<div class='weekly-title'><?php echo $lang->project->PRJProgress;?></div>
|
||||
<div class='weekly-progress'><?php echo $project->progress . '%';?></div>
|
||||
</div>
|
||||
<div class='progress'>
|
||||
@@ -187,15 +187,15 @@ $(function()
|
||||
</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->program->pv;?></div>
|
||||
<div class='weekly-name'><?php echo $lang->project->pv;?></div>
|
||||
<div class='weekly-value'><?php echo $project->pv;?></div>
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<div class='weekly-name'><?php echo $lang->program->ev;?></div>
|
||||
<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->program->sv;?></div>
|
||||
<div class='weekly-name'><?php echo $lang->project->sv;?></div>
|
||||
<div class='weekly-value'><?php echo $project->sv;?></div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -203,33 +203,33 @@ $(function()
|
||||
<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->program->allInput;?></span>
|
||||
<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->program->PRJPM;?></div>
|
||||
<div class='weekly-value'><?php echo $project->PM ? zget($users, $project->PM) : $lang->program->emptyPM;?></div>
|
||||
<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->program->teamCount;?></div>
|
||||
<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->program->PRJBudget;?></div>
|
||||
<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->program->ac;?></div>
|
||||
<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->program->cv;?></div>
|
||||
<div class='weekly-name'><?php echo $lang->project->cv;?></div>
|
||||
<div class='weekly-value'><?php echo $project->cv;?></div>
|
||||
</div>
|
||||
<div>
|
||||
|
||||
@@ -8,7 +8,7 @@ $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->program->PRJName;?></span></div>
|
||||
<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);
|
||||
@@ -37,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' title="<?php echo $project->consumed . $lang->project->workHour;?>"><?php echo $project->consumed . $lang->project->workHourUnit;?></div>
|
||||
<div class='progress-text' title="<?php echo $project->consumed . $lang->execution->workHour;?>"><?php echo $project->consumed . $lang->execution->workHourUnit;?></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -41,9 +41,9 @@
|
||||
<div class='panel-heading not-move-handler'>
|
||||
<strong class='project-name' title='<?php echo $project->name;?>'> <?php echo html::a($this->createLink('project', 'index', "projectID=$project->id", '', '', $project->id), $project->name);?> </strong>
|
||||
<?php if($project->model === 'waterfall'): ?>
|
||||
<span class='project-type-label label label-warning label-outline'><?php echo $lang->program->waterfall; ?></span>
|
||||
<span class='project-type-label label label-warning label-outline'><?php echo $lang->project->waterfall; ?></span>
|
||||
<?php else: ?>
|
||||
<span class='project-type-label label label-info label-outline'><?php echo $lang->program->scrum; ?></span>
|
||||
<span class='project-type-label label label-info label-outline'><?php echo $lang->project->scrum; ?></span>
|
||||
<?php endif; ?>
|
||||
<nav class='panel-actions nav nav-default'>
|
||||
<li class='dropdown'>
|
||||
@@ -63,12 +63,12 @@
|
||||
</div>
|
||||
<div class='panel-body'>
|
||||
<div class='project-infos'>
|
||||
<span><i class='icon icon-group'></i> <?php printf($lang->program->membersUnit, $project->teamCount); ?></span>
|
||||
<span><i class='icon icon-clock'></i> <?php printf($lang->program->hoursUnit, $project->estimate); ?></span>
|
||||
<span><i class='icon icon-group'></i> <?php printf($lang->project->membersUnit, $project->teamCount); ?></span>
|
||||
<span><i class='icon icon-clock'></i> <?php printf($lang->project->hoursUnit, $project->estimate); ?></span>
|
||||
</div>
|
||||
<?php if($project->model === 'waterfall'): ?>
|
||||
<div class='project-detail project-stages'>
|
||||
<p class='text-muted'><?php echo $lang->program->ongoingStage;?></p>
|
||||
<p class='text-muted'><?php echo $lang->project->ongoingStage;?></p>
|
||||
<?php
|
||||
$projectProjects = array();
|
||||
foreach($project->executions as $project)
|
||||
@@ -93,7 +93,7 @@
|
||||
<?php else: ?>
|
||||
<?php $project = empty($project->executions ) ? '' : end($project->executions);?>
|
||||
<div class='project-detail project-iteration'>
|
||||
<p class='text-muted'><?php echo $lang->program->lastIteration; ?></p>
|
||||
<p class='text-muted'><?php echo $lang->project->lastIteration; ?></p>
|
||||
<?php if($project):?>
|
||||
<div class='row'>
|
||||
<div class='col-xs-5'><?php echo $project->name;?></div>
|
||||
|
||||
@@ -157,7 +157,7 @@ class docModel extends model
|
||||
if($type == 'project')
|
||||
{
|
||||
$status = strpos($this->config->doc->custom->showLibs, 'unclosed') !== false ? 'undone' : 'all';
|
||||
$idList = $this->loadModel('project')->getExecutionIdList($projectID, $status);
|
||||
$idList = $this->loadModel('execution')->getIdList($projectID, $status);
|
||||
}
|
||||
|
||||
$table = $type == 'product' ? TABLE_PRODUCT : TABLE_PROJECT;
|
||||
@@ -170,7 +170,7 @@ class docModel extends model
|
||||
{
|
||||
/* If extra have unclosedProject then ignore unclosed project libs. */
|
||||
$status = (strpos($extra, 'unclosedProject') !== false) ? 'undone' : 'all';
|
||||
$executionIdList = $this->loadModel('project')->getExecutionIdList($projectID, $status);
|
||||
$executionIdList = $this->loadModel('execution')->getIdList($projectID, $status);
|
||||
$productIdList = $this->loadModel('product')->getProductIDByProject($projectID, false);
|
||||
|
||||
$stmt = $this->dao->select('*')->from(TABLE_DOCLIB)
|
||||
@@ -195,7 +195,7 @@ class docModel extends model
|
||||
if(strpos($extra, 'withObject') !== false)
|
||||
{
|
||||
$products = $this->loadModel('product')->getProductPairsByProject($this->session->PRJ);
|
||||
$projects = $this->loadModel('project')->getExecutionPairs($this->session->PRJ, 'all', 'noclosed');
|
||||
$projects = $this->loadModel('execution')->getPairs($this->session->PRJ, 'all', 'noclosed');
|
||||
}
|
||||
|
||||
$libPairs = array();
|
||||
@@ -780,7 +780,7 @@ class docModel extends model
|
||||
$this->config->doc->search['actionURL'] = $actionURL;
|
||||
$this->config->doc->search['queryID'] = $queryID;
|
||||
$this->config->doc->search['params']['product']['values'] = array(''=>'') + $this->loadModel('product')->getPairs('nocode', $this->session->PRJ) + array('all'=>$this->lang->doc->allProduct);
|
||||
$this->config->doc->search['params']['project']['values'] = array(''=>'') + $this->loadModel('project')->getExecutionPairs($this->session->PRJ, 'all', 'noclosed') + array('all'=>$this->lang->doc->allProject);
|
||||
$this->config->doc->search['params']['project']['values'] = array(''=>'') + $this->loadModel('execution')->getPairs($this->session->PRJ, 'all', 'noclosed') + array('all'=>$this->lang->doc->allProject);
|
||||
$this->config->doc->search['params']['lib']['values'] = array(''=>'', $libID => ($libID ? $libs[$libID] : 0), 'all' => $this->lang->doclib->all);
|
||||
|
||||
/* Get the modules. */
|
||||
@@ -1141,7 +1141,7 @@ class docModel extends model
|
||||
$objectList = $this->loadModel('product')->getPairs();
|
||||
}
|
||||
|
||||
if($type == 'project') $objectList = $this->loadModel('project')->getExecutionsByProject($projectID, $executionStatus, 0, true);
|
||||
if($type == 'project') $objectList = $this->loadModel('execution')->getByProject($projectID, $executionStatus, 0, true);
|
||||
if(empty($objectList)) return $libs;
|
||||
|
||||
$docLibs = $this->dao->select('*')->from(TABLE_DOCLIB)
|
||||
@@ -1565,7 +1565,7 @@ class docModel extends model
|
||||
public function getLibIdListByProject($projectID = 0)
|
||||
{
|
||||
$products = $this->loadModel('product')->getProductIDByProject($projectID, false);
|
||||
$projects = $this->loadModel('project')->getExecutionPairs($projectID, 'all', 'noclosed');
|
||||
$projects = $this->loadModel('execution')->getPairs($projectID, 'all', 'noclosed');
|
||||
|
||||
$projectLibs = array();
|
||||
$productLibs = array();
|
||||
@@ -1592,7 +1592,7 @@ class docModel extends model
|
||||
$today = date('Y-m-d');
|
||||
$lately = date('Y-m-d', strtotime('-3 day'));
|
||||
$statisticInfo = $this->dao->select("count(id) as totalDocs, count(editedDate like '{$today}%' or null) as todayEditedDocs,
|
||||
count(editedDate > '{$lately}' or null) as lastEditedDocs, count(addedDate > '{$lately}' or null) as lastAddedDocs,
|
||||
count(editedDate > '{$lately}' or null) as lastEditedDocs, count(addedDate > '{$lately}' or null) as lastAddedDocs,
|
||||
count(collector like '%,{$this->app->user->account},%' or null) as myCollection, count(addedBy = '{$this->app->user->account}' or null) as myDocs")->from(TABLE_DOC)
|
||||
->where('deleted')->eq(0)
|
||||
->andWhere('id')->in($docIdList)
|
||||
|
||||
+682
-679
File diff suppressed because it is too large
Load Diff
@@ -98,6 +98,10 @@ $lang->execution->endList[93] = '3 Months';
|
||||
$lang->execution->endList[186] = '6 Months';
|
||||
$lang->execution->endList[365] = '1 Year';
|
||||
|
||||
$lang->execution->lifeTimeList['short'] = "Short-Term";
|
||||
$lang->execution->lifeTimeList['long'] = "Long-Term";
|
||||
$lang->execution->lifeTimeList['ops'] = "DevOps";
|
||||
|
||||
$lang->team = new stdclass();
|
||||
$lang->team->account = 'User';
|
||||
$lang->team->role = 'Role';
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
<?php
|
||||
/**
|
||||
* The project module zh-cn file of ZenTaoMS.
|
||||
* The execution module zh-cn file of ZenTaoMS.
|
||||
*
|
||||
* @copyright Copyright 2009-2015 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
|
||||
* @license ZPL (http://zpl.pub/page/zplv12.html)
|
||||
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
|
||||
* @package project
|
||||
* @package execution
|
||||
* @version $Id: zh-cn.php 5094 2013-07-10 08:46:15Z chencongzhi520@gmail.com $
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
@@ -98,6 +98,10 @@ $lang->execution->endList[93] = '三个月';
|
||||
$lang->execution->endList[186] = '半年';
|
||||
$lang->execution->endList[365] = '一年';
|
||||
|
||||
$lang->execution->lifeTimeList['short'] = "短期";
|
||||
$lang->execution->lifeTimeList['long'] = "长期";
|
||||
$lang->execution->lifeTimeList['ops'] = "运维";
|
||||
|
||||
$lang->team = new stdclass();
|
||||
$lang->team->account = '用户';
|
||||
$lang->team->role = '角色';
|
||||
|
||||
+651
-665
File diff suppressed because it is too large
Load Diff
@@ -1,23 +1,23 @@
|
||||
<?php
|
||||
/**
|
||||
* The create view of project module of ZenTaoPMS.
|
||||
* The create view of execution 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 Chunsheng Wang <chunsheng@cnezsoft.com>
|
||||
* @package project
|
||||
* @package execution
|
||||
* @version $Id: create.html.php 4728 2013-05-03 06:14:34Z chencongzhi520@gmail.com $
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
?>
|
||||
<?php if(isset($tips)):?>
|
||||
<?php $defaultURL = $this-> createLink('project', 'task', 'projectID=' . $projectID);?>
|
||||
<?php $defaultURL = $this-> createLink('execution', 'task', 'executionID=' . $executionID);?>
|
||||
<?php include '../../common/view/header.lite.html.php';?>
|
||||
<body>
|
||||
<div class='modal-dialog mw-500px' id='tipsModal'>
|
||||
<div class='modal-header'>
|
||||
<a href='<?php echo $defaultURL;?>' class='close'><i class="icon icon-close"></i></a>
|
||||
<h4 class='modal-title' id='myModalLabel'><?php echo $lang->project->tips;?></h4>
|
||||
<h4 class='modal-title' id='myModalLabel'><?php echo $lang->execution->tips;?></h4>
|
||||
</div>
|
||||
<div class='modal-body'>
|
||||
<?php echo $tips;?>
|
||||
@@ -31,57 +31,57 @@
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<?php include '../../common/view/kindeditor.html.php';?>
|
||||
<?php js::import($jsRoot . 'misc/date.js');?>
|
||||
<?php js::set('weekend', $config->project->weekend);?>
|
||||
<?php js::set('holders', $lang->project->placeholder);?>
|
||||
<?php js::set('errorSameProducts', $lang->project->errorSameProducts);?>
|
||||
<?php js::set('weekend', $config->execution->weekend);?>
|
||||
<?php js::set('holders', $lang->execution->placeholder);?>
|
||||
<?php js::set('errorSameProducts', $lang->execution->errorSameProducts);?>
|
||||
<?php js::set('productID', empty($productID) ? 0 : $productID);?>
|
||||
<?php js::set('isStage', $isStage);?>
|
||||
<div id='mainContent' class='main-content'>
|
||||
<div class='center-block'>
|
||||
<div class='main-header'>
|
||||
<h2><?php echo $lang->project->create;?></h2>
|
||||
<h2><?php echo $lang->execution->create;?></h2>
|
||||
<div class="pull-right btn-toolbar">
|
||||
<button type='button' class='btn btn-link' data-toggle='modal' data-target='#copyProjectModal'><?php echo html::icon($lang->icons['copy'], 'muted') . ' ' . $lang->project->copy;?></button>
|
||||
<button type='button' class='btn btn-link' data-toggle='modal' data-target='#copyProjectModal'><?php echo html::icon($lang->icons['copy'], 'muted') . ' ' . $lang->execution->copy;?></button>
|
||||
</div>
|
||||
</div>
|
||||
<form class='form-indicator main-form form-ajax' method='post' target='hiddenwin' id='dataform'>
|
||||
<table class='table table-form'>
|
||||
<tr>
|
||||
<th class='w-120px'><?php echo $lang->project->name;?></th>
|
||||
<th class='w-120px'><?php echo $lang->execution->name;?></th>
|
||||
<td class="col-main"><?php echo html::input('name', $name, "class='form-control' required");?></td>
|
||||
<td></td><td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->project->code;?></th>
|
||||
<th><?php echo $lang->execution->code;?></th>
|
||||
<td><?php echo html::input('code', $code, "class='form-control' required");?></td><td></td><td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->project->dateRange;?></th>
|
||||
<th><?php echo $lang->execution->dateRange;?></th>
|
||||
<td>
|
||||
<div class='input-group'>
|
||||
<?php echo html::input('begin', (isset($plan) && !empty($plan->begin) ? $plan->begin : date('Y-m-d')), "class='form-control form-date' onchange='computeWorkDays()' placeholder='" . $lang->project->begin . "' required");?>
|
||||
<span class='input-group-addon'><?php echo $lang->project->to;?></span>
|
||||
<?php echo html::input('end', (isset($plan) && !empty($plan->end) ? $plan->end : ''), "class='form-control form-date' onchange='computeWorkDays()' placeholder='" . $lang->project->end . "' required");?>
|
||||
<?php echo html::input('begin', (isset($plan) && !empty($plan->begin) ? $plan->begin : date('Y-m-d')), "class='form-control form-date' onchange='computeWorkDays()' placeholder='" . $lang->execution->begin . "' required");?>
|
||||
<span class='input-group-addon'><?php echo $lang->execution->to;?></span>
|
||||
<?php echo html::input('end', (isset($plan) && !empty($plan->end) ? $plan->end : ''), "class='form-control form-date' onchange='computeWorkDays()' placeholder='" . $lang->execution->end . "' required");?>
|
||||
</div>
|
||||
</td>
|
||||
<td colspan='2'><?php echo html::radio('delta', $lang->project->endList , '', "onclick='computeEndDate(this.value)'");?></td>
|
||||
<td colspan='2'><?php echo html::radio('delta', $lang->execution->endList , '', "onclick='computeEndDate(this.value)'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->project->days;?></th>
|
||||
<th><?php echo $lang->execution->days;?></th>
|
||||
<td>
|
||||
<div class='input-group'>
|
||||
<?php echo html::input('days', (isset($plan) && !empty($plan->begin) ? helper::workDays($plan->begin, $plan->end) : ''), "class='form-control'");?>
|
||||
<span class='input-group-addon'><?php echo $lang->project->day;?></span>
|
||||
<span class='input-group-addon'><?php echo $lang->execution->day;?></span>
|
||||
</div>
|
||||
</td><td></td><td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->project->teamname;?></th>
|
||||
<th><?php echo $lang->execution->teamname;?></th>
|
||||
<td><?php echo html::input('team', $team, "class='form-control'");?></td><td></td><td></td>
|
||||
</tr>
|
||||
<?php if(!$isSprint):?>
|
||||
<tr>
|
||||
<th><?php echo $lang->project->type;?></th>
|
||||
<th><?php echo $lang->execution->type;?></th>
|
||||
<td>
|
||||
<?php
|
||||
if($isStage)
|
||||
@@ -90,11 +90,11 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
echo html::select('lifetime', $lang->program->PRJLifeTimeList, '', "class='form-control' onchange='showLifeTimeTips()'");
|
||||
echo html::select('lifetime', $lang->execution->lifeTimeList, '', "class='form-control' onchange='showLifeTimeTips()'");
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
<td class='muted' colspan='2'><div id='lifeTimeTips'><?php echo $lang->project->typeDesc;?></div></td>
|
||||
<td class='muted' colspan='2'><div id='lifeTimeTips'><?php echo $lang->execution->typeDesc;?></div></td>
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
<?php if($isStage):?>
|
||||
@@ -109,14 +109,14 @@
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
<tr class='hide'>
|
||||
<th><?php echo $lang->project->status;?></th>
|
||||
<th><?php echo $lang->execution->status;?></th>
|
||||
<td><?php echo html::hidden('status', 'wait');?></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<?php $this->printExtendFields('', 'table', 'columns=3');?>
|
||||
<tr>
|
||||
<th><?php echo $lang->project->manageProducts;?></th>
|
||||
<th><?php echo $lang->execution->manageProducts;?></th>
|
||||
<td class='text-left' id="<?php echo $isStage ? '' : 'productsBox';?>" colspan="3">
|
||||
<div class='row'>
|
||||
<?php $i = 0;?>
|
||||
@@ -141,13 +141,13 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->project->linkPlan;?></th>
|
||||
<th><?php echo $lang->execution->linkPlan;?></th>
|
||||
<td colspan="3" id="plansBox">
|
||||
<div class='row'>
|
||||
<?php if(isset($plan) && !empty($plan->begin)):?>
|
||||
<div class="col-sm-4" id="plan0"><?php echo html::select("plans[" . $plan->product . "]", $productPlan, $plan->id, "class='form-control chosen'");?></div>
|
||||
<?php js::set('currentPlanID', $plan->id)?>
|
||||
<?php elseif($copyProjectID):?>
|
||||
<?php elseif($copyExecutionID):?>
|
||||
<?php $i = 0;?>
|
||||
<?php foreach($products as $product):?>
|
||||
<?php $plans = zget($productPlans, $product->id, array(0 => ''));?>
|
||||
@@ -162,15 +162,15 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->project->desc;?></th>
|
||||
<th><?php echo $lang->execution->desc;?></th>
|
||||
<td colspan='3'>
|
||||
<?php echo $this->fetch('user', 'ajaxPrintTemplates', 'type=project&link=desc');?>
|
||||
<?php echo $this->fetch('user', 'ajaxPrintTemplates', 'type=execution&link=desc');?>
|
||||
<?php echo html::textarea('desc', '', "rows='6' class='form-control kindeditor' hidefocus='true'");?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->project->acl;?></th>
|
||||
<td colspan='3'><?php echo nl2br(html::radio('acl', $lang->project->aclList, $acl, "onclick='setWhite(this.value);'", 'block'));?></td>
|
||||
<th><?php echo $lang->execution->acl;?></th>
|
||||
<td colspan='3'><?php echo nl2br(html::radio('acl', $lang->execution->aclList, $acl, "onclick='setWhite(this.value);'", 'block'));?></td>
|
||||
</tr>
|
||||
<tr class="hidden" id="whitelistBox">
|
||||
<th><?php echo $lang->whitelist;?></th>
|
||||
@@ -193,20 +193,20 @@
|
||||
<div class='modal-dialog mw-900px'>
|
||||
<div class='modal-header'>
|
||||
<button type='button' class='close' data-dismiss='modal'><i class="icon icon-close"></i></button>
|
||||
<h4 class='modal-title' id='myModalLabel'><?php echo $lang->project->copyTitle;?></h4>
|
||||
<h4 class='modal-title' id='myModalLabel'><?php echo $lang->execution->copyTitle;?></h4>
|
||||
</div>
|
||||
<div class='modal-body'>
|
||||
<?php if(count($projects) == 1):?>
|
||||
<?php if(count($executions) == 1):?>
|
||||
<div class='alert with-icon'>
|
||||
<i class='icon-exclamation-sign'></i>
|
||||
<div class='content'><?php echo $lang->project->copyNoProject;?></div>
|
||||
<div class='content'><?php echo $lang->execution->copyNoProject;?></div>
|
||||
</div>
|
||||
<?php else:?>
|
||||
<div id='copyProjects' class='row'>
|
||||
<?php foreach ($projects as $id => $name):?>
|
||||
<?php foreach ($executions as $id => $name):?>
|
||||
<?php if(empty($id)):?>
|
||||
<?php if($copyProjectID != 0):?>
|
||||
<div class='col-md-4 col-sm-6'><a href='javascript:;' data-id='' class='cancel'><?php echo html::icon($lang->icons['cancel']) . ' ' . $lang->project->cancelCopy;?></a></div>
|
||||
<div class='col-md-4 col-sm-6'><a href='javascript:;' data-id='' class='cancel'><?php echo html::icon($lang->icons['cancel']) . ' ' . $lang->execution->cancelCopy;?></a></div>
|
||||
<?php endif;?>
|
||||
<?php else: ?>
|
||||
<div class='col-md-4 col-sm-6'><a href='javascript:;' data-id='<?php echo $id;?>' class='nobr <?php echo ($copyProjectID == $id) ? ' active' : '';?>'><?php echo html::icon($lang->icons[$iconObject], 'text-muted') . ' ' . $name;?></a></div>
|
||||
|
||||
@@ -140,13 +140,6 @@ $lang->project->currencySymbol['SGD'] = 'S$';
|
||||
$lang->project->modelList['scrum'] = "Scrum";
|
||||
$lang->project->modelList['waterfall'] = "CMMI";
|
||||
|
||||
$lang->project->categoryList['single'] = "Single product";
|
||||
$lang->project->categoryList['multiple'] = "Multiple products";
|
||||
|
||||
$lang->project->lifeTimeList['short'] = "Short-Term";
|
||||
$lang->project->lifeTimeList['long'] = "Long-Term";
|
||||
$lang->project->lifeTimeList['ops'] = "DevOps";
|
||||
|
||||
$lang->project->featureBar['all'] = 'All';
|
||||
$lang->project->featureBar['doing'] = 'Going';
|
||||
$lang->project->featureBar['wait'] = 'Waiting';
|
||||
|
||||
@@ -140,13 +140,6 @@ $lang->project->currencySymbol['SGD'] = 'S$';
|
||||
$lang->project->modelList['scrum'] = "Scrum";
|
||||
$lang->project->modelList['waterfall'] = "瀑布";
|
||||
|
||||
$lang->project->categoryList['single'] = "单产品项目";
|
||||
$lang->project->categoryList['multiple'] = "多产品项目";
|
||||
|
||||
$lang->project->lifeTimeList['short'] = "短期";
|
||||
$lang->project->lifeTimeList['long'] = "长期";
|
||||
$lang->project->lifeTimeList['ops'] = "运维";
|
||||
|
||||
$lang->project->featureBar['all'] = '所有';
|
||||
$lang->project->featureBar['doing'] = '进行中';
|
||||
$lang->project->featureBar['wait'] = '未开始';
|
||||
|
||||
@@ -201,11 +201,10 @@ class projectModel extends model
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getInfo($status = 'undone', $itemCounts = 30, $orderBy = 'order_desc', $pager = null)
|
||||
public function getInfoList($status = 'undone', $itemCounts = 30, $orderBy = 'order_desc', $pager = null)
|
||||
{
|
||||
/* Init vars. */
|
||||
$this->loadModel('project');
|
||||
$projects = $this->getList(0, $status, 0, $orderBy, $pager);
|
||||
$projects = $this->loadModel('program')->getProjectList(0, $status, 0, $orderBy, $pager);
|
||||
if(empty($projects)) return array();
|
||||
|
||||
$projectIdList = array_keys($projects);
|
||||
@@ -222,11 +221,12 @@ class projectModel extends model
|
||||
->fetchAll('PRJ');
|
||||
|
||||
$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->project->getExecutionStats($projectID, 'undone', 0, 0, 30, $orderBy, $pager);
|
||||
$project->executions = $this->execution->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);
|
||||
@@ -262,7 +262,7 @@ class projectModel extends model
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getOverview($queryType = 'byStatus', $param = 'all', $orderBy = 'id_desc', $limit = 15)
|
||||
public function getOverviewList($queryType = 'byStatus', $param = 'all', $orderBy = 'id_desc', $limit = 15)
|
||||
{
|
||||
$queryType = strtolower($queryType);
|
||||
$projects = $this->dao->select('*')->from(TABLE_PROJECT)
|
||||
|
||||
Reference in New Issue
Block a user