* finish task #2696.

This commit is contained in:
chenfeiCF
2016-11-15 13:10:39 +08:00
parent ff435621c3
commit c72a51076f
4 changed files with 85 additions and 35 deletions
+24 -12
View File
@@ -62,18 +62,30 @@ js::set('bugBrowseType', ($browseType == 'bymodule' and $this->session->bugBrows
</div>
</div>
<div class='btn-group'>
<?php
common::printIcon('bug', 'batchCreate', "productID=$productID&branch=$branch&projectID=0&moduleID=$moduleID");
if(commonModel::isTutorialMode())
{
$wizardParams = helper::safe64Encode("productID=$productID&branch=$branch&extra=moduleID=$moduleID");
echo html::a($this->createLink('tutorial', 'wizard', "module=bug&method=create&params=$wizardParams"), "<i class='icon-plus'></i> {$lang->bug->create}",'', "class='btn btn-bug-create'");
}
else
{
common::printIcon('bug', 'create', "productID=$productID&branch=$branch&extra=moduleID=$moduleID", 'btn', 'button', 'plus', '', 'btn-bug-create');
}
?>
<div class='btn-group'>
<button type='button' class='btn btn-default dropdown-toggle' data-toggle='dropdown'>
<i class='icon icon-plus'></i> <?php echo $lang->bug->common;?>
<span class='caret'></span>
</button>
<ul class='dropdown-menu' id='createBugActionMenu'>
<?php
if(commonModel::isTutorialMode())
{
$wizardParams = helper::safe64Encode("productID=$productID&branch=$branch&extra=moduleID=$moduleID");
echo html::a($this->createLink('tutorial', 'wizard', "module=bug&method=create&params=$wizardParams"), $lang->bug->create);
}
else
{
$misc = common::hasPriv('bug', 'create') ? '' : "class=disabled";
$link = common::hasPriv('bug', 'create') ? $this->createLink('bug', 'create', "productID=$productID&branch=$branch&extra=moduleID=$moduleID") : '#';
echo "<li>" . html::a($link, $lang->bug->create, '', $misc) . "</li>";
}
$misc = common::hasPriv('bug', 'batchCreate') ? '' : "class=disabled";
$link = common::hasPriv('bug', 'batchCreate') ? $this->createLink('bug', 'batchCreate', "productID=$productID&branch=$branch&projectID=0&moduleID=$moduleID") : '#';
echo "<li>" . html::a($link, $lang->bug->batchCreate, '', $misc) . "</li>";
?>
</ul>
</div>
</div>
</div>
<div id='querybox' class='<?php if($browseType =='bysearch') echo 'show';?>'></div>
+24 -12
View File
@@ -56,18 +56,30 @@
<?php common::printIcon('story', 'report', "productID=$productID&browseType=$browseType&moduleID=$moduleID", '', 'button', 'bar-chart'); ?>
</div>
<div class='btn-group'>
<?php
common::printIcon('story', 'batchCreate', "productID=$productID&branch=$branch&moduleID=$moduleID", '', 'button', 'plus-sign');
if(commonModel::isTutorialMode())
{
$wizardParams = helper::safe64Encode("productID=$productID&branch=$branch&moduleID=$moduleID");
echo html::a($this->createLink('tutorial', 'wizard', "module=story&method=create&params=$wizardParams"), "<i class='icon-plus'></i> {$lang->story->create}",'', "class='btn create-story-btn'");
}
else
{
common::printIcon('story', 'create', "productID=$productID&branch=$branch&moduleID=$moduleID", 'btn', 'button', 'plus', '', 'create-story-btn');
}
?>
<div class='btn-group'>
<button type='button' class='btn btn-default dropdown-toggle' data-toggle='dropdown'>
<i class='icon icon-plus'></i> <?php echo $lang->story->common;?>
<span class='caret'></span>
</button>
<ul class='dropdown-menu' id='createStoryActionMenu'>
<?php
if(commonModel::isTutorialMode())
{
$wizardParams = helper::safe64Encode("productID=$productID&branch=$branch&moduleID=$moduleID");
echo "<li>" . html::a($this->createLink('tutorial', 'wizard', "module=story&method=create&params=$wizardParams"), $lang->story->create) . "</li>";
}
else
{
$misc = common::hasPriv('story', 'create') ? '' : "class=disabled";
$link = common::hasPriv('story', 'create') ? $this->createLink('story', 'create', "productID=$productID&branch=$branch&moduleID=$moduleID") : '#';
echo "<li>" . html::a($link, $lang->story->create, '', $misc) . "</li>";
}
$misc = common::hasPriv('story', 'batchCreate') ? '' : "class=disabled";
$link = common::hasPriv('story', 'batchCreate') ? $this->createLink('story', 'batchCreate', "productID=$productID&branch=$branch&moduleID=$moduleID") : '#';
echo "<li>" . html::a($link, $lang->story->batchCreate, '', $misc) . "</li>";
?>
</ul>
</div>
</div>
</div>
<div id='querybox' class='<?php if($browseType =='bysearch') echo 'show';?>'></div>
+17 -4
View File
@@ -121,10 +121,23 @@
</div>
</div>
<div class='btn-group'>
<?php
common::printIcon('task', 'batchCreate', "projectID=$projectID");
common::printIcon('task', 'create', "project=$projectID" . (isset($moduleID) ? "&storyID=&moduleID=$moduleID" : ''), '', 'button', 'sitemap');
?>
<div class='btn-group'>
<button type='button' class='btn btn-default dropdown-toggle' data-toggle='dropdown'>
<i class='icon icon-plus'></i> <?php echo $lang->task->common;?>
<span class='caret'></span>
</button>
<ul class='dropdown-menu' id='createTaskActionMenu'>
<?php
$misc = common::hasPriv('task', 'create') ? '' : "class=disabled";
$link = common::hasPriv('task', 'create') ? $this->createLink('task', 'create', "project=$projectID" . (isset($moduleID) ? "&storyID=&moduleID=$moduleID" : '')) : '#';
echo "<li>" . html::a($link, $lang->task->create, '', $misc) . "</li>";
$misc = common::hasPriv('task', 'batchCreate') ? '' : "class=disabled";
$link = common::hasPriv('task', 'batchCreate') ? $this->createLink('task', 'batchCreate', "project=$projectID" . (isset($moduleID) ? "&storyID=&moduleID=$moduleID" : '')) : '#';
echo "<li>" . html::a($link, $lang->task->batchCreate, '', $misc) . "</li>";
?>
</ul>
</div>
</div>
</div>
<div id='querybox' class='<?php if($browseType =='bysearch') echo 'show';?>'></div>
+20 -7
View File
@@ -76,13 +76,26 @@
?>
</ul>
</div>
<?php
common::printIcon('testcase', 'import', "productID=$productID&branch=$branch", '', 'button', '', '', 'export cboxElement iframe');
$initModule = isset($moduleID) ? (int)$moduleID : 0;
common::printIcon('testcase', 'batchCreate', "productID=$productID&branch=$branch&moduleID=$initModule");
common::printIcon('testcase', 'create', "productID=$productID&branch=$branch&moduleID=$initModule");
?>
<?php common::printIcon('testcase', 'import', "productID=$productID&branch=$branch", '', 'button', '', '', 'export cboxElement iframe');?>
</div>
<div class='btn-group'>
<div class='btn-group'>
<button type='button' class='btn btn-default dropdown-toggle' data-toggle='dropdown'>
<i class='icon icon-plus'></i> <?php echo $lang->testcase->common;?>
<span class='caret'></span>
</button>
<ul class='dropdown-menu' id='createCaseActionMenu'>
<?php
$initModule = isset($moduleID) ? (int)$moduleID : 0;
$misc = common::hasPriv('testcase', 'create') ? '' : "class=disabled";
$link = common::hasPriv('testcase', 'create') ? $this->createLink('testcase', 'create', "productID=$productID&branch=$branch&moduleID=$initModule") : '#';
echo "<li>" . html::a($link, $lang->testcase->create, '', $misc) . "</li>";
$misc = common::hasPriv('testcase', 'batchCreate') ? '' : "class=disabled";
$link = common::hasPriv('testcase', 'batchCreate') ? $this->createLink('testcase', 'batchCreate', "productID=$productID&branch=$branch&moduleID=$initModule") : '#';
echo "<li>" . html::a($link, $lang->testcase->batchCreate, '', $misc) . "</li>";
?>
</ul>
</div>
</div>
</div>
<div id='querybox' class='<?php if($browseType =='bysearch') echo 'show';?>'></div>