This commit is contained in:
wangyidong
2022-08-31 16:11:54 +08:00
parent 1471e7fbb9
commit 39ce15c672
6 changed files with 6 additions and 24 deletions
+5 -19
View File
@@ -1212,35 +1212,21 @@ class task extends control
*/
public function deleteEstimate($estimateID, $confirm = 'no')
{
$estimate = $this->task->getEstimateById($estimateID);
$task = $this->task->getById($estimate->task);
if($confirm == 'no' and $task->consumed - $estimate->consumed != 0)
if($confirm == 'no')
{
return print(js::confirm($this->lang->task->confirmDeleteEstimate, $this->createLink('task', 'deleteEstimate', "estimateID=$estimateID&confirm=yes")));
}
elseif($confirm == 'no' and $task->consumed - $estimate->consumed == 0)
{
return print(js::confirm($this->lang->task->confirmDeleteLastEstimate, $this->createLink('task', 'deleteEstimate', "estimateID=$estimateID&confirm=yes")));
}
else
{
$estimate = $this->task->getEstimateById($estimateID);
$task = $this->task->getById($estimate->task);
$changes = $this->task->deleteEstimate($estimateID);
if(dao::isError()) return print(js::error(dao::getError()));
$actionID = $this->loadModel('action')->create('task', $estimate->task, 'DeleteEstimate');
$this->action->logHistory($actionID, $changes);
if($task->consumed - $estimate->consumed == 0)
{
$actionID = $this->loadModel('action')->create('task', $estimate->task, 'Adjusttasktowait');
}
if($task->consumed - $estimate->consumed == 0)
{
return print(js::reload('parent.parent'));
}
else
{
return print(js::reload('parent'));
}
return print(js::reload('parent'));
}
}
-1
View File
@@ -218,7 +218,6 @@ $lang->task->legendMisc = 'Misc.';
$lang->task->confirmDelete = "Möchten Sie diese Aufgabe löschen?";
$lang->task->confirmDeleteEstimate = "Do you want to delete it?";
$lang->task->confirmDeleteLastEstimate = "Do you want to delete the log? After deleting the last work log, the task status will be adjusted to Not Started.";
$lang->task->copyStoryTitle = "Story kopieren";
$lang->task->afterSubmit = "Nach der Erstellung,";
$lang->task->successSaved = "Erstellt!";
-1
View File
@@ -218,7 +218,6 @@ $lang->task->legendMisc = 'Misc.';
$lang->task->confirmDelete = "Do you want to delete this task?";
$lang->task->confirmDeleteEstimate = "Do you want to delete it?";
$lang->task->confirmDeleteLastEstimate = "Do you want to delete the log? After deleting the last work log, the task status will be adjusted to Not Started.";
$lang->task->copyStoryTitle = "Copy Story";
$lang->task->afterSubmit = "Next ";
$lang->task->successSaved = "Created!";
-1
View File
@@ -218,7 +218,6 @@ $lang->task->legendMisc = 'Misc.';
$lang->task->confirmDelete = "Voulez-vous réellement supprimer cette tâche ?";
$lang->task->confirmDeleteEstimate = "Voulez-vous la supprimer ?";
$lang->task->confirmDeleteLastEstimate = "Do you want to delete the log? After deleting the last work log, the task status will be adjusted to Not Started.";
$lang->task->copyStoryTitle = '<span style="color:blue;">StoryModel</span>';
$lang->task->afterSubmit = "Suiv. ";
$lang->task->successSaved = "Créée !";
-1
View File
@@ -218,7 +218,6 @@ $lang->task->legendMisc = '其他相关';
$lang->task->confirmDelete = "您确定要删除这个任务吗?";
$lang->task->confirmDeleteEstimate = "您确定要删除这个记录吗?";
$lang->task->confirmDeleteLastEstimate = "您确定要删除该条日志吗?删除最后一条工时日志后,该任务状态将调整为未开始。";
$lang->task->copyStoryTitle = "同{$lang->SRCommon}";
$lang->task->afterSubmit = "添加之后";
$lang->task->successSaved = "成功添加,";
+1 -1
View File
@@ -16,7 +16,7 @@
.table-recorded thead{background: rgb(245 245 245);}
</style>
<?php $members = $task->members;?>
<?php js::set('confirmRecord', (!empty($members) && $task->mode == 'linear' && && $task->assignedTo != end($members)) ? $lang->task->confirmTransfer : $lang->task->confirmRecord);?>
<?php js::set('confirmRecord', (!empty($members) && $task->mode == 'linear' && $task->assignedTo != end($members)) ? $lang->task->confirmTransfer : $lang->task->confirmRecord);?>
<?php js::set('noticeSaveRecord', $lang->task->noticeSaveRecord);?>
<?php js::set('today', helper::today());?>
<div id='mainContent' class='main-content'>