Merge branch 'master' of github.com:easysoft/zentaopms
This commit is contained in:
@@ -622,7 +622,7 @@ class task extends control
|
||||
}
|
||||
else
|
||||
{
|
||||
$story = $this->story->getById($task->story);
|
||||
$story = $this->story->getById($task->story, $task->storyVersion);
|
||||
$task->storySpec = empty($story) ? '' : $this->loadModel('file')->setImgSize($story->spec);
|
||||
$task->storyVerify = empty($story) ? '' : $this->loadModel('file')->setImgSize($story->verify);
|
||||
$task->storyFiles = $this->loadModel('file')->getByObject('story', $task->story);
|
||||
|
||||
@@ -1,9 +1,15 @@
|
||||
/* If left = 0, warning. */
|
||||
function checkLeft()
|
||||
{
|
||||
var value = $("#left").val();
|
||||
if(isNaN(parseFloat(value)) || value == 0)
|
||||
var left = $("#left").val();
|
||||
var consumed = $("#consumed").val();
|
||||
if(isNaN(parseFloat(left)) || left == 0)
|
||||
{
|
||||
if(isNaN(parseFloat(consumed)) || consumed == 0)
|
||||
{
|
||||
alert(noticeTaskStart);
|
||||
return false;
|
||||
}
|
||||
var result = confirm(confirmFinish);
|
||||
if(!result) setTimeout(function() {$.enableForm()}, 500);
|
||||
return result;
|
||||
|
||||
@@ -189,6 +189,7 @@ $lang->task->confirmChangeProject = "Wenn Sie {$lang->projectCommon} ändern, d
|
||||
$lang->task->confirmFinish = '"Reststunden " sind 0. Möchten Sue den Status auf Erledigt setzen?';
|
||||
$lang->task->confirmRecord = '"Reststunden " sind 0. Möchten Sie den Task auf Erledigt setzen?';
|
||||
$lang->task->confirmTransfer = '"Reststunden " sind 0. Möchten Sie den Task transferieren?';
|
||||
$lang->task->noticeTaskStart = '"Cost Hour" and "Left Hour" cannot be 0 at the same time.';
|
||||
$lang->task->noticeLinkStory = "Es wurde keine Story verknüpft. Sie können %s für dieses Projekt, anschließend %s.";
|
||||
$lang->task->noticeSaveRecord = 'Ihre Stunden wurden nicht gespeichrt. Bitte erst speichern.';
|
||||
$lang->task->commentActions = '%s. %s, kommentiert von <strong>%s</strong>.';
|
||||
@@ -210,7 +211,7 @@ $lang->task->error->work = '"Bemerkung" muss kleiner als %d Zeichen
|
||||
$lang->task->error->skipClose = 'Aufgabe: %s ist nicht “Erledigt” oder “Abgebrochen”. Möchten Sie die Aufgabe jetzt schließen?';
|
||||
$lang->task->error->consumed = 'Aufgabe: %s Hour must be more than 0. Ignore changes to this Task.';
|
||||
$lang->task->error->assignedTo = 'Mehere Tasks können nicht zugewisen werden, da die Benutzer nicht teil des Teams sind.';
|
||||
$lang->task->error->consumedEmpty = '"Current Cost" should not be empty.';
|
||||
$lang->task->error->consumedEmpty = '"Current Cost" should not be 0.';
|
||||
$lang->task->error->deadlineSmall = '"Deadline" must be greater than "StartDate".';
|
||||
$lang->task->error->alreadyStarted = 'You cannot start this task, because it is started.';
|
||||
|
||||
|
||||
@@ -189,6 +189,7 @@ $lang->task->confirmChangeProject = "If you change {$lang->projectCommon}, Modu
|
||||
$lang->task->confirmFinish = '"Left Hour" is 0. Do you want to change the status to "Finished"?';
|
||||
$lang->task->confirmRecord = '"Left Hour" is 0. Do you want to set the task as "Finished"?';
|
||||
$lang->task->confirmTransfer = '"Left Hour" is 0,Do you want to transfer task?';
|
||||
$lang->task->noticeTaskStart = '"Cost Hour" and "Left Hour" cannot be 0 at the same time.';
|
||||
$lang->task->noticeLinkStory = "No story has been linked. You can %s for this project, then %s.";
|
||||
$lang->task->noticeSaveRecord = 'Your Hour is not saved. Please save it first.';
|
||||
$lang->task->commentActions = '%s. %s, commented by <strong>%s</strong>.';
|
||||
@@ -210,7 +211,7 @@ $lang->task->error->work = '"Comment" must be < %d characters.';
|
||||
$lang->task->error->skipClose = 'Task: %s is not "Finished” or “Cancelled”. Do you want to close it?';
|
||||
$lang->task->error->consumed = 'Task: %s hour must be < 0. Ignore changes to this task.';
|
||||
$lang->task->error->assignedTo = 'Multi-user task in the current status cannot be assigned to a member who is not in the task team.';
|
||||
$lang->task->error->consumedEmpty = '"Current Cost" should not be empty.';
|
||||
$lang->task->error->consumedEmpty = '"Current Cost" should not be 0.';
|
||||
$lang->task->error->deadlineSmall = '"Deadline" must be greater than "StartDate".';
|
||||
$lang->task->error->alreadyStarted = 'You cannot start this task, because it is started.';
|
||||
|
||||
|
||||
@@ -189,6 +189,7 @@ $lang->task->confirmChangeProject = "Si vous changez {$lang->projectCommon}, Mo
|
||||
$lang->task->confirmFinish = '"Heures Restantes" à 0. Voulez-vous passer le statut à "Terminée" ?';
|
||||
$lang->task->confirmRecord = '"Heures Restantes" à 0. Voulez-vous passer le statut de la tâche à "Finie" ?';
|
||||
$lang->task->confirmTransfer = '"Heures Restantes" à 0. Voulez-vous transférer la tâche ?';
|
||||
$lang->task->noticeTaskStart = '"Cost Hour" and "Left Hour" cannot be 0 at the same time.';
|
||||
$lang->task->noticeLinkStory = "Aucune Story n'est associée. Vous pouvez %s pour ce projet, alors %s.";
|
||||
$lang->task->noticeSaveRecord = "Votre temps n'a pas été sauvé. Enregistrez-le d'abord.";
|
||||
$lang->task->commentActions = '%s. %s, commenté par <strong>%s</strong>.';
|
||||
@@ -210,7 +211,7 @@ $lang->task->error->work = '"Commentaire" doit être < %d caractèr
|
||||
$lang->task->error->skipClose = 'Tâche: %s non “Finie” ou “Annulée”. Voulez-vous la fermer malgré tout ?';
|
||||
$lang->task->error->consumed = 'Tâche: %s heures doivent être < 0. Ignorer changements de cette tâche.';
|
||||
$lang->task->error->assignedTo = "Tâche Multi-user dans le statut courant ne peut pas être assignée à un membre qui ne fait pas partie de l'équipe.";
|
||||
$lang->task->error->consumedEmpty = '"Coût Actuel" ne devrait pas être vide.';
|
||||
$lang->task->error->consumedEmpty = '"Coût Actuel" ne devrait pas être 0.';
|
||||
$lang->task->error->deadlineSmall = '"Date Limite" doit être supérieur à la "Date de Départ".';
|
||||
$lang->task->error->alreadyStarted = 'You cannot start this task, because it is started.';
|
||||
|
||||
|
||||
@@ -189,6 +189,7 @@ $lang->task->confirmChangeProject = "Nếu bạn thay đổi {$lang->projectCom
|
||||
$lang->task->confirmFinish = '"Còn lại" bằng 0. Bạn có muốn thay đổi tình trạng thành "Kết thúc"?';
|
||||
$lang->task->confirmRecord = '"Còn lại" bằng 0. Bạn có muốn thiết lập nhiệm vụ thành "Kết thúc"?';
|
||||
$lang->task->confirmTransfer = '"Còn lại" bằng 0,Bạn có muốn chuyển thành nhiệm vụ?';
|
||||
$lang->task->noticeTaskStart = '"Cost Hour" and "Left Hour" cannot be 0 at the same time.';
|
||||
$lang->task->noticeLinkStory = "Không có câu chuyện liên kết. Bạn có thể %s cho dự án này, sau đó %s.";
|
||||
$lang->task->noticeSaveRecord = 'Số giờ làm của bạn chưa được lưu. Vui lòng lưu nó trước.';
|
||||
$lang->task->commentActions = '%s. %s, nhận xét bởi <strong>%s</strong>.';
|
||||
@@ -210,7 +211,7 @@ $lang->task->error->work = '"Nhận xét" phải là < %d ký tự.
|
||||
$lang->task->error->skipClose = 'Nhiệm vụ: %s không là "Kết thúc” hoặc “Đã hủy”. Bạn có muốn đóng nó?';
|
||||
$lang->task->error->consumed = 'Nhiệm vụ: %s giờ phải là < 0. Bỏ qua thay đổi cho nhiệm vụ này.';
|
||||
$lang->task->error->assignedTo = 'Nhiệm vụ nhiều người dùng trong tình trạng hiện tại không thể giao cho một thành viên người không trong Nhóm nhiệm vụ.';
|
||||
$lang->task->error->consumedEmpty = '"Giờ làm" không nên trống.';
|
||||
$lang->task->error->consumedEmpty = '"Giờ làm" không nên 0.';
|
||||
$lang->task->error->deadlineSmall = '"Hạn chót" phải lớn hơn "Ngày bắt đầu".';
|
||||
$lang->task->error->alreadyStarted = 'You cannot start this task, because it is started.';
|
||||
|
||||
|
||||
@@ -189,6 +189,7 @@ $lang->task->confirmChangeProject = "修改{$lang->projectCommon}会导致相
|
||||
$lang->task->confirmFinish = '"预计剩余"为0,确认将任务状态改为"已完成"吗?';
|
||||
$lang->task->confirmRecord = '"剩余"为0,任务将标记为"已完成",您确定吗?';
|
||||
$lang->task->confirmTransfer = '"当前剩余"为0,任务将被转交,您确定吗?';
|
||||
$lang->task->noticeTaskStart = '"总计消耗"和"预计剩余"不能同时为0';
|
||||
$lang->task->noticeLinkStory = "没有可关联的相关{$lang->storyCommon},您可以为当前项目%s,然后%s";
|
||||
$lang->task->noticeSaveRecord = '您有尚未保存的工时记录,请先将其保存。';
|
||||
$lang->task->commentActions = '%s. %s, 由 <strong>%s</strong> 添加备注。';
|
||||
@@ -210,7 +211,7 @@ $lang->task->error->work = '"备注"必须小于%d个字符';
|
||||
$lang->task->error->skipClose = '任务:%s 不是“已完成”或“已取消”状态,确定要关闭吗?';
|
||||
$lang->task->error->consumed = '任务:%s工时不能小于0,忽略该任务工时的改动';
|
||||
$lang->task->error->assignedTo = '当前状态的多人任务不能指派给任务团队外的成员。';
|
||||
$lang->task->error->consumedEmpty = '"本次消耗"不能为空';
|
||||
$lang->task->error->consumedEmpty = '"本次消耗"不能为0';
|
||||
$lang->task->error->deadlineSmall = '"截止日期"必须大于"预计开始"';
|
||||
$lang->task->error->alreadyStarted = '此任务已被启动,不能重复启动!';
|
||||
|
||||
|
||||
@@ -189,6 +189,7 @@ $lang->task->confirmChangeProject = "修改{$lang->projectCommon}會導致相
|
||||
$lang->task->confirmFinish = '"預計剩餘"為0,確認將任務狀態改為"已完成"嗎?';
|
||||
$lang->task->confirmRecord = '"剩餘"為0,任務將標記為"已完成",您確定嗎?';
|
||||
$lang->task->confirmTransfer = '"當前剩餘"為0,任務將被轉交,您確定嗎?';
|
||||
$lang->task->noticeTaskStart = '"總計消耗"和"預計剩餘"不能同時為0';
|
||||
$lang->task->noticeLinkStory = "沒有可關聯的相關{$lang->storyCommon},您可以為當前項目%s,然後%s";
|
||||
$lang->task->noticeSaveRecord = '您有尚未保存的工時記錄,請先將其保存。';
|
||||
$lang->task->commentActions = '%s. %s, 由 <strong>%s</strong> 添加備註。';
|
||||
@@ -210,7 +211,7 @@ $lang->task->error->work = '"備註"必須小於%d個字元';
|
||||
$lang->task->error->skipClose = '任務:%s 不是“已完成”或“已取消”狀態,確定要關閉嗎?';
|
||||
$lang->task->error->consumed = '任務:%s工時不能小於0,忽略該任務工時的改動';
|
||||
$lang->task->error->assignedTo = '當前狀態的多人任務不能指派給任務團隊外的成員。';
|
||||
$lang->task->error->consumedEmpty = '"本次消耗"不能為空';
|
||||
$lang->task->error->consumedEmpty = '"本次消耗"不能為0';
|
||||
$lang->task->error->deadlineSmall = '"截止日期"必須大於"預計開始"';
|
||||
$lang->task->error->alreadyStarted = '此任務已被啟動,不能重複啟動!';
|
||||
|
||||
|
||||
@@ -1232,6 +1232,11 @@ class taskModel extends model
|
||||
|
||||
if($this->post->left == 0)
|
||||
{
|
||||
if($task->consumed == 0)
|
||||
{
|
||||
dao::$errors[] = sprintf($this->lang->error->notempty, $this->lang->task->consumed);
|
||||
return false;
|
||||
}
|
||||
$task->status = 'done';
|
||||
$task->finishedBy = $this->app->user->account;
|
||||
$task->finishedDate = helper::now();
|
||||
@@ -2757,12 +2762,12 @@ class taskModel extends model
|
||||
public function printCell($col, $task, $users, $browseType, $branchGroups, $modulePairs = array(), $mode = 'datatable', $child = false)
|
||||
{
|
||||
$canBatchEdit = common::hasPriv('task', 'batchEdit', !empty($task) ? $task : null);
|
||||
$canBatchClose = (common::hasPriv('task', 'batchClose', !empty($task) ? $task : null) && strtolower($browseType) != 'closedBy');
|
||||
$canBatchClose = (common::hasPriv('task', 'batchClose', !empty($task) ? $task : null) and strtolower($browseType) != 'closed');
|
||||
$canBatchCancel = common::hasPriv('task', 'batchCancel', !empty($task) ? $task : null);
|
||||
$canBatchChangeModule = common::hasPriv('task', 'batchChangeModule', !empty($task) ? $task : null);
|
||||
$canBatchAssignTo = common::hasPriv('task', 'batchAssignTo', !empty($task) ? $task : null);
|
||||
|
||||
$canBatchAction = $canBatchEdit or $canBatchClose or $canBatchCancel or $canBatchChangeModule or $canBatchAssignTo;
|
||||
$canBatchAction = ($canBatchEdit or $canBatchClose or $canBatchCancel or $canBatchChangeModule or $canBatchAssignTo);
|
||||
$storyChanged = (!empty($task->storyStatus) and $task->storyStatus == 'active' and $task->latestStoryVersion > $task->storyVersion and !in_array($task->status, array('cancel', 'closed')));
|
||||
|
||||
$canView = common::hasPriv('task', 'view');
|
||||
|
||||
@@ -88,7 +88,7 @@
|
||||
?>
|
||||
<tr>
|
||||
<?php $disableAssignedTo = (isset($teams[$taskID]) and $tasks[$taskID]->assignedTo != $this->app->user->account) ? "disabled='disabled'" : '';?>
|
||||
<?php $disableHour = isset($teams[$taskID]) ? "disabled='disabled'" : '';?>
|
||||
<?php $disableHour = (isset($teams[$taskID]) or $tasks[$taskID]->parent < 0) ? "disabled='disabled'" : '';?>
|
||||
<?php
|
||||
$taskMembers = array();
|
||||
if(isset($teams[$taskID]))
|
||||
|
||||
@@ -182,7 +182,7 @@
|
||||
<tr>
|
||||
<th><?php echo $lang->task->estimate;?></th>
|
||||
<td>
|
||||
<?php $disabled = !empty($task->team) ? "disabled='disabled'" : '';?>
|
||||
<?php $disabled = (!empty($task->team) or $task->parent < 0) ? "disabled='disabled'" : '';?>
|
||||
<?php echo html::input('estimate', $task->estimate, "class='form-control' {$disabled}");?>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -193,7 +193,7 @@
|
||||
<tr>
|
||||
<th><?php echo $lang->task->left;?></th>
|
||||
<td>
|
||||
<?php $disabled = !empty($task->team) ? "disabled='disabled'" : '';?>
|
||||
<?php $disabled = (!empty($task->team) or $task->parent < 0) ? "disabled='disabled'" : '';?>
|
||||
<?php echo html::input('left', $task->left, "class='form-control' {$disabled}");?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
<?php include '../../common/view/kindeditor.html.php';?>
|
||||
<?php include '../../common/view/datepicker.html.php';?>
|
||||
<?php js::set('confirmFinish', $lang->task->confirmFinish);?>
|
||||
<?php js::set('noticeTaskStart', $lang->task->noticeTaskStart);?>
|
||||
<div id='mainContent' class='main-content'>
|
||||
<?php
|
||||
/* IF it is multi-task, the suspened can only be restarted by the current user who it is assigned to. */
|
||||
|
||||
@@ -83,7 +83,7 @@
|
||||
<div class='detail-title'><?php echo $lang->task->case;?></div>
|
||||
<div class='detail-content article-content'>
|
||||
<ul class='list-unstyled'>
|
||||
<?php foreach($task->cases as $caseID => $case) echo '<li>' . html::a($this->createLink('testcase', 'view', "caseID=$caseID", '', true), "#$caseID " . $case, '', "data-toggle='modal' data-type='iframe' data-width='90%'") . '</li>';?>
|
||||
<?php foreach($task->cases as $caseID => $case) echo '<li>' . html::a($this->createLink('testcase', 'view', "caseID=$caseID", '', true), "#$caseID " . $case, '', isonlybody() ? '' : "data-toggle='modal' data-type='iframe' data-width='90%'") . '</li>';?>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user