* Fix index method of project.

This commit is contained in:
zhujinyong
2021-03-08 16:55:05 +08:00
parent 4caf65064c
commit c10961bede
3 changed files with 2 additions and 7 deletions
-5
View File
@@ -94,11 +94,6 @@
return link.prj ? 'project' : 'report';
}
}
if(moduleName === 'program')
{
if(methodLowerCase.indexOf('pgm') === 0) return 'program';
if(methodLowerCase === 'index' || methodLowerCase.indexOf('prj') === 0) return 'project';
}
if(moduleName === 'story' && methodLowerCase === 'zerocase')
{
return link.params.from == 'project' ? 'project' : 'qa';
+1 -1
View File
@@ -49,7 +49,7 @@
<?php if($program->type == 'program'):?>
<?php echo html::a($this->createLink('program', 'product', "programID=$program->id"), $program->name);?>
<?php else:?>
<?php echo html::a($this->createLink('program', 'index', "programID=$program->id", '', '', $program->id), $program->name);?>
<?php echo html::a($this->createLink('project', 'index', "projectID=$program->id", '', '', $program->id), $program->name);?>
<?php endif;?>
</td>
<td>
+1 -1
View File
@@ -168,7 +168,7 @@ class project extends control
public function index($projectID = 0)
{
$this->lang->navGroup->project = 'project';
$projectID = $this->project->saveState($projectID, $this->project->getPairs());
$projectID = $this->project->saveState($projectID, $this->project->getPairsByProgram());
$project = $this->project->getByID($projectID);
if(empty($project) || $project->type != 'project') die(js::error($this->lang->notFound) . js::locate('back'));