Merge branch 'master' of github.com:easysoft/zentaopms

This commit is contained in:
wangyidong
2019-02-21 16:21:51 +08:00
8 changed files with 52 additions and 34 deletions
+6 -5
View File
@@ -128,11 +128,12 @@ $lang->bug->assignToMeAB = 'Assigned To Me';
$lang->bug->openedByMeAB = 'Created By Me';
$lang->bug->resolvedByMeAB = 'Resolved By Me';
$lang->bug->ditto = 'Ditto';
$lang->bug->dittoNotice = 'This bug is not linked to the same product as the last one!';
$lang->bug->noAssigned = 'Assign';
$lang->bug->noBug = 'No bugs. ';
$lang->bug->noModule = '<div>You have no modules.</div><div>Manage now</div>';
$lang->bug->ditto = 'Ditto';
$lang->bug->dittoNotice = 'This bug is not linked to the same product as the last one!';
$lang->bug->noAssigned = 'Assign';
$lang->bug->noBug = 'No bugs. ';
$lang->bug->noModule = '<div>You have no modules.</div><div>Manage now</div>';
$lang->bug->delayWarning = " <strong class='text-danger'> Delay %s days </strong>";
/* 页面标签。*/
$lang->bug->lblAssignedTo = 'Assignee';
+6 -5
View File
@@ -128,11 +128,12 @@ $lang->bug->assignToMeAB = '指派给我';
$lang->bug->openedByMeAB = '由我创建';
$lang->bug->resolvedByMeAB = '由我解决';
$lang->bug->ditto = '同上';
$lang->bug->dittoNotice = '该bug与上一bug不属于同一产品!';
$lang->bug->noAssigned = '未指派';
$lang->bug->noBug = '暂时没有Bug。';
$lang->bug->noModule = '<div>您现在还没有模块信息</div><div>请维护测试模块</div>';
$lang->bug->ditto = '同上';
$lang->bug->dittoNotice = '该bug与上一bug不属于同一产品!';
$lang->bug->noAssigned = '未指派';
$lang->bug->noBug = '暂时没有Bug。';
$lang->bug->noModule = '<div>您现在还没有模块信息</div><div>请维护测试模块</div>';
$lang->bug->delayWarning = " <strong class='text-danger'> 延期%s天 </strong>";
/* 页面标签。*/
$lang->bug->lblAssignedTo = '当前指派';
+30 -19
View File
@@ -360,7 +360,7 @@ class bugModel extends model
}
/**
* Check delay bug.
* Check delay bugs.
*
* @param array $bugs
* @access public
@@ -368,27 +368,38 @@ class bugModel extends model
*/
public function checkDelayBugs($bugs)
{
foreach ($bugs as $bug)
{
// Delayed or not?.
if($bug->deadline != '0000-00-00')
{
if(substr($bug->resolvedDate, 0, 10) != '0000-00-00')
{
$delay = helper::diffDate(substr($bug->resolvedDate, 0, 10), $bug->deadline);
}
elseif($bug->status == 'active')
{
$delay = helper::diffDate(helper::today(), $bug->deadline);
}
if(isset($delay) and $delay > 0) $bug->delay = $delay;
}
}
foreach ($bugs as $bug) $bug = $this->checkDelayBug($bug);
return $bugs;
}
/**
* Check delay bug.
*
* @param array $bug
* @access public
* @return array
*/
public function checkDelayBug($bug)
{
// Delayed or not?.
if($bug->deadline != '0000-00-00')
{
if(substr($bug->resolvedDate, 0, 10) != '0000-00-00')
{
$delay = helper::diffDate(substr($bug->resolvedDate, 0, 10), $bug->deadline);
}
elseif($bug->status == 'active')
{
$delay = helper::diffDate(helper::today(), $bug->deadline);
}
if(isset($delay) and $delay > 0) $bug->delay = $delay;
}
return $bug;
}
/**
* Get bugs of a module.
*
@@ -469,7 +480,7 @@ class bugModel extends model
$bug->files = $this->loadModel('file')->getByObject('bug', $bugID);
return $bug;
return $this->checkDelayBug($bug);
}
/**
+6 -1
View File
@@ -200,7 +200,12 @@
</tr>
<tr>
<th><?php echo $lang->bug->deadline;?></th>
<td><?php if($bug->deadline) echo $bug->deadline;?></td>
<td>
<?php
if($bug->deadline) echo $bug->deadline;
if(isset($bug->delay)) printf($lang->bug->delayWarning, $bug->delay);
?>
</td>
</tr>
<tr>
<th><?php echo $lang->bug->os;?></th>
+1 -1
View File
@@ -135,7 +135,7 @@
</div>
<div class='actions'>
<?php if(common::hasPriv('file', 'delete')): ?>
<a href='<?php echo $this->createLink('file', 'delete', "fileID=$file->id"); ?>' target='hiddenwin' title='<?php echo $lang->delete?>' class='delete btn btn-link'><i class='icon icon-close'></i></a>
<a href='<?php echo $this->createLink('file', 'delete', "fileID=$file->id"); ?>' target='hiddenwin' title='<?php echo $lang->delete?>' class='delete btn btn-link'><i class='icon icon-trash'></i></a>
<?php endif?>
</div>
</div>
+1 -1
View File
@@ -12,7 +12,7 @@
common::printIcon('story', 'change', $vars, $story, 'list', 'fork', '', 'btn btn-info btn-icon');
common::printIcon('story', 'delete', $vars, $story, 'list', 'trash', 'hiddenwin', 'btn btn-info btn-icon');
common::printIcon('story', 'review', $vars, $story, 'list', 'glasses', '', 'btn btn-info btn-icon');
common::printIcon('story', 'close', $vars, $story, 'list', 'off', '', 'btn btn-info btn-icon iframe', true);
common::printIcon('story', 'close', $vars, $story, 'list', 'close', '', 'btn btn-info btn-icon iframe', true);
common::printIcon('story', 'edit', $vars, $story, 'list', '', '', 'btn btn-info btn-icon');
if($config->global->flow != 'onlyStory') common::printIcon('story', 'createCase', "productID=$story->product&branch=$story->branch&module=0&from=&param=0&$vars", $story, 'list', 'sitemap', '', 'btn btn-info btn-icon');
?>
+1 -1
View File
@@ -24,7 +24,7 @@
if($task->status == 'wait') common::printIcon('task', 'finish', "taskID=$task->id", $task, 'list', '', '', 'btn btn-info btn-icon iframe', true);
if($task->status == 'wait') common::printIcon('task', 'start', "taskID=$task->id", $task, 'list', '', '', 'btn btn-info btn-icon iframe', true);
if($task->status == 'pause') common::printIcon('task', 'restart', "taskID=$task->id", $task, 'list', '', '', 'btn btn-info btn-icon iframe', true);
if($task->status == 'done' or $task->status == 'cancel' or $task->status == 'closed') common::printIcon('task', 'close', "taskID=$task->id", $task, 'list', '', '', 'btn btn-info btn-icon iframe', true);
if($task->status == 'done' or $task->status == 'cancel' or $task->status == 'closed') common::printIcon('task', 'close', "taskID=$task->id", $task, 'list', 'close', '', 'btn btn-info btn-icon iframe', true);
if($task->status == 'doing') common::printIcon('task', 'finish', "taskID=$task->id", $task, 'list', '', '', 'btn btn-info btn-icon iframe', true);
common::printIcon('task', 'recordEstimate', "taskID=$task->id", $task, 'list', 'time', '', 'btn btn-info btn-icon iframe', true);
+1 -1
View File
@@ -112,7 +112,7 @@
<?php
if(common::hasPriv('testreport', 'create')) echo html::a(inLink('create', "objectID=$report->objectID&objectType=$report->objectType"), "<i class='icon-refresh'></i>", '', "class='btn' title='{$lang->testreport->recreate}'");
common::printIcon('testreport', 'edit', "reportID=$report->id", '', 'button');
common::printIcon('testreport', 'delete', "reportID=$report->id", '', 'button', '', 'hiddenwin');
common::printIcon('testreport', 'delete', "reportID=$report->id", '', 'button', 'trash', 'hiddenwin');
?>
<?php endif;?>
</div>