Merge branch 'master' of https://gitlab.zcorp.cc/easycorp/zentaopms into sprint/cyy_bug

This commit is contained in:
曹延义
2022-09-29 09:16:40 +08:00
52 changed files with 370 additions and 178 deletions
+21 -1
View File
@@ -611,6 +611,26 @@ class task extends control
if(!isset($this->view->members[$this->view->task->assignedTo])) $this->view->members[$this->view->task->assignedTo] = $this->view->task->assignedTo;
if(isset($this->view->members['closed']) or $this->view->task->status == 'closed') $this->view->members['closed'] = 'Closed';
$executions = array();
if(!empty($task->project))
{
$executionList = $this->execution->getPairs($task->project);
$project = $this->loadModel('project')->getByID($task->project);
if(isset($project->model) and $project->model == 'waterfall')
{
foreach($executionList as $key=>$val)
{
$values = $project->name . '/' . $val;
$executions[$key] = $values;
}
}
else
{
$executions = $executionList;
}
}
$this->view->title = $this->lang->task->edit . 'TASK' . $this->lang->colon . $this->view->task->name;
$this->view->position[] = $this->lang->task->common;
$this->view->position[] = $this->lang->task->edit;
@@ -619,7 +639,7 @@ class task extends control
$this->view->users = $this->loadModel('user')->getPairs('nodeleted|noclosed', "{$this->view->task->openedBy},{$this->view->task->canceledBy},{$this->view->task->closedBy}");
$this->view->showAllModule = isset($this->config->execution->task->allModule) ? $this->config->execution->task->allModule : '';
$this->view->modules = $this->tree->getTaskOptionMenu($this->view->task->execution, 0, 0, $this->view->showAllModule ? 'allModule' : '');
$this->view->executions = $this->config->systemMode == 'classic' ? $this->execution->getPairs() : $this->execution->getByProject($task->project, 'noclosed', 0, true, false, $task->execution);
$this->view->executions = $this->config->systemMode == 'classic' ? $this->execution->getPairs() : $executions;
$this->display();
}
+1 -1
View File
@@ -12,7 +12,7 @@
#linearefforts .nav li.active a{color: #0c64eb !important}
.input-group-addon {background: #fff}
.icon-calendar {color: rgb(22, 168, 248)}
#recordForm .table>thead>tr>th{ border: none}
#recordForm .table > thead > tr > th {border: none; font-weight: 400;}
.main-header {border-bottom: none !important}
.main-header ul.hours:before{content:"("}
.main-header ul.hours:after{content:")"}
+15 -1
View File
@@ -4140,10 +4140,24 @@ class taskModel extends model
$storyChanged = !empty($task->storyStatus) && $task->storyStatus == 'active' && $task->latestStoryVersion > $task->storyVersion && !in_array($task->status, array('cancel', 'closed'));
if($storyChanged) return $this->buildMenu('task', 'confirmStoryChange', $params, $task, 'browse', '', 'hiddenwin');
$canStart = ($task->status != 'pause' and common::hasPriv('task', 'start'));
$canRestart = ($task->status == 'pause' and common::hasPriv('task', 'restart'));
$canFinish = common::hasPriv('task', 'finish');
$canClose = common::hasPriv('task', 'close');
$canRecordEstimate = common::hasPriv('task', 'recordEstimate');
$canEdit = common::hasPriv('task', 'edit');
$canBatchCreate = ($this->config->vision == 'rnd' and common::hasPriv('task', 'batchCreate'));
if($task->status != 'pause') $menu .= $this->buildMenu('task', 'start', $params, $task, 'browse', '', '', 'iframe', true);
if($task->status == 'pause') $menu .= $this->buildMenu('task', 'restart', $params, $task, 'browse', '', '', 'iframe', true);
$menu .= $this->buildMenu('task', 'close', $params, $task, 'browse', '', '', 'iframe', true);
$menu .= $this->buildMenu('task', 'finish', $params, $task, 'browse', '', '', 'iframe', true);
$menu .= $this->buildMenu('task', 'close', $params, $task, 'browse', '', '', 'iframe', true);
if(($canStart or $canRestart or $canFinish or $canClose) and ($canRecordEstimate or $canEdit or $canBatchCreate))
{
$menu .= "<div class='dividing-line'></div>";
}
$menu .= $this->buildMenu('task', 'recordEstimate', $params, $task, 'browse', 'time', '', 'iframe', true);
$menu .= $this->buildMenu('task', 'edit', $params, $task, 'browse');
if($this->config->vision == 'rnd')