This commit is contained in:
tanghucheng
2022-11-15 13:09:44 +08:00
parent f017fddb67
commit 9835f45987
3 changed files with 9 additions and 7 deletions

View File

@@ -42,10 +42,12 @@
<?php if(common::hasPriv('execution', 'task')) echo html::checkbox('showTask', array('1' => $lang->programplan->stageCustom->task), '', $this->cookie->showTask ? 'checked=checked' : '');?>
</div>
<div class='btn-toolbar pull-right'>
<?php if($project->model == 'waterfall'):?>
<div class="btn-group">
<?php echo html::a('', "<i class='icon-list'></i> &nbsp;", '', "class='btn btn-icon text-primary switchBtn' title='{$lang->project->bylist}'");?>
<?php echo html::a($this->createLink('programplan', 'browse', "projectID=$projectID&productID=$productID&type=gantt"), "<i class='icon-gantt-alt'></i> &nbsp;", '', "class='btn btn-icon switchBtn' title='{$lang->programplan->gantt}'");?>
</div>
<?php endif;?>
<?php common::printLink('execution', 'export', "status=$status&productID=$productID&orderBy=$orderBy&from=project", "<i class='icon-export muted'> </i> " . $lang->export, '', "class='btn btn-link export'")?>
<?php if(common::hasPriv('programplan', 'create') and $isStage):?>
<?php echo html::a($this->createLink('programplan', 'create', "projectID=$projectID&productID=$productID"), "<i class='icon icon-plus'></i> " . $lang->programplan->create, '', "class='btn btn-primary'");?>

View File

@@ -159,14 +159,14 @@ class transfer extends control
if($model == 'story')
{
$product = $this->loadModel('product')->getByID($this->session->storyPortParams['productID']);
$product = $this->loadModel('product')->getByID($this->session->storyTransferParams['productID']);
if($product->type == 'normal') unset($fields['branch']);
if($this->session->storyType == 'requirement') unset($fields['plan']);
}
if($model == 'bug')
{
$product = $this->loadModel('product')->getByID($this->session->bugPortParams['productID']);
$product = $this->loadModel('product')->getByID($this->session->bugTransferParams['productID']);
if($product->type == 'normal') unset($fields['branch']);
if($product->shadow and ($this->app->tab == 'execution' or $this->app->tab == 'project')) unset($fields['product']);
}

View File

@@ -56,16 +56,16 @@ class transferModel extends model
}
/**
* Check tmpFile.
* Check tmp file.
*
* @access public
* @return void
*/
public function checkTmpFile()
{
$file = $this->session->fileImportFileName;
$tmpPath = $this->loadModel('file')->getPathOfImportedFile();
$tmpFile = $tmpPath . DS . md5(basename($file));
$file = $this->session->fileImportFileName;
$tmpPath = $this->loadModel('file')->getPathOfImportedFile();
$tmpFile = $tmpPath . DS . md5(basename($file));
if($this->maxImport and file_exists($tmpFile)) return $tmpFile;
return false;
@@ -196,7 +196,7 @@ class transferModel extends model
$rows = $this->getRows($model, $fieldList);
if($model == 'story')
{
$product = $this->loadModel('product')->getByID((int)$this->session->storyPortParams['productID']);
$product = $this->loadModel('product')->getByID((int)$this->session->storyTransferParams['productID']);
if($product and $product->shadow)
{
foreach($rows as $id => $row)