Merge branch 'master' of github.com:easysoft/zentaopms
This commit is contained in:
@@ -274,3 +274,8 @@ $lang->task->report->tasksPerClosedReason->graph->xAxisName = '关闭原因';
|
||||
|
||||
$lang->task->report->finishedTasksPerDay->type = 'bar';
|
||||
$lang->task->report->finishedTasksPerDay->graph->xAxisName = '日期';
|
||||
|
||||
$lang->task->action = new stdclass();
|
||||
$lang->task->action->batchcreate = array('main' => '$date, 由 <strong>$actor</strong> 创建子任务 。');
|
||||
$lang->task->action->unlink = array('main' => '$date, 由 <strong>$actor</strong> 取消关联父任务 。');
|
||||
$lang->task->action->linkto = array('main' => '$date, 由 <strong>$actor</strong> 关联到父任务 。');
|
||||
|
||||
@@ -289,6 +289,8 @@ class taskModel extends model
|
||||
if($task->estimate) $task->estimate = (float)$task->estimate;
|
||||
}
|
||||
|
||||
$childTasks = null;
|
||||
|
||||
foreach($data as $i => $task)
|
||||
{
|
||||
$this->dao->insert(TABLE_TASK)->data($task)
|
||||
@@ -300,6 +302,7 @@ class taskModel extends model
|
||||
if(dao::isError()) die(js::error(dao::getError()));
|
||||
|
||||
$taskID = $this->dao->lastInsertID();
|
||||
$childTasks .= html::a(helper::createLink('task', 'view', 'taskID=' . $taskID), $task->name, '', "title='$task->name' class='text-ellipsis w-p10'") . ',';
|
||||
if($story) $this->story->setStage($task->story);
|
||||
$actionID = $this->action->create('task', $taskID, 'Opened', '');
|
||||
if(!dao::isError()) $this->loadModel('score')->create('task', 'create', $taskID);
|
||||
@@ -315,6 +318,7 @@ class taskModel extends model
|
||||
$this->updateParentStatus($taskID);
|
||||
$this->computeBeginAndEnd($parentID);
|
||||
$this->dao->update(TABLE_TASK)->set('parent')->eq(-1)->where('id')->eq($parentID)->exec();
|
||||
$this->action->create('task', $parentID, 'batchCreate', $childTasks);
|
||||
}
|
||||
return $mails;
|
||||
}
|
||||
@@ -673,6 +677,14 @@ class taskModel extends model
|
||||
$this->dao->update(TABLE_TASK)->set('project')->eq($task->project)->set('module')->eq($task->module)->where('parent')->eq($taskID)->exec();
|
||||
}
|
||||
|
||||
if(isset($task->parent) and $task->parent != $oldTask->parent)
|
||||
{
|
||||
$comment = html::a(helper::createLink('task', 'view', 'taskID=' . $taskID), $task->name);
|
||||
$this->loadModel('action')->create('task', $task->parent, 'linkTo', $comment);
|
||||
$this->loadModel('action')->create('task', $oldTask->parent, 'unLink', $comment);
|
||||
|
||||
}
|
||||
|
||||
$task = $this->loadModel('file')->processImgURL($task, $this->config->task->editor->edit['id'], $this->post->uid);
|
||||
|
||||
$teams = array();
|
||||
|
||||
@@ -167,7 +167,7 @@
|
||||
common::printIcon('task', 'edit', "taskID=$task->id", $task, 'button', '', '', 'showinonlybody');
|
||||
common::printIcon('task', 'create', "projctID={$task->project}&storyID=0&moduleID=0&taskID=$task->id", $task, 'button', 'copy');
|
||||
common::printIcon('task', 'delete', "projectID=$task->project&taskID=$task->id", $task, 'button', 'trash', 'hiddenwin');
|
||||
|
||||
if($task->parent <= 0) common::printIcon('task', 'batchCreate', "project=$task->project&storyID=$task->story&moduleID=$task->module&taskID=$task->id&ifame=0", $task, 'list', 'treemap-alt', '', '', '', '', $this->lang->task->children);
|
||||
if($task->parent > 0) echo html::a(helper::createLink('task', 'view', "taskID=$task->parent"), "<i class='icon icon-chevron-double-up'></i>", '', "class='btn btn-link' title='{$lang->task->parent}'");
|
||||
?>
|
||||
<?php endif;?>
|
||||
|
||||
Reference in New Issue
Block a user