This commit is contained in:
tianshujie
2023-04-11 08:47:05 +08:00
parent bc3daacc3c
commit 1ce64ff3c9
2 changed files with 11 additions and 8 deletions
+6 -3
View File
@@ -1549,6 +1549,8 @@ class actionModel extends model
*/
public function setObjectLink($action, $deptUsers, $shadowProducts, $project = null)
{
$this->app->loadConfig('doc');
$action->objectLink = '';
$action->objectLabel = zget($this->lang->action->objectTypes, $action->objectLabel);
@@ -1678,9 +1680,10 @@ class actionModel extends model
else
{
$method = 'tablecontents';
if($docLib->type == 'product') $method = 'productspace';
if(in_array($docLib->type, array('project', 'execution'))) $method = 'projectspace';
$params = $method == 'tablecontents' ? sprintf($vars, $docLib->type, $docLib->objectID, $action->objectID, $appendLib) : "objectID={$docLib->objectID}&libID={$action->objectID}";
if(isset($this->config->doc->spaceMethod[$docLib->type])) $method = $this->config->doc->spaceMethod[$docLib->type];
if($method == 'myspace') $params = "type=mine&libID={$action->objectID}";
if($method == 'tablecontents') $params = sprintf($vars, $docLib->type, $docLib->objectID, $action->objectID, $appendLib);
if(!in_array($method, array('myspace', 'tablecontents'))) $params = "objectID={$docLib->objectID}&libID={$action->objectID}";
$action->objectLink = helper::createLink('doc', $method, $params);
}
}
+5 -5
View File
@@ -43,11 +43,11 @@ $config->doc->objectIconList['execution'] = 'icon-run';
$config->doc->objectIconList['mine'] = 'icon-contacts';
$config->doc->objectIconList['custom'] = 'icon-groups';
$config->doc->spaceMethod['mine'] = 'mySpace';
$config->doc->spaceMethod['product'] = 'productSpace';
$config->doc->spaceMethod['project'] = 'projectSpace';
$config->doc->spaceMethod['execution'] = 'projectSpace';
$config->doc->spaceMethod['custom'] = 'tableContents';
$config->doc->spaceMethod['mine'] = 'myspace';
$config->doc->spaceMethod['product'] = 'productspace';
$config->doc->spaceMethod['project'] = 'projectspace';
$config->doc->spaceMethod['execution'] = 'projectspace';
$config->doc->spaceMethod['custom'] = 'tablecontents';
$config->doc->search['module'] = 'doc';
$config->doc->search['fields']['title'] = $lang->doc->title;