Merge branch 'sprint/master_zhouxudong_54477' into 'master'

Sprint/master zhouxudong 54477

See merge request easycorp/zentaopms!3541
This commit is contained in:
王怡栋
2022-05-20 06:07:46 +00:00
7 changed files with 15 additions and 12 deletions
+1 -1
View File
@@ -128,7 +128,7 @@ $lang->my->dividerMenu = ',work,dynamic,';
/* Program menu. */
$lang->program->homeMenu = new stdclass();
$lang->program->homeMenu->browse = array('link' => "{$lang->program->list}|program|browse|", 'alias' => 'create,edit');
$lang->program->homeMenu->browse = array('link' => "{$lang->program->list}|program|browse|", 'alias' => 'create,edit', 'subModule' => 'project');
$lang->program->homeMenu->kanban = array('link' => "{$lang->program->kanban}|program|kanban|");
$lang->program->menu = new stdclass();
+1
View File
@@ -1109,6 +1109,7 @@ class doc extends control
public function tableContents($type, $objectID = 0, $libID = 0)
{
list($libs, $libID, $object, $objectID) = $this->doc->setMenuByType($type, $objectID, $libID);
$this->session->set('createProjectLocate', $this->app->getURI(true), 'doc');
$libID = (int)$libID;
+1
View File
@@ -83,6 +83,7 @@ class product extends control
$branch = ($this->cookie->preBranch !== '' and $branch === '') ? $this->cookie->preBranch : $branch;
setcookie('preBranch', $branch, $this->config->cookieLife, $this->config->webRoot, '', $this->config->cookieSecure, true);
$this->session->set('createProjectLocate', $this->app->getURI(true), 'product');
$this->product->setMenu($productID, $branch);
+2
View File
@@ -32,6 +32,7 @@ class program extends control
$this->session->set('programList', $this->app->getURI(true), 'program');
$this->session->set('projectList', $this->app->getURI(true), 'program');
$this->session->set('createProjectLocate', $this->app->getURI(true), 'program');
$this->app->loadClass('pager', $static = true);
$pager = new pager($recTotal, $recPerPage, $pageID);
@@ -457,6 +458,7 @@ class program extends control
$uri = $this->app->getURI(true);
$this->app->session->set('programProject', $uri, 'program');
$this->app->session->set('projectList', $uri, 'program');
$this->app->session->set('createProjectLocate', $uri, 'program');
$this->loadModel('datatable');
+4 -7
View File
@@ -432,13 +432,9 @@ class project extends control
$this->executeHooks($projectID);
if($this->viewType == 'json') return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'id' => $projectID));
if($this->app->tab == 'program')
if($this->app->tab != 'project' and $this->session->createProjectLocate)
{
return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => $this->createLink('program', 'browse')));
}
elseif($this->app->tab == 'doc')
{
return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => $this->createLink('doc', 'objectLibs', "type=project&objectID=$projectID")));
return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => $this->session->createProjectLocate));
}
else
{
@@ -454,7 +450,7 @@ class project extends control
}
}
if($this->app->tab == 'program') $this->loadModel('program')->setMenu($programID);
if($this->app->tab == 'program' and $programID) $this->loadModel('program')->setMenu($programID);
$this->session->set('projectModel', $model);
$extra = str_replace(array(',', ' '), array('&', ''), $extra);
@@ -491,6 +487,7 @@ class project extends control
}
if($this->app->tab == 'doc') unset($this->lang->doc->menu->project['subMenu']);
if($this->app->tab == 'product' and isset($output['productID'])) $this->loadModel('product')->setMenu($output['productID']);
$topProgramID = $this->program->getTopByID($programID);
+3 -1
View File
@@ -42,7 +42,9 @@
<table class='table table-form'>
<tr>
<th class='w-120px'><?php echo $lang->project->parent;?></th>
<td><?php echo html::select('parent', $programList, $programID, "class='form-control chosen' onchange='setParentProgram(this.value)'");?></td>
<?php $disabled = $this->app->tab == 'product' ? 'disabled' : '';?>
<td><?php echo html::select('parent', $programList, $programID, "class='form-control chosen' onchange='setParentProgram(this.value)' $disabled");?></td>
<?php if($disabled) echo html::hidden('parent', $programID);?>
<td>
<icon class='icon icon-help' data-toggle='popover' data-trigger='focus hover' data-placement='right' data-tip-class='text-muted popover-sm' data-content="<?php echo $lang->program->tips;?>"></icon>
</td>
+3 -3
View File
@@ -22,21 +22,21 @@
<div class='row'>
<div class='col-xs-4'>
<div class='project-type text-center'>
<?php echo html::a($this->createLink("project", "create", "model=scrum&programID=$programID&copyProjectID=0&extra=productID=$productID,branchID=$branchID"), "<img class='project-type-img' data-type='scrum' src='{$config->webRoot}theme/default/images/main/scrum.png'>", '', "data-app='project' class='createButton'")?>
<?php echo html::a($this->createLink("project", "create", "model=scrum&programID=$programID&copyProjectID=0&extra=productID=$productID,branchID=$branchID"), "<img class='project-type-img' data-type='scrum' src='{$config->webRoot}theme/default/images/main/scrum.png'>", '', "data-app='{$this->app->tab}' class='createButton'")?>
<h3><?php echo $lang->project->scrum; ?></h3>
<p><?php echo $lang->project->scrumTitle; ?></p>
</div>
</div>
<div class='col-xs-4'>
<div class='project-type text-center'>
<?php echo html::a($this->createLink("project", "create", "model=waterfall&programID=$programID&copyProjectID=0&extra=productID=$productID,branchID=$branchID"), "<img class='project-type-img' data-type='waterfall' src='{$config->webRoot}theme/default/images/main/waterfall.png'>", '', "data-app='project' class='createButton'")?>
<?php echo html::a($this->createLink("project", "create", "model=waterfall&programID=$programID&copyProjectID=0&extra=productID=$productID,branchID=$branchID"), "<img class='project-type-img' data-type='waterfall' src='{$config->webRoot}theme/default/images/main/waterfall.png'>", '', "data-app='{$this->app->tab}' class='createButton'")?>
<h3><?php echo $lang->project->waterfall; ?></h3>
<p><?php echo $lang->project->waterfallTitle; ?></p>
</div>
</div>
<div class='col-xs-4'>
<div class='project-type text-center'>
<?php echo html::a($this->createLink("project", "create", "model=kanban&programID=$programID&copyProjectID=0&extra=productID=$productID,branchID=$branchID"), "<img class='project-type-img' data-type='kanban' src='{$config->webRoot}theme/default/images/main/kanban.png'>", '', "data-app='project' class='createButton'")?>
<?php echo html::a($this->createLink("project", "create", "model=kanban&programID=$programID&copyProjectID=0&extra=productID=$productID,branchID=$branchID"), "<img class='project-type-img' data-type='kanban' src='{$config->webRoot}theme/default/images/main/kanban.png'>", '', "data-app='{$this->app->tab}' class='createButton'")?>
<h3><?php echo $lang->project->kanban;?></h3>
<p><?php echo $lang->project->kanbanTitle;?></p>
</div>