* adjust for link case in testtask.

This commit is contained in:
wangyidong
2017-03-16 09:44:55 +08:00
parent bc386309db
commit 90c70d3373
5 changed files with 50 additions and 31 deletions
+1 -1
View File
@@ -749,7 +749,7 @@ class commonModel extends model
/* set the class. */
if(!$icon)
{
$icon = $lang->icons[$method] ? $lang->icons[$method] : $method;
$icon = isset($lang->icons[$method]) ? $lang->icons[$method] : $method;
}
if(strpos(',edit,copy,report,export,delete,', ",$method,") !== false) $module = 'common';
$class = "icon-$module-$method";
+1
View File
@@ -36,6 +36,7 @@ $lang->testsuite->unlinkedCases = '未关联';
$lang->testsuite->confirmDelete = '您确认要删除该套件吗?';
$lang->testsuite->confirmUnlinkCase = '您确认要移除该用例吗?';
$lang->testsuite->noticeNone = '您还没有创建套件';
$lang->testsuite->lblCases = '用例列表';
$lang->testsuite->lblUnlinkCase = '移除用例';
+2
View File
@@ -1 +1,3 @@
.table > caption {border:1px solid #ddd; border-bottom: none;}
.heading-actions{display:inline-block;margin-top:-5px; margin-left:10px;}
.heading-actions .dropdown{margin-right:5px;}
+1
View File
@@ -86,6 +86,7 @@ $lang->testtask->showFail = '失败<span class="text-danger">%s</span>次';
$lang->testtask->confirmDelete = '您确认要删除该版本吗?';
$lang->testtask->confirmUnlinkCase = '您确认要移除该用例吗?';
$lang->testtask->noticeNoOther = '该产品还没有其他测试版本';
$lang->testtask->assignedToMe = '指派给我';
$lang->testtask->allCases = '所有用例';
+45 -30
View File
@@ -17,40 +17,55 @@
<span class='prefix'><?php echo html::icon($lang->icons['testtask']);?> <strong><?php echo $task->id;?></strong></span>
<strong><?php echo html::a($this->createLink('testtask', 'view', 'taskID=' . $task->id), $task->name, '_blank');?></strong>
<small class='text-muted'> <?php echo $lang->testtask->linkCase;?> <?php echo html::icon($lang->icons['link']);?></small>
<div class='heading-actions'>
<?php
$lang->testtask->linkCase = $lang->testtask->linkByStory;
common::printIcon('testtask', 'linkCase', "taskID=$taskID&type=bystory", '', 'button', '', '', 'btn-primary btn-sm');
echo "<span class='dropdown'>";
echo "<button class='btn btn-primary btn-sm' type='button' data-toggle='dropdown'>{$lang->testtask->linkByVersion} <span class='caret'></span></button>";
echo "<ul class='dropdown-menu' style='max-height:240px;overflow-y:auto'>";
if($testTask)
{
foreach($testTask as $tmpID => $tmpTitle)
{
$active = ($type == 'bybuild' and (int)$param == $tmpID) ? "class='active'" : '';
echo "<li $active>" . html::a(inlink('linkCase', "taskID=$taskID&type=bybuild&param=$tmpID"), $tmpTitle) . "</li>";
}
}
else
{
echo "<li>" . html::a('###', $lang->testtask->noticeNoOther) . "</li>";
}
echo "</ul></span>";
echo "<span class='dropdown'>";
echo "<button class='btn btn-primary btn-sm' type='button' data-toggle='dropdown'>{$lang->testtask->linkBySuite} <span class='caret'></span></button>";
echo "<ul class='dropdown-menu' style='max-height:240px;overflow-y:auto'>";
if($suiteList)
{
foreach($suiteList as $suiteID => $suite)
{
$active = ($type == 'bysuite' and (int)$param == $suiteID) ? "class='active'" : '';
$suiteName = $suite->name;
if($suite->type == 'public') $suiteName .= " <span class='label label-info'>{$lang->testsuite->authorList[$suite->type]}</span>";
echo "<li $active>" . html::a(inlink('linkCase', "taskID=$taskID&type=bysuite&param=$suiteID"), $suiteName) . "</li>";
}
}
else
{
echo "<li>" . html::a('###', $lang->testsuite->noticeNone) . "</li>";
}
echo "</ul></span>";
//$lang->testtask->linkCase = $lang->testtask->linkByBug;
//common::printIcon('testtask', 'linkCase', "taskID=$taskID&type=bybug", '', 'button', 'link');
?>
</div>
</div>
<div class='actions'>
<?php
echo "<div class='btn-group'>";
echo "<span class='dropdown'>";
echo "<button class='btn' type='button' data-toggle='dropdown'><i class='icon icon-link'></i> {$lang->testtask->linkByVersion} <span class='caret'></span></button>";
echo "<ul class='dropdown-menu' style='max-height:240px;overflow-y:auto'>";
foreach($testTask as $tmpID => $tmpTitle)
{
$active = ($type == 'bybuild' and (int)$param == $tmpID) ? "class='active'" : '';
echo "<li $active>" . html::a(inlink('linkCase', "taskID=$taskID&type=bybuild&param=$tmpID"), $tmpTitle) . "</li>";
}
echo "</ul></span>";
echo "<span class='dropdown'>";
echo "<button class='btn' type='button' data-toggle='dropdown'><i class='icon icon-link'></i> {$lang->testtask->linkBySuite} <span class='caret'></span></button>";
echo "<ul class='dropdown-menu' style='max-height:240px;overflow-y:auto'>";
foreach($suiteList as $suiteID => $suite)
{
$active = ($type == 'bysuite' and (int)$param == $suiteID) ? "class='active'" : '';
$suiteName = $suite->name;
if($suite->type == 'public') $suiteName .= " <span class='label label-info'>{$lang->testsuite->authorList[$suite->type]}</span>";
echo "<li $active>" . html::a(inlink('linkCase', "taskID=$taskID&type=bysuite&param=$suiteID"), $suiteName) . "</li>";
}
echo "</ul></span>";
$lang->testtask->linkCase = $lang->testtask->linkByStory;
common::printIcon('testtask', 'linkCase', "taskID=$taskID&type=bystory", '', 'button', 'link');
$lang->testtask->linkCase = $lang->testtask->linkByBug;
common::printIcon('testtask', 'linkCase', "taskID=$taskID&type=bybug", '', 'button', 'link');
echo '</div>';
echo "<div class='btn-group'>";
common::printRPN($this->session->testtaskList);
echo '</div>';
?>