diff --git a/module/doc/control.php b/module/doc/control.php index 0b68457f6f..63e5c7b261 100755 --- a/module/doc/control.php +++ b/module/doc/control.php @@ -289,6 +289,7 @@ class doc extends control public function createLib(string $type = '', int $objectID = 0, int $libID = 0) { $this->app->loadLang('api'); + $this->doc->setMenuByType($type, (int)$objectID, (int)$libID); if(!empty($_POST)) { @@ -319,6 +320,7 @@ class doc extends control $objects = $this->execution->getPairs(0, 'all', 'multiple,leaf,noprefix,withobject'); $execution = $this->execution->getByID($objectID); if($execution->type == 'stage') $this->lang->doc->execution = str_replace($this->lang->executionCommon, $this->lang->project->stage, $this->lang->doc->execution); + $this->view->execution = $this->doc->fetchByID($objectID, 'execution'); } if($type == 'custom' || $type == 'mine' || $type == 'doctemplate') diff --git a/module/doc/ui/app.html.php b/module/doc/ui/app.html.php index 432bf06f47..0c3744883f 100644 --- a/module/doc/ui/app.html.php +++ b/module/doc/ui/app.html.php @@ -26,7 +26,7 @@ if($type === 'project') * Define the privs of doc app. */ $hasCustomSpace = $type == 'mine' || $type == 'custom'; -$projectTemplate = $type === 'project' && !empty($project->isTpl); +$projectTemplate = ($type === 'project' && !empty($project->isTpl)) || ($type == 'execution' && !empty($execution->isTpl)); $privs = array(); $privs['create'] = hasPriv('doc', 'create') && !$projectTemplate; $privs['edit'] = hasPriv('doc', 'edit') && !$projectTemplate;