Merge branch 'sprint209_leiyong_task_58578' into 'master'
* Finish task#58578. See merge request easycorp/zentaopms!4200
This commit is contained in:
@@ -1356,6 +1356,12 @@ class execution extends control
|
||||
include $this->app->getModulePath('', 'execution') . 'lang/' . $this->app->getClientLang() . '.php';
|
||||
$lang->execution->common = $executionLang;
|
||||
}
|
||||
elseif(!empty($project) and $project->model == 'waterfall')
|
||||
{
|
||||
global $lang;
|
||||
$lang->executionCommon = $lang->execution->stage;
|
||||
include $this->app->getModulePath('', 'execution') . 'lang/' . $this->app->getClientLang() . '.php';
|
||||
}
|
||||
|
||||
$extra = str_replace(array(',', ' '), array('&', ''), $extra);
|
||||
parse_str($extra, $output);
|
||||
|
||||
@@ -27,3 +27,6 @@
|
||||
|
||||
#mainContent .laneHeightBox .radio-inline+.radio-inline {margin-left: 20px;}
|
||||
#mainContent .laneHeightBox .tip {color: #999;}
|
||||
|
||||
#dateRange {vertical-align: top; padding-top: 13px;}
|
||||
#dateRangeOption {vertical-align: top; padding-top: 13px;}
|
||||
|
||||
@@ -7,3 +7,4 @@
|
||||
|
||||
#mainContent .laneHeightBox .radio-inline+.radio-inline, #mainContent .importBox .radio-inline+.radio-inline {margin-left: 20px;}
|
||||
#mainContent .laneHeightBox .tip {color: #999;}
|
||||
#dateRange {vertical-align: top; padding-top: 13px;}
|
||||
|
||||
@@ -380,6 +380,8 @@ $lang->execution->errorBegin = "The start time of {$lang->execu
|
||||
$lang->execution->errorEnd = "The end time of {$lang->executionCommon} cannot be greater than the end time %s of the project.";
|
||||
$lang->execution->errorLetterProject = "The start time of stage cannot be less than the start time of the project %s.";
|
||||
$lang->execution->errorGreaterProject = "The end time of stage cannot be greater than the end time %s of the project.";
|
||||
$lang->execution->errorCommonBegin = 'The start date of ' . $lang->executionCommon . ' "%s" should be ≥ the start date of project %s: %s.';
|
||||
$lang->execution->errorCommonEnd = 'The deadline of ' . $lang->executionCommon . ' "%s" should be ≤ the deadline of project %s: %s.';
|
||||
$lang->execution->accessDenied = "Zugriff zu {$lang->executionCommon} verweigert!";
|
||||
$lang->execution->tips = 'Hinweis';
|
||||
$lang->execution->afterInfo = "{$lang->executionCommon} wurde erstellt. Als nächstes können Sie ";
|
||||
|
||||
@@ -380,6 +380,8 @@ $lang->execution->errorBegin = "The start time of {$lang->execu
|
||||
$lang->execution->errorEnd = "The end time of {$lang->executionCommon} cannot be greater than the end time %s of the project.";
|
||||
$lang->execution->errorLetterProject = "The start time of stage cannot be less than the start time of the project %s.";
|
||||
$lang->execution->errorGreaterProject = "The end time of stage cannot be greater than the end time %s of the project.";
|
||||
$lang->execution->errorCommonBegin = 'The start date of ' . $lang->executionCommon . ' "%s" should be ≥ the start date of project "%s": %s.';
|
||||
$lang->execution->errorCommonEnd = 'The deadline of ' . $lang->executionCommon . ' "%s" should be ≤ the deadline of project "%s": %s.';
|
||||
$lang->execution->accessDenied = "Your access to {$lang->executionCommon} is denied!";
|
||||
$lang->execution->tips = 'Note';
|
||||
$lang->execution->afterInfo = "{$lang->executionCommon} is created. Next you can ";
|
||||
|
||||
@@ -380,6 +380,8 @@ $lang->execution->errorBegin = "The start time of {$lang->execu
|
||||
$lang->execution->errorEnd = "The end time of {$lang->executionCommon} cannot be greater than the end time %s of the project.";
|
||||
$lang->execution->errorLetterProject = "The start time of stage cannot be less than the start time of the project %s.";
|
||||
$lang->execution->errorGreaterProject = "The end time of stage cannot be greater than the end time %s of the project.";
|
||||
$lang->execution->errorCommonBegin = 'The start date of ' . $lang->executionCommon . ' "%s" should be ≥ the start date of project %s: %s.';
|
||||
$lang->execution->errorCommonEnd = 'The deadline of ' . $lang->executionCommon . ' "%s" should be ≤ the deadline of project %s: %s.';
|
||||
$lang->execution->accessDenied = "Votre accès au {$lang->executionCommon} est refusé ! Désolé.";
|
||||
$lang->execution->tips = 'Note';
|
||||
$lang->execution->afterInfo = "Le {$lang->executionCommon} a été créé avec succès ! Ensuite vous pouvez ";
|
||||
|
||||
@@ -380,6 +380,8 @@ $lang->execution->errorBegin = "{$lang->executionCommon}的开
|
||||
$lang->execution->errorEnd = "{$lang->executionCommon}的截止时间不能大于所属项目的结束时间%s。";
|
||||
$lang->execution->errorLetterProject = "阶段的计划开始时间不能小于所属项目的计划开始时间%s。";
|
||||
$lang->execution->errorGreaterProject = "阶段的计划完成时间不能大于所属项目的计划完成时间%s。";
|
||||
$lang->execution->errorCommonBegin = $lang->executionCommon . '“%s”开始日期应大于等于项目“%s”的开始日期:%s。';
|
||||
$lang->execution->errorCommonEnd = $lang->executionCommon . '“%s”截止日期应小于等于项目“%s”的截止日期:%s。';
|
||||
$lang->execution->accessDenied = "您无权访问该{$lang->executionCommon}!";
|
||||
$lang->execution->tips = '提示';
|
||||
$lang->execution->afterInfo = "{$lang->executionCommon}添加成功,您现在可以进行以下操作:";
|
||||
|
||||
@@ -305,7 +305,7 @@ class executionModel extends model
|
||||
return false;
|
||||
}
|
||||
|
||||
if($this->config->systemMode == 'new') $this->checkBeginAndEndDate($_POST['project'], $_POST['begin'], $_POST['end']);
|
||||
if($this->config->systemMode == 'new') $this->checkBeginAndEndDate($_POST['project'], $_POST['begin'], $_POST['end'], $_POST['name']);
|
||||
if(dao::isError()) return false;
|
||||
|
||||
/* Determine whether to add a sprint or a stage according to the model of the execution. */
|
||||
@@ -500,7 +500,7 @@ class executionModel extends model
|
||||
|
||||
if(in_array($execution->status, array('closed', 'suspended'))) $this->computeBurn($executionID);
|
||||
|
||||
if($this->config->systemMode == 'new' and (empty($execution->project) or $execution->project == $oldExecution->project)) $this->checkBeginAndEndDate($oldExecution->project, $execution->begin, $execution->end);
|
||||
if($this->config->systemMode == 'new' and (empty($execution->project) or $execution->project == $oldExecution->project)) $this->checkBeginAndEndDate($oldExecution->project, $execution->begin, $execution->end, $execution->name);
|
||||
if(dao::isError()) return false;
|
||||
|
||||
/* Child stage inherits parent stage permissions. */
|
||||
@@ -869,7 +869,7 @@ class executionModel extends model
|
||||
->remove('comment')
|
||||
->get();
|
||||
|
||||
if($this->config->systemMode == 'new') $this->checkBeginAndEndDate($oldExecution->project, $execution->begin, $execution->end);
|
||||
if($this->config->systemMode == 'new') $this->checkBeginAndEndDate($oldExecution->project, $execution->begin, $execution->end, $oldExecution->name);
|
||||
if(dao::isError()) return false;
|
||||
|
||||
$execution = $this->loadModel('file')->processImgURL($execution, $this->config->execution->editor->putoff['id'], $this->post->uid);
|
||||
@@ -1114,17 +1114,19 @@ class executionModel extends model
|
||||
/**
|
||||
* Check begin and end date.
|
||||
*
|
||||
* @param int $projectID
|
||||
* @param string $begin
|
||||
* @param string $end
|
||||
* @param string $executionName
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function checkBeginAndEndDate($projectID, $begin, $end)
|
||||
public function checkBeginAndEndDate($projectID, $begin, $end, $executionName)
|
||||
{
|
||||
$project = $this->loadModel('project')->getByID($projectID);
|
||||
if($begin < $project->begin) dao::$errors['begin'] = sprintf($this->lang->execution->errorBegin, $project->begin);
|
||||
|
||||
if($end > $project->end) dao::$errors['end'] = sprintf($this->lang->execution->errorEnd, $project->end);
|
||||
if($begin < $project->begin) dao::$errors['begin'] = sprintf($this->lang->execution->errorCommonBegin, $executionName, $project->name, $project->begin);
|
||||
if($end > $project->end) dao::$errors['end'] = sprintf($this->lang->execution->errorCommonEnd, $executionName, $project->name, $project->end);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
<td><?php echo html::input('code', $code, "class='form-control' required");?></td><td></td><td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->execution->dateRange;?></th>
|
||||
<th id='dateRange'><?php echo $lang->execution->dateRange;?></th>
|
||||
<td>
|
||||
<div class='input-group'>
|
||||
<?php echo html::input('begin', (isset($plan) && !empty($plan->begin) ? $plan->begin : date('Y-m-d')), "class='form-control form-date' onchange='computeWorkDays()' placeholder='" . $lang->execution->begin . "' required");?>
|
||||
@@ -80,7 +80,7 @@
|
||||
<?php echo html::input('end', (isset($plan) && !empty($plan->end) ? $plan->end : ''), "class='form-control form-date' onchange='computeWorkDays()' placeholder='" . $lang->execution->end . "' required");?>
|
||||
</div>
|
||||
</td>
|
||||
<td colspan='2'><?php echo html::radio('delta', $lang->execution->endList , '', "onclick='computeEndDate(this.value)'");?></td>
|
||||
<td id='dateRangeOption' colspan='2'><?php echo html::radio('delta', $lang->execution->endList , '', "onclick='computeEndDate(this.value)'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->execution->days;?></th>
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
<td><?php echo html::input('code', $execution->code, "class='form-control' required");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->execution->dateRange;?></th>
|
||||
<th id="dateRange"><?php echo $lang->execution->dateRange;?></th>
|
||||
<td>
|
||||
<div class='input-group'>
|
||||
<?php echo html::input('begin', $execution->begin, "class='form-control form-date' onchange='computeWorkDays()' required placeholder='" . $lang->execution->begin . "'");?>
|
||||
|
||||
@@ -101,7 +101,7 @@ $config->task->datatable->fieldList['progress']['name'] = $lang->task->progr
|
||||
|
||||
$config->task->datatable->fieldList['deadline']['title'] = 'deadlineAB';
|
||||
$config->task->datatable->fieldList['deadline']['fixed'] = 'no';
|
||||
$config->task->datatable->fieldList['deadline']['width'] = '60';
|
||||
$config->task->datatable->fieldList['deadline']['width'] = '70';
|
||||
$config->task->datatable->fieldList['deadline']['required'] = 'no';
|
||||
|
||||
$config->task->datatable->fieldList['openedBy']['title'] = 'openedByAB';
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
#bindForm .c-bind{width: 128px;}
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<div id='mainContent' class='main-content'>
|
||||
<div class='center-block mw-800px'>
|
||||
<div class='center-block mw-900px'>
|
||||
<div class='main-header'>
|
||||
<h2><?php echo $lang->webhook->bind?></h2>
|
||||
</div>
|
||||
@@ -17,7 +17,7 @@
|
||||
?>
|
||||
</th>
|
||||
<th class='c-action'><?php echo $lang->actions;?></th>
|
||||
<th class='c-action'>
|
||||
<th class='c-bind'>
|
||||
<?php
|
||||
if($webhook->type == 'dinguser') echo $lang->webhook->dingBindStatus;
|
||||
if($webhook->type == 'wechatuser') echo $lang->webhook->wechatBindStatus;
|
||||
|
||||
Reference in New Issue
Block a user