Merge branch 'master' of https://github.com/easysoft/zentaopms
This commit is contained in:
@@ -1014,7 +1014,9 @@ class project extends control
|
||||
}
|
||||
}
|
||||
|
||||
$this->project->setMenu($this->projects, key($this->projects));
|
||||
$projectID = key($this->projects);
|
||||
if($this->session->project) $projectID = $this->session->project;
|
||||
$this->project->setMenu($this->projects, $projectID);
|
||||
|
||||
$this->view->title = $this->lang->project->create;
|
||||
$this->view->position[] = $this->view->title;
|
||||
|
||||
+19
-1
@@ -495,11 +495,29 @@ class storyModel extends model
|
||||
->join('mailto', ',')
|
||||
->join('linkStories', ',')
|
||||
->join('childStories', ',')
|
||||
->remove('files,labels,comment,contactListMenu')
|
||||
->remove('files,labels,comment,contactListMenu,stages')
|
||||
->get();
|
||||
if(isset($story->plan) and is_array($story->plan)) $story->plan = trim(join(',', $story->plan), ',');
|
||||
if(empty($_POST['product'])) $story->branch = $oldStory->branch;
|
||||
if(empty($_POST['branch'])) $story->branch = 0;
|
||||
if(!empty($_POST['stages']))
|
||||
{
|
||||
$this->dao->delete()->from(TABLE_STORYSTAGE)->where('story')->eq($storyID)->exec();
|
||||
|
||||
$stageList = join(',', array_keys($this->lang->story->stageList));
|
||||
$minStagePos = strlen($stageList);
|
||||
$minStage = '';
|
||||
foreach($this->post->stages as $branch => $stage)
|
||||
{
|
||||
$this->dao->insert(TABLE_STORYSTAGE)->set('story')->eq($storyID)->set('branch')->eq($branch)->set('stage')->eq($stage)->exec();
|
||||
if(strpos($stageList, $stage) !== false and strpos($stageList, $stage) < $minStagePos)
|
||||
{
|
||||
$minStage = $stage;
|
||||
$minStagePos = strpos($stageList, $stage);
|
||||
}
|
||||
}
|
||||
$story->stage = $minStage;
|
||||
}
|
||||
|
||||
$this->dao->update(TABLE_STORY)
|
||||
->data($story)
|
||||
|
||||
@@ -126,7 +126,21 @@
|
||||
<?php if($story->status != 'draft'):?>
|
||||
<tr>
|
||||
<th><?php echo $lang->story->stage;?></th>
|
||||
<td><?php echo html::select('stage', $lang->story->stageList, $story->stage, "class='form-control chosen'");?></td>
|
||||
<td>
|
||||
<?php
|
||||
if($story->stages and $branches)
|
||||
{
|
||||
foreach($story->stages as $branch => $stage)
|
||||
{
|
||||
if(isset($branches[$branch])) echo '<p>' . $branches[$branch] . html::select("stages[$branch]", $lang->story->stageList, $stage, "class='form-control chosen'") . '</p>';
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
echo html::select('stage', $lang->story->stageList, $story->stage, "class='form-control chosen'");
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
<tr>
|
||||
|
||||
@@ -183,6 +183,7 @@ $lang->task->error->left = 'Please enter "Left Hour"';
|
||||
$lang->task->error->work = '"Remark" must be less than %d characteres.';
|
||||
$lang->task->error->skipClose = 'Task: %s is not “Done” or “Cancelled”. Do you want to close it?';
|
||||
$lang->task->error->consumed = 'Task: %s Hour must be more than 0. Ignore changes to this Task.';
|
||||
$lang->task->error->assignedTo = 'Multiple task in the current state cannot be assigned to member who outside the task team.';
|
||||
|
||||
/* Report. */
|
||||
$lang->task->report = new stdclass();
|
||||
|
||||
@@ -183,6 +183,7 @@ $lang->task->error->left = '请填写"剩余"';
|
||||
$lang->task->error->work = '"备注"必须小于%d个字符';
|
||||
$lang->task->error->skipClose = '任务:%s 不是“已完成”或“已取消”状态,确定要关闭吗?';
|
||||
$lang->task->error->consumed = '任务:%s工时不能小于0,忽略该任务工时的改动';
|
||||
$lang->task->error->assignedTo = '当前状态的多人任务不能指派给任务团队外的成员。';
|
||||
|
||||
/* Report. */
|
||||
$lang->task->report = new stdclass();
|
||||
|
||||
@@ -581,6 +581,12 @@ class taskModel extends model
|
||||
$teams = array();
|
||||
if($this->post->multiple)
|
||||
{
|
||||
if(strpos(',done,closed,cancel,', ",{$task->status},") === false && !in_array($this->post->assignedTo, $this->post->team))
|
||||
{
|
||||
dao::$errors[] = $this->lang->task->error->assignedTo;
|
||||
return false;
|
||||
}
|
||||
|
||||
foreach($this->post->team as $row => $account)
|
||||
{
|
||||
if(empty($account) or isset($team[$account])) continue;
|
||||
|
||||
@@ -15,12 +15,10 @@
|
||||
<div id='mainContent' class='main-content'>
|
||||
<div class='center-block'>
|
||||
<?php if(!empty($task->team) && $task->assignedTo != $this->app->user->account):?>
|
||||
<div style="padding: 0 50px 0 0">
|
||||
<div class="alert with-icon no-margin">
|
||||
<i class="icon-exclamation-sign"></i>
|
||||
<div class="content">
|
||||
<p><?php echo sprintf($lang->task->deniedNotice, '<strong>' . $task->assignedToRealName . '</strong>', $lang->task->transfer);?></p>
|
||||
</div>
|
||||
<div class="alert with-icon">
|
||||
<i class="icon-exclamation-sign"></i>
|
||||
<div class="content">
|
||||
<p><?php echo sprintf($lang->task->deniedNotice, '<strong>' . $task->assignedToRealName . '</strong>', $lang->task->transfer);?></p>
|
||||
</div>
|
||||
</div>
|
||||
<?php else:?>
|
||||
|
||||
@@ -14,6 +14,14 @@
|
||||
<?php include '../../common/view/kindeditor.html.php';?>
|
||||
<div id='mainContent' class='main-content'>
|
||||
<div class='center-block'>
|
||||
<?php if(!empty($task->team) && $task->assignedTo != $this->app->user->account):?>
|
||||
<div class="alert with-icon">
|
||||
<i class="icon-exclamation-sign"></i>
|
||||
<div class="content">
|
||||
<p><?php echo sprintf($lang->task->deniedNotice, '<strong>' . $task->assignedToRealName . '</strong>', $lang->task->pause);?></p>
|
||||
</div>
|
||||
</div>
|
||||
<?php else:?>
|
||||
<div class='main-header'>
|
||||
<h2>
|
||||
<span class='label label-id'><?php echo $task->id;?></span>
|
||||
@@ -40,6 +48,7 @@
|
||||
</form>
|
||||
<hr class='small' />
|
||||
<div class='main'><?php include '../../common/view/action.html.php';?></div>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
</div>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
|
||||
@@ -18,12 +18,10 @@
|
||||
<div id='mainContent' class='main-content'>
|
||||
<div class='center-block'>
|
||||
<?php if(!empty($task->team) && $task->assignedTo != $this->app->user->account):?>
|
||||
<div style="padding: 0 50px 0 0">
|
||||
<div class="alert with-icon no-margin">
|
||||
<i class="icon-exclamation-sign"></i>
|
||||
<div class="content">
|
||||
<p><?php echo sprintf($lang->task->deniedNotice, '<strong>' . $task->assignedToRealName . '</strong>', $lang->task->logEfforts);?></p>
|
||||
</div>
|
||||
<div class="alert with-icon">
|
||||
<i class="icon-exclamation-sign"></i>
|
||||
<div class="content">
|
||||
<p><?php echo sprintf($lang->task->deniedNotice, '<strong>' . $task->assignedToRealName . '</strong>', $lang->task->logEfforts);?></p>
|
||||
</div>
|
||||
</div>
|
||||
<?php else:?>
|
||||
|
||||
Reference in New Issue
Block a user