* finish task #7195.
This commit is contained in:
@@ -58,6 +58,8 @@ $lang->trunk = 'Trunk';
|
||||
$lang->sort = 'Sortieren';
|
||||
$lang->required = 'Pflicht';
|
||||
$lang->noData = 'Kein Datensatz';
|
||||
$lang->fullscreen = 'Fullscreen';
|
||||
$lang->retrack = 'Retrack';
|
||||
|
||||
$lang->actions = 'Aktionen';
|
||||
$lang->restore = 'Wiederherstellen';
|
||||
|
||||
@@ -58,6 +58,8 @@ $lang->trunk = 'Trunk';
|
||||
$lang->sort = 'Order';
|
||||
$lang->required = 'Required';
|
||||
$lang->noData = 'No data.';
|
||||
$lang->fullscreen = 'Fullscreen';
|
||||
$lang->retrack = 'Retrack';
|
||||
|
||||
$lang->actions = 'Action';
|
||||
$lang->restore = 'Reset';
|
||||
|
||||
@@ -58,6 +58,8 @@ $lang->trunk = 'Tronc';
|
||||
$lang->sort = 'Ordre';
|
||||
$lang->required = 'Obligatoire';
|
||||
$lang->noData = 'No data.';
|
||||
$lang->fullscreen = 'Plein Ecran';
|
||||
$lang->retrack = 'Réduire';
|
||||
|
||||
$lang->actions = 'Action';
|
||||
$lang->restore = 'Réinitialiser';
|
||||
|
||||
@@ -58,6 +58,8 @@ $lang->trunk = 'Trunk';
|
||||
$lang->sort = 'Sắp xếp';
|
||||
$lang->required = 'Bắt buộc';
|
||||
$lang->noData = 'Không có dữ liệu.';
|
||||
$lang->fullscreen = 'Fullscreen';
|
||||
$lang->retrack = 'Retrack';
|
||||
|
||||
$lang->actions = 'Hành động';
|
||||
$lang->restore = 'Thiết lập lại';
|
||||
|
||||
@@ -58,6 +58,8 @@ $lang->trunk = '主干';
|
||||
$lang->sort = '排序';
|
||||
$lang->required = '必填';
|
||||
$lang->noData = '暂无';
|
||||
$lang->fullscreen = '全屏';
|
||||
$lang->retrack = '收起';
|
||||
|
||||
$lang->actions = '操作';
|
||||
$lang->restore = '恢复默认';
|
||||
|
||||
+12
-27
@@ -7,37 +7,22 @@ $(function()
|
||||
setTimeout($.resetToolbarPosition, 50);
|
||||
}
|
||||
|
||||
if($.cookie('fullscreen') == 'true')
|
||||
{
|
||||
$('body').addClass('doc-fullscreen');
|
||||
$('.side-col').addClass('hidden');
|
||||
$('#mainContent .fullscreen-btn').attr('title', retrack);
|
||||
$('#mainContent .fullscreen-btn').html('<i class="icon icon-fullscreen"></i> ' + retrack);
|
||||
}
|
||||
else
|
||||
{
|
||||
$('body').removeClass('doc-feullscreen');
|
||||
$('.side-col').removeClass('hidden');
|
||||
$('#mainContent .fullscreen-btn').attr('title', fullscreen);
|
||||
$('#mainContent .fullscreen-btn').html('<i class="icon icon-fullscreen"></i> ' + fullscreen);
|
||||
}
|
||||
var isFullscreen = $.cookie('docFullscreen') == 'true';
|
||||
$('body').toggleClass('doc-fullscreen', isFullscreen);
|
||||
$('.side-col').toggleClass('hidden', isFullscreen);
|
||||
$('#mainMenu .fullscreen-btn').attr('title', isFullscreen ? retrack : fullscreen);
|
||||
$('#mainMenu .fullscreen-btn').html('<i class="icon icon-fullscreen"></i> ' + (isFullscreen ? retrack : fullscreen));
|
||||
|
||||
$('#mainContent .fullscreen-btn').click(function()
|
||||
$('#mainMenu .fullscreen-btn').click(function()
|
||||
{
|
||||
$('.side-col').toggleClass('hidden');
|
||||
$('body').toggleClass('doc-fullscreen');
|
||||
if($('body').hasClass('doc-fullscreen'))
|
||||
{
|
||||
$('#mainContent .fullscreen-btn').attr('title', retrack);
|
||||
$('#mainContent .fullscreen-btn').html('<i class="icon icon-fullscreen"></i> ' + retrack);
|
||||
$.cookie('fullscreen', 'true');
|
||||
}
|
||||
else
|
||||
{
|
||||
$('#mainContent .fullscreen-btn').attr('title', fullscreen);
|
||||
$('#mainContent .fullscreen-btn').html('<i class="icon icon-fullscreen"></i> ' + fullscreen);
|
||||
$.cookie('fullscreen', 'false');
|
||||
}
|
||||
|
||||
var isFullscreen = $('body').hasClass('doc-fullscreen');
|
||||
$('#mainMenu .fullscreen-btn').attr('title', isFullscreen ? retrack : fullscreen);
|
||||
$('#mainMenu .fullscreen-btn').html('<i class="icon icon-fullscreen"></i> ' + (isFullscreen ? retrack : fullscreen));
|
||||
$.cookie('docFullscreen', isFullscreen);
|
||||
|
||||
setTimeout($.resetToolbarPosition, 50);
|
||||
});
|
||||
|
||||
|
||||
@@ -47,8 +47,6 @@ $lang->doc->users = 'Benutzer';
|
||||
$lang->doc->item = ' Einträge';
|
||||
$lang->doc->num = 'Doks';
|
||||
$lang->doc->searchResult = 'Suchergebnis';
|
||||
$lang->doc->fullscreen = 'Fullscreen';
|
||||
$lang->doc->retrack = 'Retrack';
|
||||
|
||||
$lang->doc->moduleDoc = 'Nach Modulen';
|
||||
$lang->doc->searchDoc = 'Suche';
|
||||
|
||||
@@ -47,8 +47,6 @@ $lang->doc->users = 'Users';
|
||||
$lang->doc->item = ' Items';
|
||||
$lang->doc->num = 'Documents';
|
||||
$lang->doc->searchResult = 'Search Result';
|
||||
$lang->doc->fullscreen = 'Fullscreen';
|
||||
$lang->doc->retrack = 'Retrack';
|
||||
|
||||
$lang->doc->moduleDoc = 'By Module';
|
||||
$lang->doc->searchDoc = 'Search';
|
||||
|
||||
@@ -47,8 +47,6 @@ $lang->doc->users = 'Utilisateurs';
|
||||
$lang->doc->item = ' Objets';
|
||||
$lang->doc->num = 'Documents';
|
||||
$lang->doc->searchResult = 'Résultat de Recherche';
|
||||
$lang->doc->fullscreen = 'Plein Ecran';
|
||||
$lang->doc->retrack = 'Réduire';
|
||||
|
||||
$lang->doc->moduleDoc = 'Par Module';
|
||||
$lang->doc->searchDoc = 'Rechercher';
|
||||
|
||||
@@ -47,8 +47,6 @@ $lang->doc->users = 'Người dùng';
|
||||
$lang->doc->item = ' Items';
|
||||
$lang->doc->num = 'Documents';
|
||||
$lang->doc->searchResult = 'Search kết quả';
|
||||
$lang->doc->fullscreen = 'Fullscreen';
|
||||
$lang->doc->retrack = 'Retrack';
|
||||
|
||||
$lang->doc->moduleDoc = 'By Module';
|
||||
$lang->doc->searchDoc = 'Tìm kiếm';
|
||||
|
||||
@@ -47,8 +47,6 @@ $lang->doc->users = '用户';
|
||||
$lang->doc->item = '项';
|
||||
$lang->doc->num = '文档数量';
|
||||
$lang->doc->searchResult = '搜索结果';
|
||||
$lang->doc->fullscreen = '全屏';
|
||||
$lang->doc->retrack = '收起';
|
||||
|
||||
$lang->doc->moduleDoc = '按模块浏览';
|
||||
$lang->doc->searchDoc = '搜索';
|
||||
|
||||
@@ -15,8 +15,8 @@
|
||||
<?php echo css::internal($keTableCSS);?>
|
||||
<?php $browseLink = $this->session->docList ? $this->session->docList : inlink('browse');?>
|
||||
<?php
|
||||
js::set('fullscreen', $lang->doc->fullscreen);
|
||||
js::set('retrack', $lang->doc->retrack);
|
||||
js::set('fullscreen', $lang->fullscreen);
|
||||
js::set('retrack', $lang->retrack);
|
||||
js::set('sysurl', common::getSysUrl());
|
||||
js::set('docID', $doc->id);
|
||||
?>
|
||||
@@ -70,6 +70,9 @@ js::set('docID', $doc->id);
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class='btn-toolbar pull-right'>
|
||||
<button type='button' class='btn btn-secondary fullscreen-btn' title='<?php echo $lang->retrack;?>'><i class='icon icon-fullscreen'></i><?php echo ' ' . $lang->retrack;?></button>
|
||||
</div>
|
||||
</div>
|
||||
<div id="mainContent" class="main-row">
|
||||
<div class="main-col col-8">
|
||||
@@ -132,7 +135,6 @@ js::set('docID', $doc->id);
|
||||
<div class="btn-toolbar">
|
||||
<?php common::printBack($browseLink);?>
|
||||
<div class='divider'></div>
|
||||
<button type='button' class='btn fullscreen-btn' title='<?php echo $lang->doc->retrack;?>'><i class='icon icon-fullscreen'></i><?php echo ' ' . $lang->doc->retrack;?></button>
|
||||
<?php
|
||||
if(!$doc->deleted)
|
||||
{
|
||||
|
||||
@@ -1,2 +1,5 @@
|
||||
.table-fixed td{white-space: unset;}
|
||||
#tabsNav .tab-pane>.cell + .cell {border-top:1px solid #cbd0db; border-radius:4px;}
|
||||
|
||||
.case-fullscreen .main-row > .side-col {width: 0; position: relative; overflow: hidden}
|
||||
.case-fullscreen .fullscreen-btn > .icon-fullscreen:before {content: '\e972'}
|
||||
|
||||
@@ -2,4 +2,23 @@ $(document).ready(function()
|
||||
{
|
||||
if(config.onlybody != 'yes')$(".runCase").modalTrigger({width:'90%', type:'iframe', afterHide:function(){parent.location.href=parent.location.href;}});
|
||||
if(config.onlybody != 'yes')$(".results").modalTrigger({width:'90%', type:'iframe'});
|
||||
|
||||
var isFullscreen = $.cookie('caseFullscreen') == 'true';
|
||||
$('body').toggleClass('case-fullscreen', isFullscreen);
|
||||
$('.side-col').toggleClass('hidden', isFullscreen);
|
||||
$('#mainMenu .fullscreen-btn').attr('title', isFullscreen ? retrack : fullscreen);
|
||||
$('#mainMenu .fullscreen-btn').html('<i class="icon icon-fullscreen"></i> ' + (isFullscreen ? retrack : fullscreen));
|
||||
|
||||
$('#mainMenu .fullscreen-btn').click(function()
|
||||
{
|
||||
$('.side-col').toggleClass('hidden');
|
||||
$('body').toggleClass('case-fullscreen');
|
||||
|
||||
var isFullscreen = $('body').hasClass('case-fullscreen');
|
||||
$('#mainMenu .fullscreen-btn').attr('title', isFullscreen ? retrack : fullscreen);
|
||||
$('#mainMenu .fullscreen-btn').html('<i class="icon icon-fullscreen"></i> ' + (isFullscreen ? retrack : fullscreen));
|
||||
$.cookie('caseFullscreen', isFullscreen);
|
||||
|
||||
setTimeout($.resetToolbarPosition, 50);
|
||||
});
|
||||
})
|
||||
|
||||
+284
-285
@@ -47,306 +47,305 @@
|
||||
</div>
|
||||
<?php if(!isonlybody()):?>
|
||||
<div class='btn-toolbar pull-right'>
|
||||
<button type='button' class='btn btn-secondary fullscreen-btn' title='<?php echo $lang->retrack;?>'><i class='icon icon-fullscreen'></i><?php echo ' ' . $lang->retrack;?></button>
|
||||
<?php common::printLink('testcase', 'create', "productID={$case->product}&branch={$case->branch}&moduleID={$case->module}", "<i class='icon icon-plus'></i>" . $lang->testcase->create, '', "class='btn btn-primary'"); ?>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
|
||||
<div id="mainContent" class="main-content">
|
||||
<div class='tabs' id='tabsNav'>
|
||||
<ul class='nav nav-tabs'>
|
||||
<li class='active'><a href='#steps' data-toggle='tab'><?php echo $lang->testcase->steps;?></a></li>
|
||||
<li><a href='#basic' data-toggle='tab'><?php echo $lang->testcase->legendBasicInfo;?></a></li>
|
||||
</ul>
|
||||
<div class='tab-content'>
|
||||
<div id='steps' class='tab-pane active'>
|
||||
<div class='cell' style='word-break:break-all'>
|
||||
<?php if($case->auto != 'unit'):?>
|
||||
<div class='detail'>
|
||||
<div class='detail-title'><?php echo $lang->testcase->precondition;?></div>
|
||||
<div class="detail-content article-content"><?php echo nl2br($case->precondition);?></div>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
<div class='detail'>
|
||||
<div class='detail-title'><?php echo $lang->testcase->steps;?></div>
|
||||
<div class="detail-content">
|
||||
<table class='table table-condensed table-hover table-striped table-bordered' id='steps'>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class='w-50px'><?php echo $lang->testcase->stepID;?></th>
|
||||
<th class='w-p60 text-left'><?php echo $lang->testcase->stepDesc;?></th>
|
||||
<th class='text-left'><?php echo $lang->testcase->stepExpect;?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<?php
|
||||
$stepId = $childId = 0;
|
||||
foreach($case->steps as $stepID => $step)
|
||||
{
|
||||
$stepClass = "step-{$step->type}";
|
||||
if($step->type == 'group' or $step->type == 'step')
|
||||
{
|
||||
$stepId++;
|
||||
$childId = 0;
|
||||
}
|
||||
if($step->type == 'step') $stepClass = 'step-group';
|
||||
echo "<tr class='step {$stepClass}'>";
|
||||
echo "<th class='step-id'>$stepId</th>";
|
||||
echo "<td class='text-left'><div class='input-group'>";
|
||||
if($step->type == 'item') echo "<span class='step-item-id'>{$stepId}.{$childId}</span>";
|
||||
echo nl2br(str_replace(' ', ' ', $step->desc)) . "</td>";
|
||||
echo "<td class='text-left'>" . nl2br(str_replace(' ', ' ', $step->expect)) . "</div></td>";
|
||||
echo "</tr>";
|
||||
$childId ++;
|
||||
}
|
||||
?>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<?php if(!empty($case->xml)):?>
|
||||
<div class='detail'>
|
||||
<div class='detail-title'><?php echo $lang->testcase->xml;?></div>
|
||||
<div class="detail-content article-content"><?php echo nl2br(htmlspecialchars($case->xml));?></div>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
<?php echo $this->fetch('file', 'printFiles', array('files' => $case->files, 'fieldset' => 'true'));?>
|
||||
</div>
|
||||
<?php $this->printExtendFields($case, 'div', "position=left&inForm=0&inCell=1");?>
|
||||
<div class='cell'><?php include '../../common/view/action.html.php';?></div>
|
||||
<div id="mainContent" class="main-row">
|
||||
<div class='main-col col-8'>
|
||||
<div class='cell' style='word-break:break-all'>
|
||||
<?php if($case->auto != 'unit' or empty(!$case->precondition)):?>
|
||||
<div class='detail'>
|
||||
<div class='detail-title'><?php echo $lang->testcase->precondition;?></div>
|
||||
<div class="detail-content article-content"><?php echo nl2br($case->precondition);?></div>
|
||||
</div>
|
||||
<div id='basic' class='tab-pane'>
|
||||
<div class="cell">
|
||||
<details class="detail" open>
|
||||
<summary class="detail-title"><?php echo $lang->testcase->legendBasicInfo;?></summary>
|
||||
<div class="detail-content">
|
||||
<table class='table table-data'>
|
||||
<?php if($isLibCase):?>
|
||||
<tr>
|
||||
<th class='thWidth'><?php echo $lang->testcase->lib;?></th>
|
||||
<td><?php if(!common::printLink('caselib', 'browse', "libID=$case->lib", $libName)) echo $libName;?></td>
|
||||
</tr>
|
||||
<?php else:?>
|
||||
<tr>
|
||||
<th class='thWidth'><?php echo $lang->testcase->product;?></th>
|
||||
<td><?php if(!common::printLink('testcase', 'browse', "productID=$case->product", $productName)) echo $productName;?></td>
|
||||
</tr>
|
||||
<?php if($this->session->currentProductType != 'normal'):?>
|
||||
<tr>
|
||||
<th><?php echo $lang->product->branch;?></th>
|
||||
<td><?php if(!common::printLink('testcase', 'browse', "productID=$case->product&branch=$case->branch", $branchName)) echo $branchName;?></td>
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
<?php endif;?>
|
||||
<tr>
|
||||
<th><?php echo $lang->testcase->module;?></th>
|
||||
<td>
|
||||
<?php
|
||||
if(empty($modulePath))
|
||||
{
|
||||
echo "/";
|
||||
}
|
||||
else
|
||||
{
|
||||
if($caseModule->branch and isset($branches[$caseModule->branch]))
|
||||
{
|
||||
echo $branches[$caseModule->branch] . $lang->arrow;
|
||||
}
|
||||
<?php endif;?>
|
||||
<div class='detail'>
|
||||
<div class='detail-title'><?php echo $lang->testcase->steps;?></div>
|
||||
<div class="detail-content">
|
||||
<table class='table table-condensed table-hover table-striped table-bordered' id='steps'>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class='w-50px'><?php echo $lang->testcase->stepID;?></th>
|
||||
<th class='w-p60 text-left'><?php echo $lang->testcase->stepDesc;?></th>
|
||||
<th class='text-left'><?php echo $lang->testcase->stepExpect;?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<?php
|
||||
$stepId = $childId = 0;
|
||||
foreach($case->steps as $stepID => $step)
|
||||
{
|
||||
$stepClass = "step-{$step->type}";
|
||||
if($step->type == 'group' or $step->type == 'step')
|
||||
{
|
||||
$stepId++;
|
||||
$childId = 0;
|
||||
}
|
||||
if($step->type == 'step') $stepClass = 'step-group';
|
||||
echo "<tr class='step {$stepClass}'>";
|
||||
echo "<th class='step-id'>$stepId</th>";
|
||||
echo "<td class='text-left'><div class='input-group'>";
|
||||
if($step->type == 'item') echo "<span class='step-item-id'>{$stepId}.{$childId}</span>";
|
||||
echo nl2br(str_replace(' ', ' ', $step->desc)) . "</td>";
|
||||
echo "<td class='text-left'>" . nl2br(str_replace(' ', ' ', $step->expect)) . "</div></td>";
|
||||
echo "</tr>";
|
||||
$childId ++;
|
||||
}
|
||||
?>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<?php if(isset($case->xml)):?>
|
||||
<div class='detail'>
|
||||
<div class='detail-title'><?php echo $lang->testcase->xml;?></div>
|
||||
<div class="detail-content article-content"><?php echo nl2br(htmlspecialchars($case->xml));?></div>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
<?php echo $this->fetch('file', 'printFiles', array('files' => $case->files, 'fieldset' => 'true'));?>
|
||||
</div>
|
||||
<?php $this->printExtendFields($case, 'div', "position=left&inForm=0&inCell=1");?>
|
||||
<div class='main-actions'>
|
||||
<div class="btn-toolbar">
|
||||
<?php common::printBack($browseLink);?>
|
||||
<?php if(!$case->deleted):?>
|
||||
<?php if(!isonlybody()) echo "<div class='divider'></div>";?>
|
||||
<?php
|
||||
if(!$isLibCase)
|
||||
{
|
||||
if(!isonlybody()) echo "<div class='divider'></div>";
|
||||
common::printIcon('testtask', 'runCase', "runID=$runID&caseID=$case->id&version=$case->currentVersion", $case, 'button', '', '', 'showinonlybody iframe', false, "data-width='95%'");
|
||||
common::printIcon('testtask', 'results', "runID=$runID&caseID=$case->id&version=$case->version", $case, 'button', '', '', 'showinonlybody iframe', false, "data-width='95%'");
|
||||
|
||||
foreach($modulePath as $key => $module)
|
||||
{
|
||||
if(!common::printLink('testcase', 'browse', "productID=$case->product&branch=$module->branch&browseType=byModule¶m=$module->id", $module->name)) echo $module->name;
|
||||
if(isset($modulePath[$key + 1])) echo $lang->arrow;
|
||||
}
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php if(!$isLibCase and $config->global->flow != 'onlyTest'):?>
|
||||
<tr class='nofixed'>
|
||||
<th><?php echo $lang->testcase->story;?></th>
|
||||
<td>
|
||||
<?php
|
||||
if(isset($case->storyTitle)) echo html::a($this->createLink('story', 'view', "storyID=$case->story", '', true), "#$case->story:$case->storyTitle", '', "class='iframe' data-width='80%'");
|
||||
if($case->story and $case->storyStatus == 'active' and $case->latestStoryVersion > $case->storyVersion)
|
||||
{
|
||||
echo "(<span class='warning'>{$lang->story->changed}</span> ";
|
||||
if(common::hasPriv('testcase', 'confirmStoryChange')) echo html::a($this->createLink('testcase', 'confirmStoryChange', "caseID=$case->id"), $lang->confirm, 'hiddenwin');
|
||||
echo ")";
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
<tr>
|
||||
<th><?php echo $lang->testcase->type;?></th>
|
||||
<td><?php echo $lang->testcase->typeList[$case->type];?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->testcase->stage;?></th>
|
||||
<td>
|
||||
<?php
|
||||
if($case->stage)
|
||||
{
|
||||
$stags = explode(',', $case->stage);
|
||||
foreach($stags as $stage)
|
||||
{
|
||||
if(empty($stage)) continue;
|
||||
isset($lang->testcase->stageList[$stage]) ? print($lang->testcase->stageList[$stage]) : print($stage);
|
||||
echo "<br />";
|
||||
}
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->testcase->pri;?></th>
|
||||
<td><span class='label-pri label-pri-<?php echo $case->pri;?>' title='<?php echo zget($lang->testcase->priList, $case->pri);?>'><?php echo zget($lang->testcase->priList, $case->pri)?></span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->testcase->status;?></th>
|
||||
<td>
|
||||
<?php
|
||||
echo $this->processStatus($from != 'testtask' ? 'testcase' : 'testtask', $case);
|
||||
if($case->version > $case->currentVersion and $from == 'testtask')
|
||||
{
|
||||
echo "(<span class='warning' title={$lang->testcase->fromTesttask}>{$lang->testcase->changed}</span> ";
|
||||
if(common::hasPriv('testcase', 'confirmchange')) echo html::a($this->createLink('testcase', 'confirmchange', "caseID=$case->id&taskID=$taskID"), $lang->testcase->sync, 'hiddenwin', "class='btn btn-mini btn-info'");
|
||||
echo ")";
|
||||
}
|
||||
if(isset($case->fromCaseVersion) and $case->fromCaseVersion > $case->version and $from != 'testtask')
|
||||
{
|
||||
echo "(<span class='warning' title={$lang->testcase->fromCaselib}>{$lang->testcase->changed}</span> ";
|
||||
if(common::hasPriv('testcase', 'confirmLibcaseChange')) echo html::a($this->createLink('testcase', 'confirmLibcaseChange', "caseID=$case->id&libcaseID=$case->fromCaseID"), $lang->testcase->sync, 'hiddenwin', "class='btn btn-mini btn-info'");
|
||||
if(common::hasPriv('testcase', 'ignoreLibcaseChange')) echo html::a($this->createLink('testcase', 'ignoreLibcaseChange', "caseID=$case->id"), $lang->testcase->ignore, 'hiddenwin', "class='btn btn-mini btn-info'");
|
||||
echo ")";
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php if(!$isLibCase):?>
|
||||
<tr>
|
||||
<th><?php echo $this->app->loadLang('testtask')->testtask->lastRunTime;?></th>
|
||||
<td><?php if(!helper::isZeroDate($case->lastRunDate)) echo $case->lastRunDate;?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $this->app->loadLang('testtask')->testtask->lastRunResult;?></th>
|
||||
<td><?php if($case->lastRunResult) echo $lang->testcase->resultList[$case->lastRunResult];?></td>
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
<tr>
|
||||
<th><?php echo $lang->testcase->keywords;?></th>
|
||||
<td><?php echo $case->keywords;?></td>
|
||||
</tr>
|
||||
<?php if(!$isLibCase):?>
|
||||
<tr>
|
||||
<th><?php echo $lang->testcase->linkCase;?></th>
|
||||
<td>
|
||||
<?php
|
||||
if(isset($case->linkCaseTitles))
|
||||
{
|
||||
foreach($case->linkCaseTitles as $linkCaseID => $linkCaseTitle)
|
||||
{
|
||||
echo html::a($this->createLink('testcase', 'view', "caseID=$linkCaseID", '', true), "#$linkCaseID $linkCaseTitle", '', "class='iframe' data-width='80%'") . '<br />';
|
||||
}
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
</table>
|
||||
</div>
|
||||
</details>
|
||||
</div>
|
||||
<?php if(!$isLibCase):?>
|
||||
<div class="cell">
|
||||
<details class="detail" open>
|
||||
<summary class="detail-title"><?php echo $lang->testcase->legendLinkBugs;?></summary>
|
||||
<div class="detail-content">
|
||||
<table class='table table-data'>
|
||||
<?php if($case->fromBug):?>
|
||||
<tr>
|
||||
<th class='thWidth'><?php echo $lang->testcase->fromBug;?></th>
|
||||
<td><?php echo html::a($this->createLink('bug', 'view', "bugID=$case->fromBug", '', true), $case->fromBugTitle, '', "class='iframe' data-width='80%'");?></td>
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
<?php if($case->toBugs):?>
|
||||
<tr>
|
||||
<th class='thWidth' valign="top"><?php echo $lang->testcase->toBug;?></th>
|
||||
<td>
|
||||
<?php
|
||||
foreach($case->toBugs as $bugID => $bugTitle)
|
||||
{
|
||||
echo '<p style="margin-bottom:0;">' . html::a($this->createLink('bug', 'view', "bugID=$bugID", '', true), $bugTitle, '', "class='iframe' data-width='80%'") . '</p>';
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
</table>
|
||||
</div>
|
||||
</details>
|
||||
</div>
|
||||
if($caseFails > 0) common::printIcon('testcase', 'createBug', "product=$case->product&branch=$case->branch&extra=caseID=$case->id,version=$case->version,runID=$runID", $case, 'button', 'bug', '', 'iframe', '', "data-width='90%'");
|
||||
}
|
||||
if($config->testcase->needReview or !empty($config->testcase->forceReview)) common::printIcon('testcase', 'review', "caseID=$case->id", $case, 'button', '', '', 'iframe', '', '', $lang->testcase->reviewAB);
|
||||
?>
|
||||
|
||||
<?php echo $this->buildOperateMenu($case, 'view');?>
|
||||
|
||||
<?php
|
||||
common::printIcon('testcase', 'edit',"caseID=$case->id", $case, 'button', '', '', 'showinonlybody');
|
||||
if(!$isLibCase and $case->auto != 'unit') common::printIcon('testcase', 'create', "productID=$case->product&branch=$case->branch&moduleID=$case->module&from=testcase¶m=$case->id", $case, 'button', 'copy');
|
||||
if($isLibCase and common::hasPriv('caselib', 'createCase')) echo html::a($this->createLink('caselib', 'createCase', "libID=$case->lib&moduleID=$case->module¶m=$case->id", $case), "<i class='icon-copy'></i>", '', "class='btn' title='{$lang->testcase->copy}'");
|
||||
common::printIcon('testcase', 'delete', "caseID=$case->id", $case, 'button', 'trash', 'hiddenwin', 'showinonlybody');
|
||||
?>
|
||||
<?php endif;?>
|
||||
<div class="cell">
|
||||
<details class="detail" open>
|
||||
<summary class="detail-title"><?php echo $lang->testcase->legendOpenAndEdit;?></summary>
|
||||
<div class="detail-content">
|
||||
<table class='table table-data'>
|
||||
<tr>
|
||||
<th class='lifeThWidth'><?php echo $lang->testcase->openedBy;?></th>
|
||||
<td><?php echo zget($users, $case->openedBy) . $lang->at . $case->openedDate;?></td>
|
||||
</tr>
|
||||
<?php if($config->testcase->needReview or !empty($config->testcase->forceReview)):?>
|
||||
<tr>
|
||||
<th><?php echo $lang->testcase->reviewedBy;?></th>
|
||||
<td><?php $reviewedBy = explode(',', $case->reviewedBy); foreach($reviewedBy as $account) echo ' ' . zget($users, trim($account)); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->testcase->reviewedDate;?></th>
|
||||
<td><?php if($case->reviewedBy) echo $case->reviewedDate;?></td>
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
<tr>
|
||||
<th><?php echo $lang->testcase->lblLastEdited;?></th>
|
||||
<td><?php if($case->lastEditedBy) echo zget($users, $case->lastEditedBy) . $lang->at . $case->lastEditedDate;?></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</details>
|
||||
</div>
|
||||
<?php $this->printExtendFields($case, 'div', "position=right&inForm=0&inCell=1");?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class='side-col col-4'>
|
||||
<div class="cell">
|
||||
<details class="detail" open>
|
||||
<summary class="detail-title"><?php echo $lang->testcase->legendBasicInfo;?></summary>
|
||||
<div class="detail-content">
|
||||
<table class='table table-data'>
|
||||
<?php if($isLibCase):?>
|
||||
<tr>
|
||||
<th class='thWidth'><?php echo $lang->testcase->lib;?></th>
|
||||
<td><?php if(!common::printLink('caselib', 'browse', "libID=$case->lib", $libName)) echo $libName;?></td>
|
||||
</tr>
|
||||
<?php else:?>
|
||||
<tr>
|
||||
<th class='thWidth'><?php echo $lang->testcase->product;?></th>
|
||||
<td><?php if(!common::printLink('testcase', 'browse', "productID=$case->product", $productName)) echo $productName;?></td>
|
||||
</tr>
|
||||
<?php if($this->session->currentProductType != 'normal'):?>
|
||||
<tr>
|
||||
<th><?php echo $lang->product->branch;?></th>
|
||||
<td><?php if(!common::printLink('testcase', 'browse', "productID=$case->product&branch=$case->branch", $branchName)) echo $branchName;?></td>
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
<?php endif;?>
|
||||
<tr>
|
||||
<th><?php echo $lang->testcase->module;?></th>
|
||||
<td>
|
||||
<?php
|
||||
if(empty($modulePath))
|
||||
{
|
||||
echo "/";
|
||||
}
|
||||
else
|
||||
{
|
||||
if($caseModule->branch and isset($branches[$caseModule->branch]))
|
||||
{
|
||||
echo $branches[$caseModule->branch] . $lang->arrow;
|
||||
}
|
||||
|
||||
foreach($modulePath as $key => $module)
|
||||
{
|
||||
if(!common::printLink('testcase', 'browse', "productID=$case->product&branch=$module->branch&browseType=byModule¶m=$module->id", $module->name)) echo $module->name;
|
||||
if(isset($modulePath[$key + 1])) echo $lang->arrow;
|
||||
}
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php if(!$isLibCase and $config->global->flow != 'onlyTest'):?>
|
||||
<tr class='nofixed'>
|
||||
<th><?php echo $lang->testcase->story;?></th>
|
||||
<td>
|
||||
<?php
|
||||
if(isset($case->storyTitle)) echo html::a($this->createLink('story', 'view', "storyID=$case->story", '', true), "#$case->story:$case->storyTitle", '', "class='iframe' data-width='80%'");
|
||||
if($case->story and $case->storyStatus == 'active' and $case->latestStoryVersion > $case->storyVersion)
|
||||
{
|
||||
echo "(<span class='warning'>{$lang->story->changed}</span> ";
|
||||
if(common::hasPriv('testcase', 'confirmStoryChange')) echo html::a($this->createLink('testcase', 'confirmStoryChange', "caseID=$case->id"), $lang->confirm, 'hiddenwin');
|
||||
echo ")";
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
<tr>
|
||||
<th><?php echo $lang->testcase->type;?></th>
|
||||
<td><?php echo $lang->testcase->typeList[$case->type];?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->testcase->stage;?></th>
|
||||
<td>
|
||||
<?php
|
||||
if($case->stage)
|
||||
{
|
||||
$stags = explode(',', $case->stage);
|
||||
foreach($stags as $stage)
|
||||
{
|
||||
if(empty($stage)) continue;
|
||||
isset($lang->testcase->stageList[$stage]) ? print($lang->testcase->stageList[$stage]) : print($stage);
|
||||
echo "<br />";
|
||||
}
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->testcase->pri;?></th>
|
||||
<td><span class='label-pri label-pri-<?php echo $case->pri;?>' title='<?php echo zget($lang->testcase->priList, $case->pri);?>'><?php echo zget($lang->testcase->priList, $case->pri)?></span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->testcase->status;?></th>
|
||||
<td>
|
||||
<?php
|
||||
echo $this->processStatus($from != 'testtask' ? 'testcase' : 'testtask', $case);
|
||||
if($case->version > $case->currentVersion and $from == 'testtask')
|
||||
{
|
||||
echo "(<span class='warning' title={$lang->testcase->fromTesttask}>{$lang->testcase->changed}</span> ";
|
||||
if(common::hasPriv('testcase', 'confirmchange')) echo html::a($this->createLink('testcase', 'confirmchange', "caseID=$case->id&taskID=$taskID"), $lang->testcase->sync, 'hiddenwin', "class='btn btn-mini btn-info'");
|
||||
echo ")";
|
||||
}
|
||||
if(isset($case->fromCaseVersion) and $case->fromCaseVersion > $case->version and $from != 'testtask')
|
||||
{
|
||||
echo "(<span class='warning' title={$lang->testcase->fromCaselib}>{$lang->testcase->changed}</span> ";
|
||||
if(common::hasPriv('testcase', 'confirmLibcaseChange')) echo html::a($this->createLink('testcase', 'confirmLibcaseChange', "caseID=$case->id&libcaseID=$case->fromCaseID"), $lang->testcase->sync, 'hiddenwin', "class='btn btn-mini btn-info'");
|
||||
if(common::hasPriv('testcase', 'ignoreLibcaseChange')) echo html::a($this->createLink('testcase', 'ignoreLibcaseChange', "caseID=$case->id"), $lang->testcase->ignore, 'hiddenwin', "class='btn btn-mini btn-info'");
|
||||
echo ")";
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php if(!$isLibCase):?>
|
||||
<tr>
|
||||
<th><?php echo $this->app->loadLang('testtask')->testtask->lastRunTime;?></th>
|
||||
<td><?php if(!helper::isZeroDate($case->lastRunDate)) echo $case->lastRunDate;?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $this->app->loadLang('testtask')->testtask->lastRunResult;?></th>
|
||||
<td><?php if($case->lastRunResult) echo $lang->testcase->resultList[$case->lastRunResult];?></td>
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
<tr>
|
||||
<th><?php echo $lang->testcase->keywords;?></th>
|
||||
<td><?php echo $case->keywords;?></td>
|
||||
</tr>
|
||||
<?php if(!$isLibCase):?>
|
||||
<tr>
|
||||
<th><?php echo $lang->testcase->linkCase;?></th>
|
||||
<td>
|
||||
<?php
|
||||
if(isset($case->linkCaseTitles))
|
||||
{
|
||||
foreach($case->linkCaseTitles as $linkCaseID => $linkCaseTitle)
|
||||
{
|
||||
echo html::a($this->createLink('testcase', 'view', "caseID=$linkCaseID", '', true), "#$linkCaseID $linkCaseTitle", '', "class='iframe' data-width='80%'") . '<br />';
|
||||
}
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
</table>
|
||||
</div>
|
||||
</details>
|
||||
</div>
|
||||
<?php if(!$isLibCase):?>
|
||||
<div class="cell">
|
||||
<details class="detail" open>
|
||||
<summary class="detail-title"><?php echo $lang->testcase->legendLinkBugs;?></summary>
|
||||
<div class="detail-content">
|
||||
<table class='table table-data'>
|
||||
<?php if($case->fromBug):?>
|
||||
<tr>
|
||||
<th class='thWidth'><?php echo $lang->testcase->fromBug;?></th>
|
||||
<td><?php echo html::a($this->createLink('bug', 'view', "bugID=$case->fromBug", '', true), $case->fromBugTitle, '', "class='iframe' data-width='80%'");?></td>
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
<?php if($case->toBugs):?>
|
||||
<tr>
|
||||
<th class='thWidth' valign="top"><?php echo $lang->testcase->toBug;?></th>
|
||||
<td>
|
||||
<?php
|
||||
foreach($case->toBugs as $bugID => $bugTitle)
|
||||
{
|
||||
echo '<p style="margin-bottom:0;">' . html::a($this->createLink('bug', 'view', "bugID=$bugID", '', true), $bugTitle, '', "class='iframe' data-width='80%'") . '</p>';
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
</table>
|
||||
</div>
|
||||
</details>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
<div class="cell">
|
||||
<details class="detail" open>
|
||||
<summary class="detail-title"><?php echo $lang->testcase->legendOpenAndEdit;?></summary>
|
||||
<div class="detail-content">
|
||||
<table class='table table-data'>
|
||||
<tr>
|
||||
<th class='lifeThWidth'><?php echo $lang->testcase->openedBy;?></th>
|
||||
<td><?php echo zget($users, $case->openedBy) . $lang->at . $case->openedDate;?></td>
|
||||
</tr>
|
||||
<?php if($config->testcase->needReview or !empty($config->testcase->forceReview)):?>
|
||||
<tr>
|
||||
<th><?php echo $lang->testcase->reviewedBy;?></th>
|
||||
<td><?php $reviewedBy = explode(',', $case->reviewedBy); foreach($reviewedBy as $account) echo ' ' . zget($users, trim($account)); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->testcase->reviewedDate;?></th>
|
||||
<td><?php if($case->reviewedBy) echo $case->reviewedDate;?></td>
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
<tr>
|
||||
<th><?php echo $lang->testcase->lblLastEdited;?></th>
|
||||
<td><?php if($case->lastEditedBy) echo zget($users, $case->lastEditedBy) . $lang->at . $case->lastEditedDate;?></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</details>
|
||||
</div>
|
||||
<?php $this->printExtendFields($case, 'div', "position=right&inForm=0&inCell=1");?>
|
||||
<div class='cell'><?php include '../../common/view/action.html.php';?></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="mainActions" class='main-actions'>
|
||||
<?php common::printPreAndNext($preAndNext, $this->createLink('testcase', 'view', "caseID=%s&version=&from=$from&taskID=$taskID"));?>
|
||||
<div class="btn-toolbar">
|
||||
<?php common::printBack($browseLink);?>
|
||||
<?php if(!$case->deleted):?>
|
||||
<?php if(!isonlybody()) echo "<div class='divider'></div>";?>
|
||||
<?php
|
||||
if(!$isLibCase)
|
||||
{
|
||||
if(!isonlybody()) echo "<div class='divider'></div>";
|
||||
common::printIcon('testtask', 'runCase', "runID=$runID&caseID=$case->id&version=$case->currentVersion", $case, 'button', '', '', 'showinonlybody iframe', false, "data-width='95%'");
|
||||
common::printIcon('testtask', 'results', "runID=$runID&caseID=$case->id&version=$case->version", $case, 'button', '', '', 'showinonlybody iframe', false, "data-width='95%'");
|
||||
|
||||
if($caseFails > 0) common::printIcon('testcase', 'createBug', "product=$case->product&branch=$case->branch&extra=caseID=$case->id,version=$case->version,runID=$runID", $case, 'button', 'bug', '', 'iframe', '', "data-width='90%'");
|
||||
}
|
||||
if($config->testcase->needReview or !empty($config->testcase->forceReview)) common::printIcon('testcase', 'review', "caseID=$case->id", $case, 'button', '', '', 'iframe', '', '', $lang->testcase->reviewAB);
|
||||
?>
|
||||
|
||||
<?php echo $this->buildOperateMenu($case, 'view');?>
|
||||
|
||||
<?php
|
||||
common::printIcon('testcase', 'edit',"caseID=$case->id", $case, 'button', '', '', 'showinonlybody');
|
||||
if(!$isLibCase and $case->auto != 'unit') common::printIcon('testcase', 'create', "productID=$case->product&branch=$case->branch&moduleID=$case->module&from=testcase¶m=$case->id", $case, 'button', 'copy');
|
||||
if($isLibCase and common::hasPriv('caselib', 'createCase')) echo html::a($this->createLink('caselib', 'createCase', "libID=$case->lib&moduleID=$case->module¶m=$case->id", $case), "<i class='icon-copy'></i>", '', "class='btn' title='{$lang->testcase->copy}'");
|
||||
common::printIcon('testcase', 'delete', "caseID=$case->id", $case, 'button', 'trash', 'hiddenwin', 'showinonlybody');
|
||||
?>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
js::set('fullscreen', $lang->fullscreen);
|
||||
js::set('retrack', $lang->retrack);
|
||||
?>
|
||||
<script>
|
||||
$(function()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user