* Resolve issue #775.

This commit is contained in:
tianshujie
2023-04-13 16:37:20 +08:00
parent e279e91070
commit d2782dc46a
6 changed files with 4 additions and 10 deletions
-1
View File
@@ -605,7 +605,6 @@ class commonModel extends model
if(strpos('|bug|execution|kanbanspace|', "|$objectType|") !== false) $needPrintDivider = true;
$hasPriv = common::hasPriv($module, $createMethod);
if($hasPriv and $objectType == 'doc' and !common::hasPriv('doc', 'tableContents')) $hasPriv = false;
if(!$hasPriv and $objectType == 'doc' and common::hasPriv('api', 'create')) $hasPriv = true;
if(!$hasPriv) continue;
+1 -1
View File
@@ -1282,7 +1282,7 @@ class doc extends control
$queryID = $browseType == 'bySearch' ? (int)$param : 0;
$params = "objectID=$objectID&libID=$libID&moduleID=0&browseType=bySearch&orderBy=$orderBy&param=myQueryID";
if($this->app->rawMethod == 'tablecontents') $params = "type=$type&" . $params;
$actionURL = $this->createLink('doc', $this->app->rawMethod, $params);
$actionURL = $this->createLink($this->app->rawModule, $this->app->rawMethod, $params);
if($libType == 'api')
{
$this->loadModel('api')->buildSearchForm($lib, $queryID, $actionURL, $libs, $type);
-1
View File
@@ -42,7 +42,6 @@ body {margin-bottom: 25px;}
</div>
<?php else:?>
<?php $vars = "objectID=$objectID&$libID=$libID&moduleID=$moduleID&browseType=$browseType&orderBy=%s&param=$param&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}&pageID={$pager->pageID}";?>
<?php if($app->rawMethod == 'tablecontents') $vars = "type=$type&" . $vars;?>
<div>
<form class='main-table' method='post' id='docListForm'>
<table class="table table-files has-sort-head">
+1 -1
View File
@@ -22,7 +22,7 @@
<?php if($libType != 'api'):?>
<?php foreach($lang->doc->featureBar['tableContents'] as $barType => $barName):?>
<?php $active = $barType == $browseType ? 'btn-active-text' : '';?>
<?php $linkParams = $app->rawMethod == 'tablecontents' ? "type=$type&objectID=$objectID&libID=$libID&moduleID=$moduleID&browseType=$barType": "objectID=$objectID&libID=$libID&moduleID=$moduleID&browseType=$barType";?>
<?php $linkParams = "objectID=$objectID&libID=$libID&moduleID=$moduleID&browseType=$barType";?>
<?php echo html::a($this->createLink('doc', $app->rawMethod, $linkParams), "<span class='text'>{$barName}</span>" . ($active ? " <span class='label label-light label-badge'>{$pager->recTotal}</span>" : ''), '', "class='btn btn-link $active' id='{$barType}Tab'");?>
<?php endforeach;?>
<?php endif;?>
+2 -2
View File
@@ -4181,9 +4181,9 @@ class execution extends control
* @access public
* @return void
*/
public function doc($executionID)
public function doc($executionID, $libID = 0, $moduleID = 0, $browseType = 'all', $orderBy = 'status,id_desc', $param = 0, $recTotal = 0, $recPerPage = 20, $pageID = 1)
{
echo $this->fetch('doc', 'tableContents', "type=execution&objectID=$executionID");
echo $this->fetch('doc', 'tableContents', "type=execution&objectID=$executionID&libID=$libID&moduleID=$moduleID&browseType=$browseType&orderBy=$orderBy&param=$param&recTotal=$recTotal&recTotal=$recTotal&recPerPage=$recPerPage&pageID=$pageID");
}
/**
-4
View File
@@ -2212,10 +2212,6 @@ class executionModel extends model
{
$link = helper::createLink('doc', $method, "type=execution&objectID=%s&from=execution");
}
elseif($module == 'api')
{
$link = helper::createLink('doc', 'tableContents', "type=execution&objectID=%s&from=execution");
}
elseif(in_array($module, array('issue', 'risk', 'opportunity', 'pssp', 'auditplan', 'nc', 'meeting')))
{
$link = helper::createLink($module, 'browse', "executionID=%s&from=execution");