- Remove 'from' param.

This commit is contained in:
zhujinyong
2021-03-15 12:35:33 +08:00
parent 7cbb6731e9
commit 11aacd45d7
4 changed files with 9 additions and 12 deletions
+1 -1
View File
@@ -30,7 +30,7 @@
<?php if(isset($this->config->maxVersion)):?>
<?php common::printLink('project', 'createGuide', "programID=0&from=PGM", '<i class="icon icon-plus"></i>' . $lang->project->create, '', 'class="btn btn-primary" data-toggle="modal" data-target="#guideDialog"');?>
<?php elseif($this->config->systemMode == 'new'):?>
<?php common::printLink('project', 'create', "mode=scrum&programID=0&from=program", '<i class="icon icon-plus"></i>' . $lang->project->create, '', 'class="btn btn-primary"');?>
<?php common::printLink('project', 'create', "mode=scrum&programID=0", '<i class="icon icon-plus"></i>' . $lang->project->create, '', 'class="btn btn-primary"');?>
<?php endif;?>
</div>
</div>
+3 -5
View File
@@ -262,12 +262,11 @@ class project extends control
*
* @param string $model
* @param int $programID
* @param string $from project|program
* @param int $copyProjectID
* @access public
* @return void
*/
public function create($model = 'waterfall', $programID = 0, $from = 'project', $copyProjectID = '')
public function create($model = 'waterfall', $programID = 0, $copyProjectID = 0)
{
if($_POST)
{
@@ -276,7 +275,7 @@ class project extends control
$this->loadModel('action')->create('project', $projectID, 'opened');
if($from == 'program')
if($this->app->openApp == 'program')
{
$this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => $this->createLink('program', 'browse')));
}
@@ -344,7 +343,6 @@ class project extends control
$this->view->auth = $auth;
$this->view->whitelist = $whitelist;
$this->view->copyProjectID = $copyProjectID;
$this->view->from = $from;
$this->view->programList = $this->program->getParentPairs();
$this->view->parentProgram = $parentProgram;
$this->view->URSRPairs = $this->loadModel('custom')->getURSRPairs();
@@ -505,7 +503,7 @@ class project extends control
$this->app->session->set('projectBrowse', $this->app->getURI(true));
$products = $this->loadModel('product')->getProducts($projectID);;
$products = $this->loadModel('product')->getProducts($projectID);
$linkedBranches = array();
foreach($products as $product)
{
+3 -3
View File
@@ -25,7 +25,7 @@ $(function()
});
/**
* Set parent project.
* Set parent program.
*
* @access public
* @return void
@@ -33,7 +33,7 @@ $(function()
function setParentProgram()
{
var parentProgram = $("#parent").val();
location.href = createLink('project', 'create', 'model=' + model + '&projectID=' + parentProgram + '&from=' + from);
location.href = createLink('project', 'create', 'model=' + model + '&programID=' + parentProgram);
}
/**
@@ -45,7 +45,7 @@ function setParentProgram()
*/
function setCopyProject(copyProjectID)
{
location.href = createLink('project', 'create', 'model=' + model + '&programID=' + programID + '&from=' + from + '&copyProjectID=' + copyProjectID);
location.href = createLink('project', 'create', 'model=' + model + '&programID=' + programID + '&copyProjectID=' + copyProjectID);
}
/**
+2 -3
View File
@@ -1,12 +1,12 @@
<?php
/**
* The prjcreate view file of project module of ZenTaoPMS.
* The create view file of project 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
* @version $Id: prjcreate.html.php 4769 2013-05-05 07:24:21Z wwccss $
* @version $Id: create.html.php 4769 2013-05-05 07:24:21Z wwccss $
* @link http://www.zentao.net
*/
?>
@@ -16,7 +16,6 @@
<?php js::set('model', $model);?>
<?php js::set('programID', $programID);?>
<?php js::set('copyProjectID', $copyProjectID);?>
<?php js::set('from', $from);?>
<?php js::set('weekend', $config->execution->weekend);?>
<?php js::set('errorSameProducts', $lang->project->errorSameProducts);?>
<?php js::set('longTime', $lang->project->longTime);?>