* [task#124815,doing,1h] add field for create lib.

This commit is contained in:
sunguangming
2024-08-06 11:14:46 +08:00
committed by 王怡栋
parent 47ecb5395b
commit febf901e8c
3 changed files with 7 additions and 3 deletions
+2
View File
@@ -6,6 +6,8 @@ global $app, $config;
$config->doc->form = new stdclass();
$config->doc->form->createlib['name'] = array('type' => 'string', 'required' => true, 'default' => '', 'filter' => 'trim');
$config->doc->form->createlib['spaceName'] = array('type' => 'string', 'required' => false, 'default' => '', 'filter' => 'trim');
$config->doc->form->createlib['parent'] = array('type' => 'int', 'required' => false, 'default' => 0);
$config->doc->form->createlib['baseUrl'] = array('type' => 'string', 'required' => false, 'default' => '');
$config->doc->form->createlib['acl'] = array('type' => 'string', 'required' => false, 'default' => '');
$config->doc->form->createlib['type'] = array('type' => 'string', 'required' => false, 'default' => '');
+5 -1
View File
@@ -138,6 +138,8 @@ class doc extends control
if(dao::isError()) return $this->send(array('result' => 'fail', 'message' => dao::getError()));
$libID = $this->doc->createLib($lib, (string)$this->post->type, (string)$this->post->libType);
if(dao::isError()) return $this->send(array('result' => 'fail', 'message' => dao::getError()));
return $this->docZen->responseAfterCreateLib($type, $objectID, $libID);
}
@@ -147,7 +149,7 @@ class doc extends control
if($type == 'product') $objects = $this->product->getPairs();
if($type == 'project')
{
$objects = $this->project->getPairsByProgram(0, 'all', false, 'order_asc');
$objects = $this->project->getPairsByProgram(0, 'all', false, 'order_asc');
if($this->app->tab == 'doc')
{
$this->view->executionPairs = $this->execution->getPairs($objectID, 'all', 'multiple,leaf,noprefix');
@@ -162,6 +164,8 @@ class doc extends control
if($execution->type == 'stage') $this->lang->doc->execution = str_replace($this->lang->executionCommon, $this->lang->project->stage, $this->lang->doc->execution);
}
if($type == 'custom') $this->view->spaces = $this->doc->getTeamSpaces();
$this->docZen->setAclForCreateLib($type);
$this->view->groups = $this->loadModel('group')->getPairs();
-2
View File
@@ -292,8 +292,6 @@ class docZen extends doc
*/
protected function responseAfterCreateLib(string $type = '', int $objectID = 0, int $libID = 0): bool|int
{
if(dao::isError()) return $this->send(array('result' => 'fail', 'message' => dao::getError()));
if($type == 'project' && $this->post->project) $objectID = $this->post->project;
if($type == 'product' && $this->post->product) $objectID = $this->post->product;
if($type == 'execution' && $this->post->execution) $objectID = $this->post->execution;