* code for task #2522,2579.

This commit is contained in:
wangyidong
2016-04-20 14:51:05 +08:00
parent 164f7630d3
commit d89d674cdd
29 changed files with 385 additions and 173 deletions
+24 -2
View File
@@ -3,14 +3,36 @@
<?php echo "<span class='prefix'>" . html::icon($lang->icons['usecase']) . '</span><strong>' . $task->name . '</strong>';?>
</div>
<div class='nav'>
<li>
<span>
<?php
echo isset($moduleID) ? $moduleName : $this->lang->tree->all;
if(!empty($moduleID))
{
$removeLink = $browseType == 'bymodule' ? inlink('cases', "taskID=$taskID&browseType=$browseType&param=0&orderBy=$orderBy&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}") : 'javascript:removeCookieByKey("caseModule")';
echo '&nbsp;' . html::a($removeLink, "<i class='icon icon-remove'></i>") . '&nbsp;';
}
echo " <i class='icon-angle-right'></i>&nbsp; ";
?>
</span>
</li>
<?php
$hasCasesPriv = common::hasPriv('testtask', 'cases');
$hasGroupPriv = common::hasPriv('testtask', 'groupcase');
?>
<?php foreach($app->customMenu['featurebar'] as $type => $featurebar):?>
<?php if($featurebar['status'] == 'hide') continue;?>
<?php
if(common::hasPriv('testtask', 'cases') and ($type == 'all' or $type == 'assignedtome'))
if($hasCasesPriv and strpos($type, 'QUERY') === 0)
{
$queryID = (int)substr($type, 5);
echo "<li id='{$type}Tab'>" . html::a($this->inlink('cases', "taskID=$taskID&browseType=bySearch&param=$queryID"), $featurebar['link']) . "</li>";
}
elseif($hasCasesPriv and ($type == 'all' or $type == 'assignedtome'))
{
echo "<li id='{$type}Tab'>" . html::a($this->inlink('cases', "taskID=$taskID&browseType=$type&param=0"), $featurebar['link']) . "</li>";
}
elseif(common::hasPriv('testtask', 'cases') and $type == 'group')
elseif($hasGroupPriv and $type == 'group')
{
echo "<li id='groupTab' class='dropdown'>";
$groupBy = isset($groupBy) ? $groupBy : '';
+14
View File
@@ -14,6 +14,7 @@
<?php include '../../common/view/datatable.fix.html.php';?>
<?php include './caseheader.html.php';?>
<?php js::set('confirmUnlink', $lang->testtask->confirmUnlinkCase)?>
<?php js::set('taskCaseBrowseType', ($browseType == 'bymodule' and $this->session->taskCaseBrowseType == 'bysearch') ? 'all' : $this->session->taskCaseBrowseType);?>
<script language="Javascript">
var browseType = '<?php echo $browseType;?>';
var moduleID = '<?php echo $moduleID;?>';
@@ -79,4 +80,17 @@ include $useDatatable ? dirname(__FILE__) . '/datatabledata.html.php' : dirname(
</table>
</form>
</div>
<script>
$('#module' + moduleID).addClass('active');
$('#' + taskCaseBrowseType + 'Tab').addClass('active');
<?php if($browseType == 'bysearch'):?>
$shortcut = $('#QUERY<?php echo (int)$param;?>Tab');
if($shortcut.size() > 0)
{
$shortcut.addClass('active');
$('#bysearchTab').removeClass('active');
$('#querybox').removeClass('show');
}
<?php endif;?>
</script>
<?php include '../../common/view/footer.html.php';?>