* [refac bug #53940] show warning when create document in no libray space.
This commit is contained in:
@@ -380,7 +380,9 @@ class doc extends control
|
||||
|
||||
$this->docZen->assignVarsForCreate($objectType, $objectID, $libID, $moduleID, $docType);
|
||||
|
||||
$lib = $this->view->lib;
|
||||
$lib = $this->view->lib;
|
||||
if(empty($lib)) return $this->send(array('result' => 'fail', 'message' => $this->lang->doc->errorEmptySpaceLib));
|
||||
|
||||
$objectID = $this->view->objectID;
|
||||
$libData = $this->doc->setMenuByType($lib->type, (int)$objectID, (int)$lib->id, (int)$appendLib);
|
||||
if(is_string($libData)) return $this->locate($libData);
|
||||
|
||||
@@ -339,6 +339,7 @@ $lang->doc->confirmOtherEditing = "This document is currently editing. Continui
|
||||
$lang->doc->errorEditSystemDoc = "System Dokumentenbibliothek darf nicht geändert werden.";
|
||||
$lang->doc->errorEmptyProduct = "Kein {$lang->productCommon}. Kann nicht erstellt werden.";
|
||||
$lang->doc->errorEmptyProject = "Kein {$lang->executionCommon}. Kann nicht erstellt werden.";
|
||||
$lang->doc->errorEmptySpaceLib = "There is no document library in this space. It cannot be created. Please create a document library first";
|
||||
$lang->doc->errorMainSysLib = "Diese Bibliothek kann nicht gelöscht werden.";
|
||||
$lang->doc->accessDenied = "Zugriff verweigert!";
|
||||
$lang->doc->versionNotFount = 'Existiert nicht in diesem Build.';
|
||||
|
||||
@@ -339,6 +339,7 @@ $lang->doc->confirmOtherEditing = "This document is currently editing. Continui
|
||||
$lang->doc->errorEditSystemDoc = "You don't have to change system document library.";
|
||||
$lang->doc->errorEmptyProduct = "No {$lang->productCommon}. It cannot be created.";
|
||||
$lang->doc->errorEmptyProject = "No {$lang->executionCommon}. It cannot be created.";
|
||||
$lang->doc->errorEmptySpaceLib = "There is no document library in this space. It cannot be created. Please create a document library first";
|
||||
$lang->doc->errorMainSysLib = "This library cannot be deleted.";
|
||||
$lang->doc->accessDenied = "Access is denied!";
|
||||
$lang->doc->versionNotFount = 'It does not exist in this build.';
|
||||
|
||||
@@ -339,6 +339,7 @@ $lang->doc->confirmOtherEditing = "This document is currently editing. Continui
|
||||
$lang->doc->errorEditSystemDoc = "Vous n'avez pas besoin de changer de système de Bibliothèque.";
|
||||
$lang->doc->errorEmptyProduct = "Aucun {$lang->productCommon}. Il ne peut pas être créé.";
|
||||
$lang->doc->errorEmptyProject = "Aucun {$lang->executionCommon}. Il ne peut pas être créé.";
|
||||
$lang->doc->errorEmptySpaceLib = "There is no document library in this space. It cannot be created. Please create a document library first";
|
||||
$lang->doc->errorMainSysLib = "Cette Bibliothèque ne peut pas être supprimée.";
|
||||
$lang->doc->accessDenied = "Access is denied !";
|
||||
$lang->doc->versionNotFount = "N'existe pas dans ce build.";
|
||||
|
||||
@@ -339,6 +339,7 @@ $lang->doc->confirmOtherEditing = "该文档正在编辑中,如果继续编
|
||||
$lang->doc->errorEditSystemDoc = "系统文档库无需修改。";
|
||||
$lang->doc->errorEmptyProduct = "没有{$lang->productCommon},无法创建文档";
|
||||
$lang->doc->errorEmptyProject = "没有{$lang->executionCommon},无法创建文档";
|
||||
$lang->doc->errorEmptySpaceLib = "该空间下没有文档库,无法创建文档,请先创建文档库";
|
||||
$lang->doc->errorMainSysLib = "该系统文档库不能删除!";
|
||||
$lang->doc->accessDenied = "您没有权限访问!";
|
||||
$lang->doc->versionNotFount = '该版本文档不存在';
|
||||
|
||||
+3
-2
@@ -389,6 +389,7 @@ class docZen extends doc
|
||||
*
|
||||
* @param string $space
|
||||
* @param int $libID
|
||||
* @param string $locateLink
|
||||
* @access protected
|
||||
* @return bool|int
|
||||
*/
|
||||
@@ -520,7 +521,7 @@ class docZen extends doc
|
||||
if(!$libID && !empty($libPairs)) $libID = key($libPairs);
|
||||
if(empty($lib) && $libID) $lib = $this->doc->getLibByID($libID);
|
||||
|
||||
$this->setObjectsForCreate($lib->type, $lib, $unclosed, $objectID);
|
||||
$this->setObjectsForCreate(empty($lib->type) ? '' : $lib->type, $lib, $unclosed, $objectID);
|
||||
|
||||
$this->view->objectType = $objectType;
|
||||
$this->view->spaceType = $objectType;
|
||||
@@ -529,11 +530,11 @@ class docZen extends doc
|
||||
$this->view->objectID = $objectID;
|
||||
$this->view->libs = $libPairs;
|
||||
$this->view->libName = zget($lib, 'name', '');
|
||||
$this->view->optionMenu = $this->loadModel('tree')->getOptionMenu($libID, 'doc', $startModuleID = 0);
|
||||
$this->view->moduleID = $moduleID;
|
||||
$this->view->docType = $docType;
|
||||
$this->view->groups = $this->loadModel('group')->getPairs();
|
||||
$this->view->users = $this->user->getPairs('nocode|noclosed|nodeleted');
|
||||
$this->view->optionMenu = empty($libID) ? array() : $this->loadModel('tree')->getOptionMenu($libID, 'doc', $startModuleID = 0);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user