* Delete the tips to create a task.

This commit is contained in:
tianshujie98
2020-11-26 11:29:41 +08:00
parent f0a812a946
commit 60ba1e7b2e
9 changed files with 7 additions and 122 deletions
+7 -36
View File
@@ -14,7 +14,6 @@ class program extends control
{
parent::__construct($moduleName, $methodName);
$this->loadModel('project');
$this->loadModel('programplan');
$this->loadModel('group');
}
@@ -685,11 +684,10 @@ class program extends control
* @param int $programID
* @param string $from PRJ|PGM
* @param int $copyProjectID
* @param int $projectID
* @access public
* @return void
*/
public function PRJCreate($model = 'waterfall', $programID = 0, $from = 'PRJ', $copyProjectID = '', $projectID = 0)
public function PRJCreate($model = 'waterfall', $programID = 0, $from = 'PRJ', $copyProjectID = '')
{
$this->app->loadLang('custom');
if($from == 'PRJ')
@@ -702,17 +700,6 @@ class program extends control
$this->lang->program->switcherMenu = $this->program->getPGMCommonAction();
}
if($projectID)
{
$this->view->title = $this->lang->program->tips;
$this->view->tips = $this->fetch('program', 'tips', "model=$model&programID=$programID&from=$from&projectID=$projectID");
$this->view->programID = $programID;
$this->view->from = $from;
$this->view->projectID = $projectID;
$this->display();
exit;
}
if($_POST)
{
$projectID = $this->program->PRJCreate();
@@ -720,7 +707,12 @@ class program extends control
$this->loadModel('action')->create('project', $projectID, 'opened');
$this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => $this->createLink('program', 'PRJCreate', "model=$model&programID=$programID&from=$from&copyProjectID=&projectID=$projectID", '', '',$projectID)));
if($from == 'PGM')
{
$this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => inlink('PGMBrowse')));
}
$this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => inlink('PRJBrowse', array('programID' => $programID, 'browseType' => 'all'))));
}
$name = '';
@@ -1442,25 +1434,4 @@ class program extends control
echo $this->fetch('program', 'PGMProduct', "programID=$programID");
}
/**
* When create a project, help the user.
*
* @param string $model
* @param int $programID
* @param string $from PRJ|PGM
* @param int $projectID
* @access public
* @return void
*/
public function tips($model = 'waterfall', $programID = 0, $from = 'PRJ', $projectID)
{
$this->view->model = $model;
$this->view->programID = $programID;
$this->view->from = $from;
$this->view->projectID = $projectID;
$this->view->project = $this->project->getById($projectID);
$this->display('program', 'tips');
}
}