* Add max code.

This commit is contained in:
mayue
2022-05-12 02:38:33 +00:00
parent bbb5ec189d
commit 46c555fb3f
3 changed files with 53 additions and 3 deletions
+2
View File
@@ -378,3 +378,5 @@ $config->newFeatures = array('introduction', 'tutorial', 'youngBlueTheme', 'visi
$config->programPriv = new stdclass();
$config->programPriv->scrum = array('story', 'projectstory', 'projectrelease', 'project', 'execution', 'build', 'bug', 'testcase', 'testreport', 'doc', 'repo', 'meeting', 'stakeholder', 'testtask');
$config->programPriv->waterfall = array_merge($config->programPriv->scrum, array('task', 'workestimation', 'durationestimation', 'budget', 'programplan', 'review', 'reviewissue', 'weekly', 'cm', 'milestone', 'design', 'issue', 'risk', 'opportunity', 'measrecord', 'auditplan', 'trainplan', 'gapanalysis', 'pssp', 'researchplan', 'researchreport'));
$config->waterfallModules = array('workestimation', 'durationestimation', 'budget', 'programplan', 'review', 'reviewissue', 'weekly', 'cm', 'milestone', 'design', 'opportunity', 'auditplan', 'trainplan', 'gapanalysis', 'pssp', 'researchplan', 'researchreport');
+49 -1
View File
@@ -472,7 +472,7 @@ class projectModel extends model
$link = helper::createLink('project', 'index', "projectID=%s");
$project = $this->getByID($projectID);
if(strpos(',project,product,projectstory,story,bug,doc,testcase,testtask,testreport,build,projectrelease,stakeholder,', ',' . $module . ',') !== false)
if(strpos(',project,product,projectstory,story,bug,doc,testcase,testtask,testreport,build,projectrelease,stakeholder,issue,risk,meeting,report,measrecord', ',' . $module . ',') !== false)
{
if($module == 'project' and $method == 'execution')
{
@@ -641,6 +641,54 @@ class projectModel extends model
$link = helper::createLink($module, 'browse', "projectID=%s");
}
}
elseif(strpos("issue,risk,meeting,report,measrecord", $module) !== false)
{
if($method == 'projectsummary')
{
$link = helper::createLink($module, $method, "projectID=%s#app=project");
}
else
{
$link = helper::createLink($module, 'browse', "projectID=%s");
}
}
}
if(in_array($module, $this->config->waterfallModules + array('projectstory'=>'projectstory')))
{
$link = helper::createLink($module, 'browse', "projectID=%s");
if($module == 'projectstory' and $method = 'track')
{
$link = helper::createLink($module, $method, "projectID=%s");
}
elseif($module == 'reviewissue')
{
$link = helper::createLink($module, 'issue', "projectID=%s");
}
elseif($module == 'cm' and $method = 'report')
{
$link = helper::createLink($module, $method, "projectID=%s");
}
elseif($module == 'weekly' and $method = 'index')
{
$link = helper::createLink($module, $method, "projectID=%s");
}
elseif($module == 'milestone' and $method = 'index')
{
$link = helper::createLink($module, $method, "projectID=%s");
}
elseif($module == 'workestimation' and $method = 'index')
{
$link = helper::createLink($module, $method, "projectID=%s");
}
elseif($module == 'durationestimation' and $method = 'index')
{
$link = helper::createLink($module, $method, "projectID=%s");
}
elseif($module == 'budget' and $method = 'summary')
{
$link = helper::createLink($module, $method, "projectID=%s");
}
}
if($project->model == 'kanban') $link = helper::createLink('project', 'index', "projectID=%s");
+2 -2
View File
@@ -73,9 +73,9 @@ foreach($projects as $programID => $programProjects)
$selected = $project->id == $projectID ? 'selected' : '';
$icon = '<i class="icon icon-sprint"></i> ';
if($project->model == 'waterfall' and $module == 'design')
if($project->model != 'waterfall' and (in_array($module, $config->waterfallModules) or $method == 'track'))
{
$link = helper::createLink('design', 'browse', "projectID=%s");
$link = helper::createLink('project', 'index', "projectID=%s");
}
elseif($project->model == 'kanban')
{