* finish task #2683.

This commit is contained in:
chenfeiCF
2016-11-16 13:19:57 +08:00
parent 721e5749de
commit e8bcd89181
3 changed files with 21 additions and 4 deletions
+17 -1
View File
@@ -45,7 +45,23 @@
common::printIcon('story', 'review', "storyID=$story->id", $story);
common::printIcon('story', 'close', "storyID=$story->id", $story, 'button', '', '', 'iframe text-danger', true);
common::printIcon('story', 'activate', "storyID=$story->id", $story, 'button', '', '', 'iframe text-success', true);
common::printIcon('story', 'createCase', "productID=$story->product&branch=$story->branch&moduleID=0&from=&param=0&storyID=$story->id", '', 'button', 'sitemap');
$this->app->loadLang('testcase');
echo "<div class='btn-group'>";
echo "<button type='button' class='btn btn-default dropdown-toggle' data-toggle='dropdown'>";
echo "<i class='icon icon-plus'></i>" . $lang->testcase->common;
echo "<span class='caret'></span>";
echo "</button>";
echo "<ul class='dropdown-menu' id='createCaseActionMenu'>";
$misc = common::hasPriv('testcase', 'create') ? " " : "class='disabled'";
$link = common::hasPriv('testcase', 'create') ? $this->createLink('testcase', 'create', "productID=$story->product&branch=$story->branch&moduleID=0&from=&param=0&storyID=$story->id") : '#';
echo "<li>" . html::a($link, $lang->testcase->create, '', $misc) . "</li>";
$misc = common::hasPriv('testcase', 'batchCreate') ? "data-toggle='modal' data-type='iframe' data-width='95%'" : "class='disabled'";
$link = common::hasPriv('testcase', 'batchCreate') ? $this->createLink('testcase', 'batchCreate', "productID=$story->product&branch=$story->branch&moduleID=0&storyID=$story->id", '', true) : '#';
echo "<li>" . html::a($link, $lang->testcase->batchCreate, '', $misc) . "</li>";
echo "</ul>";
echo "</div>";
if($from == 'project') common::printIcon('task', 'create', "project=$param&storyID=$story->id&moduleID=$story->module", '', 'button', 'smile');
echo '</div>';
+1
View File
@@ -344,6 +344,7 @@ class testcase extends control
{
$caseID = $this->testcase->batchCreate($productID, $branch, $storyID);
if(dao::isError()) die(js::error(dao::getError()));
if(isonlybody()) die(js::closeModal('parent.parent', 'this'));
die(js::locate($this->createLink('testcase', 'browse', "productID=$productID&branch=$branch&browseType=byModule&param=$moduleID"), 'parent'));
}
if(empty($this->products)) $this->locate($this->createLink('product', 'create'));
+3 -3
View File
@@ -43,10 +43,10 @@ foreach(explode(',', $showFields) as $field)
<thead>
<tr>
<th class='w-50px'><?php echo $lang->idAB;?></th>
<th class='w-200px<?php echo zget($visibleFields, 'module', ' hidden')?>'><?php echo $lang->testcase->module;?></th>
<th class='w-200px<?php echo zget($visibleFields, 'story', ' hidden')?>'> <?php echo $lang->testcase->story;?></th>
<th class='w-180px<?php echo zget($visibleFields, 'module', ' hidden')?>'><?php echo $lang->testcase->module;?></th>
<th class='w-180px<?php echo zget($visibleFields, 'story', ' hidden')?>'> <?php echo $lang->testcase->story;?></th>
<th><?php echo $lang->testcase->title;?> <span class='required'></span></th>
<th class='w-180px'><?php echo $lang->testcase->type;?> <span class='required'></span></th>
<th class='w-100px'><?php echo $lang->testcase->type;?> <span class='required'></span></th>
<th class='w-80px<?php echo zget($visibleFields, 'pri', ' hidden')?>'> <?php echo $lang->testcase->pri;?></th>
<th class='w-150px<?php echo zget($visibleFields, 'precondition', ' hidden')?>'><?php echo $lang->testcase->precondition;?></th>
<th class='w-100px<?php echo zget($visibleFields, 'keywords', ' hidden')?>'> <?php echo $lang->testcase->keywords;?></th>