* Code for task #92317.
This commit is contained in:
@@ -113,11 +113,17 @@ class programplan extends control
|
||||
$plans = $this->programplan->getPlans($projectID, $productID, $sort);
|
||||
}
|
||||
|
||||
$project = $this->project->getByID($projectID);
|
||||
if($project->model == 'ipd' and $this->config->edition == 'ipd')
|
||||
{
|
||||
$this->view->reviewPoints = $this->loadModel('review')->getReviewPointByProject($projectID);
|
||||
}
|
||||
|
||||
$zooming = !empty($this->config->programplan->ganttCustom->zooming) ? $this->config->programplan->ganttCustom->zooming : 'day';
|
||||
$this->view->title = $this->lang->programplan->browse;
|
||||
$this->view->position[] = $this->lang->programplan->browse;
|
||||
$this->view->projectID = $projectID;
|
||||
$this->view->project = $this->project->getByID($projectID);
|
||||
$this->view->project = $project;
|
||||
$this->view->productID = $productID;
|
||||
$this->view->product = $this->product->getByID($productID);
|
||||
$this->view->productList = $this->product->getProductPairsByProject($projectID, 'all', '', false);
|
||||
|
||||
@@ -21,6 +21,7 @@ $lang->programplan->close = 'Close Stage';
|
||||
$lang->programplan->activate = 'Activate Stage';
|
||||
$lang->programplan->createSubPlan = 'Create Sub Plan';
|
||||
$lang->programplan->subPlanManage = 'Sub-stages management';
|
||||
$lang->programplan->submit = 'Submit';
|
||||
|
||||
$lang->programplan->parent = 'Parent Stage';
|
||||
$lang->programplan->emptyParent = 'N/A';
|
||||
|
||||
@@ -21,6 +21,7 @@ $lang->programplan->close = 'Close Stage';
|
||||
$lang->programplan->activate = 'Activate Stage';
|
||||
$lang->programplan->createSubPlan = 'Create Sub Stage';
|
||||
$lang->programplan->subPlanManage = 'Sub-stages management';
|
||||
$lang->programplan->submit = 'Submit';
|
||||
|
||||
$lang->programplan->parent = 'Parent Stage';
|
||||
$lang->programplan->emptyParent = 'N/A';
|
||||
|
||||
@@ -21,6 +21,7 @@ $lang->programplan->close = 'Close Stage';
|
||||
$lang->programplan->activate = 'Activate Stage';
|
||||
$lang->programplan->createSubPlan = 'Create Sub Plan';
|
||||
$lang->programplan->subPlanManage = 'Sub-stages management';
|
||||
$lang->programplan->submit = 'Submit';
|
||||
|
||||
$lang->programplan->parent = 'Parent Stage';
|
||||
$lang->programplan->emptyParent = 'N/A';
|
||||
|
||||
@@ -21,6 +21,7 @@ $lang->programplan->close = '关闭阶段';
|
||||
$lang->programplan->activate = '激活阶段';
|
||||
$lang->programplan->createSubPlan = '创建子阶段';
|
||||
$lang->programplan->subPlanManage = '子阶段的管理方法';
|
||||
$lang->programplan->submit = '提交评审';
|
||||
|
||||
$lang->programplan->parent = '父阶段';
|
||||
$lang->programplan->emptyParent = '无';
|
||||
|
||||
@@ -368,10 +368,11 @@ class programplanModel extends model
|
||||
if($project->model == 'ipd' and $datas)
|
||||
{
|
||||
$this->loadModel('review');
|
||||
$reviewPoints = $this->dao->select('*')->from(TABLE_OBJECT)
|
||||
->where('deleted')->eq('0')
|
||||
->andWhere('project')->eq($projectID)
|
||||
->beginIF($productID)->andWhere('product')->eq($productID)->fi()
|
||||
$reviewPoints = $this->dao->select('t1.*, t2.status')->from(TABLE_OBJECT)->alias('t1')
|
||||
->leftJoin(TABLE_REVIEW)->alias('t2')->on('t1.id = t2.object')
|
||||
->where('t1.deleted')->eq('0')
|
||||
->andWhere('t1.project')->eq($projectID)
|
||||
->beginIF($productID)->andWhere('t1.product')->eq($productID)->fi()
|
||||
->fetchAll('id');
|
||||
|
||||
foreach($datas['data'] as $plan)
|
||||
|
||||
@@ -12,6 +12,8 @@
|
||||
?>
|
||||
<?php chdir(__DIR__);?>
|
||||
<?php include '../../common/view/gantt.html.php';?>
|
||||
<?php if($project->model == 'ipd') js::set('reviewPoints', json_encode($reviewPoints));?>
|
||||
<?php js::set('projectID', $projectID);?>
|
||||
<style>
|
||||
.submitBtn{display:none}
|
||||
.gantt_row_task:hover .submitBtn{ display: inline-block;}
|
||||
@@ -619,7 +621,7 @@ $(function()
|
||||
|
||||
function getSubmitBtn(task)
|
||||
{
|
||||
if(task.type == 'point') return '<button class="btn btn-link submitBtn" title="<?php echo $lang->review->submit;?>"><i class="icon-confirm"></i></button>';
|
||||
if(task.type == 'point') return '<button class="btn btn-link submitBtn" title="<?php echo $lang->programplan->submit;?>"><i class="icon-confirm"></i></button>';
|
||||
}
|
||||
|
||||
gantt.templates.task_end_date = function(data)
|
||||
@@ -764,6 +766,25 @@ $(function()
|
||||
gantt.attachEvent('onTaskClick', function(id, e)
|
||||
{
|
||||
if($(e.srcElement).hasClass('gantt_close') || $(e.srcElement).hasClass('gantt_open')) return false;
|
||||
if($(e.srcElement).hasClass('icon-confirm'))
|
||||
{
|
||||
var pointAttr = JSON.parse(reviewPoints);
|
||||
var category = id.split("-")[1];
|
||||
|
||||
if(pointAttr[category]['disabled'])
|
||||
{
|
||||
new $.zui.Messager(pointAttr[category]['message'], {
|
||||
type: 'danger',
|
||||
icon: 'exclamation-sign'
|
||||
}).show();
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
location.href = createLink('review', 'create', 'projectID=' + projectID);
|
||||
}
|
||||
}
|
||||
|
||||
if(ganttType == 'assignedTo')
|
||||
{
|
||||
taskID = id;
|
||||
|
||||
Reference in New Issue
Block a user