Merge branch 'tsj_issue'
This commit is contained in:
@@ -61,7 +61,7 @@ $lang->api->defaultVersion = "Current Version";
|
||||
$lang->api->zentaoAPI = "Zentao API v1";
|
||||
$lang->api->search = "Search";
|
||||
$lang->api->allLibs = "AllLibs";
|
||||
$lang->api->noLinked = "No Linked";
|
||||
$lang->api->noLinked = "No Linked {$lang->productCommon} and {$lang->projectCommon}";
|
||||
$lang->api->addCatalog = 'Add Catalog';
|
||||
$lang->api->editCatalog = 'Edit Catalog';
|
||||
$lang->api->deleteCatalog = 'Delete Catalog';
|
||||
@@ -181,7 +181,7 @@ $lang->api->requestTypeOptions['multipart/form-data'] = 'multipart
|
||||
$lang->api->libTypeList = array();
|
||||
$lang->api->libTypeList['product'] = $lang->productCommon . ' Api Library';
|
||||
$lang->api->libTypeList['project'] = $lang->projectCommon . ' Api Library';
|
||||
$lang->api->libTypeList['nolink'] = 'No Linked Api Library';
|
||||
$lang->api->libTypeList['nolink'] = 'Independent Api Library';
|
||||
|
||||
$lang->api->statusOptions = array(
|
||||
'done' => 'Done',
|
||||
|
||||
@@ -61,7 +61,7 @@ $lang->api->defaultVersion = "Current Version";
|
||||
$lang->api->zentaoAPI = "Zentao API v1";
|
||||
$lang->api->search = "Search";
|
||||
$lang->api->allLibs = "AllLibs";
|
||||
$lang->api->noLinked = "No Linked";
|
||||
$lang->api->noLinked = "No Linked {$lang->productCommon} and {$lang->projectCommon}";
|
||||
$lang->api->addCatalog = 'Add Catalog';
|
||||
$lang->api->editCatalog = 'Edit Catalog';
|
||||
$lang->api->deleteCatalog = 'Delete Catalog';
|
||||
@@ -181,7 +181,7 @@ $lang->api->requestTypeOptions['multipart/form-data'] = 'multipart
|
||||
$lang->api->libTypeList = array();
|
||||
$lang->api->libTypeList['product'] = $lang->productCommon . ' Api Library';
|
||||
$lang->api->libTypeList['project'] = $lang->projectCommon . ' Api Library';
|
||||
$lang->api->libTypeList['nolink'] = 'No Linked Api Library';
|
||||
$lang->api->libTypeList['nolink'] = 'Independent Api Library';
|
||||
|
||||
$lang->api->statusOptions = array(
|
||||
'done' => 'Done',
|
||||
|
||||
@@ -61,7 +61,7 @@ $lang->api->defaultVersion = "Current Version";
|
||||
$lang->api->zentaoAPI = "Zentao API v1";
|
||||
$lang->api->search = "Search";
|
||||
$lang->api->allLibs = "AllLibs";
|
||||
$lang->api->noLinked = "No Linked";
|
||||
$lang->api->noLinked = "No Linked {$lang->productCommon} and {$lang->projectCommon}";
|
||||
$lang->api->addCatalog = 'Add Catalog';
|
||||
$lang->api->editCatalog = 'Edit Catalog';
|
||||
$lang->api->deleteCatalog = 'Delete Catalog';
|
||||
@@ -181,7 +181,7 @@ $lang->api->requestTypeOptions['multipart/form-data'] = 'multipart
|
||||
$lang->api->libTypeList = array();
|
||||
$lang->api->libTypeList['product'] = $lang->productCommon . ' Api Library';
|
||||
$lang->api->libTypeList['project'] = $lang->projectCommon . ' Api Library';
|
||||
$lang->api->libTypeList['nolink'] = 'No Linked Api Library';
|
||||
$lang->api->libTypeList['nolink'] = 'Independent Api Library';
|
||||
|
||||
$lang->api->statusOptions = array(
|
||||
'done' => 'Done',
|
||||
|
||||
@@ -61,7 +61,7 @@ $lang->api->defaultVersion = "当前版本";
|
||||
$lang->api->zentaoAPI = "禅道API文档v1";
|
||||
$lang->api->search = "搜索";
|
||||
$lang->api->allLibs = "全部库";
|
||||
$lang->api->noLinked = "无关联";
|
||||
$lang->api->noLinked = "未关联{$lang->productCommon}和{$lang->projectCommon}";
|
||||
$lang->api->addCatalog = '添加目录';
|
||||
$lang->api->editCatalog = '编辑目录';
|
||||
$lang->api->deleteCatalog = '删除目录';
|
||||
@@ -181,7 +181,7 @@ $lang->api->requestTypeOptions['multipart/form-data'] = 'multipart
|
||||
$lang->api->libTypeList = array();
|
||||
$lang->api->libTypeList['product'] = $lang->productCommon . '接口库';
|
||||
$lang->api->libTypeList['project'] = $lang->projectCommon . '接口库';
|
||||
$lang->api->libTypeList['nolink'] = '无关联接口库';
|
||||
$lang->api->libTypeList['nolink'] = '独立接口库';
|
||||
|
||||
$lang->api->statusOptions = array(
|
||||
'done' => '开发完成',
|
||||
|
||||
@@ -289,7 +289,7 @@ $lang->doc->project = $lang->projectCommon;
|
||||
$lang->doc->api = 'API';
|
||||
$lang->doc->execution = $lang->execution->common;
|
||||
$lang->doc->custom = 'Custom';
|
||||
$lang->doc->wiki = 'WIKI';
|
||||
$lang->doc->wiki = 'Wiki';
|
||||
$lang->doc->apiDoc = 'API Docuemnt';
|
||||
$lang->doc->apiStruct = 'Data Structure';
|
||||
$lang->doc->mySpace = 'My Space';
|
||||
|
||||
@@ -289,7 +289,7 @@ $lang->doc->project = $lang->projectCommon;
|
||||
$lang->doc->api = 'API';
|
||||
$lang->doc->execution = $lang->execution->common;
|
||||
$lang->doc->custom = 'Custom';
|
||||
$lang->doc->wiki = 'WIKI';
|
||||
$lang->doc->wiki = 'Wiki';
|
||||
$lang->doc->apiDoc = 'API Docuemnt';
|
||||
$lang->doc->apiStruct = 'Data Structure';
|
||||
$lang->doc->mySpace = 'My Space';
|
||||
|
||||
@@ -289,7 +289,7 @@ $lang->doc->project = $lang->projectCommon;
|
||||
$lang->doc->api = 'API';
|
||||
$lang->doc->execution = $lang->execution->common;
|
||||
$lang->doc->custom = 'Custom';
|
||||
$lang->doc->wiki = 'WIKI';
|
||||
$lang->doc->wiki = 'Wiki';
|
||||
$lang->doc->apiDoc = 'API Docuemnt';
|
||||
$lang->doc->apiStruct = 'Data Structure';
|
||||
$lang->doc->mySpace = 'My Space';
|
||||
|
||||
@@ -289,7 +289,7 @@ $lang->doc->project = $lang->projectCommon . '库';
|
||||
$lang->doc->api = '接口库';
|
||||
$lang->doc->execution = "{$lang->execution->common}库";
|
||||
$lang->doc->custom = '自定义库';
|
||||
$lang->doc->wiki = 'WIKI';
|
||||
$lang->doc->wiki = 'Wiki';
|
||||
$lang->doc->apiDoc = '文档';
|
||||
$lang->doc->apiStruct = '数据结构';
|
||||
$lang->doc->mySpace = '我的空间';
|
||||
|
||||
@@ -34,6 +34,8 @@ $config->doc->markdown->create = array('id' => 'contentMarkdown', 'tools' => 'wi
|
||||
$config->doc->iconList['html'] = 'rich-text';
|
||||
$config->doc->iconList['markdown'] = 'markdown';
|
||||
$config->doc->iconList['url'] = 'text-link';
|
||||
$config->doc->iconList['text'] = 'wiki-file';
|
||||
$config->doc->iconList['template'] = 'wiki-file';
|
||||
$config->doc->iconList['word'] = 'word';
|
||||
$config->doc->iconList['ppt'] = 'ppt';
|
||||
$config->doc->iconList['excel'] = 'excel';
|
||||
@@ -45,6 +47,9 @@ $config->doc->objectIconList['mine'] = 'icon-contacts';
|
||||
$config->doc->objectIconList['custom'] = 'icon-groups';
|
||||
|
||||
$config->doc->spaceMethod['mine'] = 'myspace';
|
||||
$config->doc->spaceMethod['view'] = 'myspace';
|
||||
$config->doc->spaceMethod['collect'] = 'myspace';
|
||||
$config->doc->spaceMethod['createdby'] = 'myspace';
|
||||
$config->doc->spaceMethod['product'] = 'productspace';
|
||||
$config->doc->spaceMethod['project'] = 'projectspace';
|
||||
$config->doc->spaceMethod['execution'] = 'projectspace';
|
||||
|
||||
+31
-12
@@ -70,10 +70,10 @@ class doc extends control
|
||||
$this->session->set('productList', $uri, 'product');
|
||||
$this->session->set('executionList', $uri, 'execution');
|
||||
$this->session->set('projectList', $uri, 'project');
|
||||
$this->session->set('objectName', '', 'doc');
|
||||
$this->session->set('spaceType', 'mine', 'doc');
|
||||
$this->loadModel('search');
|
||||
|
||||
if($moduleID) $libID = $this->tree->getById($moduleID)->root;
|
||||
list($libs, $libID, $object, $objectID, $objectDropdown) = $this->doc->setMenuByType('mine', 0, $libID);
|
||||
if($type != 'mine')
|
||||
{
|
||||
@@ -548,16 +548,25 @@ class doc extends control
|
||||
if(!empty($changes)) $this->action->logHistory($actionID, $changes);
|
||||
}
|
||||
|
||||
$link = $this->session->docList ? $this->session->docList : $this->createLink('doc', 'index');
|
||||
$link = $this->createLink('doc', 'view', "docID={$docID}") . "#app={$this->app->tab}";
|
||||
$oldLib = $doc->lib;
|
||||
$doc = $this->doc->getById($docID);
|
||||
$lib = $this->doc->getLibById($doc->lib);
|
||||
$objectID = zget($lib, $lib->type, 0);
|
||||
if($oldLib != $doc->lib) $link = $this->createLink('doc', 'view', "docID={$docID}");
|
||||
|
||||
if(!empty($objectType) and $objectType != 'doc' and $doc->type != 'chapter' and $doc->type != 'article')
|
||||
if(!$this->doc->checkPrivDoc($doc))
|
||||
{
|
||||
$link = $this->createLink('doc', 'view', "docID=$docID") . "#app={$this->app->tab}";
|
||||
$moduleName = 'doc';
|
||||
if($this->app->tab == 'execution')
|
||||
{
|
||||
$moduleName = 'execution';
|
||||
$methodName = 'doc';
|
||||
}
|
||||
else
|
||||
{
|
||||
$methodName = zget($this->config->doc->spaceMethod, $lib->type);
|
||||
}
|
||||
$params = "objectID=$objectID&libID={$doc->lib}";
|
||||
$link = $this->createLink($moduleName, $methodName, $params);
|
||||
}
|
||||
|
||||
if(isonlybody()) return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => 'parent'));
|
||||
@@ -1110,6 +1119,14 @@ class doc extends control
|
||||
public function view($docID = 0, $version = 0, $appendLib = 0)
|
||||
{
|
||||
$doc = $this->doc->getById($docID);
|
||||
if(!$this->doc->checkPrivDoc($doc))
|
||||
{
|
||||
echo(js::alert($this->lang->doc->accessDenied));
|
||||
$loginLink = $this->config->requestType == 'GET' ? "?{$this->config->moduleVar}=user&{$this->config->methodVar}=login" : "user{$this->config->requestFix}login";
|
||||
if(strpos($this->server->http_referer, $loginLink) !== false) return print(js::locate(inlink('index')));
|
||||
helper::end(print(js::locate('back')));
|
||||
}
|
||||
|
||||
if(!$doc or !isset($doc->id))
|
||||
{
|
||||
if(defined('RUN_MODE') && RUN_MODE == 'api') return $this->send(array('status' => 'fail', 'code' => 404, 'message' => '404 Not found'));
|
||||
@@ -1264,11 +1281,14 @@ class doc extends control
|
||||
*/
|
||||
public function tableContents($type = 'custom', $objectID = 0, $libID = 0, $moduleID = 0, $browseType = 'all', $orderBy = 'status,id_desc', $param = 0, $recTotal = 0, $recPerPage = 20, $pageID = 1)
|
||||
{
|
||||
$isFirstLoad = $libID == 0 ? true : false;
|
||||
$this->session->set('createProjectLocate', $this->app->getURI(true), 'doc');
|
||||
$this->session->set('structList', $this->app->getURI(true), 'doc');
|
||||
$uri = $this->app->getURI(true);
|
||||
$this->session->set('createProjectLocate', $uri, 'doc');
|
||||
$this->session->set('structList', $uri, 'doc');
|
||||
$this->session->set('spaceType', $type, 'doc');
|
||||
$this->session->set('docList', $uri, 'doc');
|
||||
|
||||
if($moduleID) $libID = $this->tree->getById($moduleID)->root;
|
||||
$isFirstLoad = $libID == 0 ? true : false;
|
||||
if(empty($browseType)) $browseType = 'all';
|
||||
list($libs, $libID, $object, $objectID, $objectDropdown) = $this->doc->setMenuByType($type, $objectID, $libID);
|
||||
|
||||
@@ -1298,7 +1318,7 @@ class doc extends control
|
||||
if($libType == 'api')
|
||||
{
|
||||
$this->loadModel('api');
|
||||
$this->session->set('objectName', $this->lang->doc->api, 'admin');
|
||||
$this->session->set('objectName', $this->lang->doc->api, 'doc');
|
||||
|
||||
$this->view->libs = $libs;
|
||||
$this->view->apiID = 0;
|
||||
@@ -1307,8 +1327,7 @@ class doc extends control
|
||||
}
|
||||
else
|
||||
{
|
||||
if(in_array($type, array('product', 'project'))) $this->session->set('objectName', $this->lang->doc->common, 'admin');
|
||||
if($this->config->vision == 'lite' or in_array($type, array('execution', 'custom'))) $this->session->set('objectName', '', 'admin');
|
||||
if(in_array($type, array('product', 'project'))) $this->session->set('objectName', $this->lang->doc->common, 'doc');
|
||||
$this->view->docs = $browseType == 'bySearch' ? $this->doc->getDocsBySearch($type, $objectID, $libID, $queryID, $orderBy, $pager) : $this->doc->getDocs($libID, $moduleID, $browseType, $orderBy, $pager);
|
||||
}
|
||||
|
||||
|
||||
@@ -112,3 +112,6 @@ ol, ul {margin-bottom: 0}
|
||||
#outlineMenu {background: #fff; position: absolute; height: calc(100vh - 180px)!important; overflow-y: auto; top: 50px; right: 25px;}
|
||||
.pl-0px {padding-left:0px !important;}
|
||||
.icon {cursor: pointer;}
|
||||
|
||||
#mainMenu .pull-right .createDropdown li > a .file-icon {margin-bottom: 1px;}
|
||||
#queryBox .btn-save-form, #queryBox #toggle-queries{display: none;}
|
||||
|
||||
@@ -25,7 +25,7 @@ $lang->doclib->privateACL = "Private <span class='acl-tip'>(Only creators and wh
|
||||
$lang->doclib->tip = new stdclass();
|
||||
$lang->doclib->tip->selectExecution = "When execution is empty, the library created is the {$lang->projectCommon} library";
|
||||
|
||||
$lang->doclib->type['wiki'] = 'WIKI';
|
||||
$lang->doclib->type['wiki'] = 'Wiki';
|
||||
$lang->doclib->type['api'] = 'API';
|
||||
|
||||
$lang->doclib->aclListA = array();
|
||||
@@ -252,13 +252,12 @@ $lang->doc->typeList['word'] = 'Word';
|
||||
$lang->doc->typeList['ppt'] = 'PPT';
|
||||
$lang->doc->typeList['excel'] = 'Excel';
|
||||
|
||||
$lang->doc->createList['html'] = 'Create Document';
|
||||
$lang->doc->createList['template'] = 'Create By Template';
|
||||
$lang->doc->createList['template'] = 'Wiki';
|
||||
$lang->doc->createList['word'] = 'Word';
|
||||
$lang->doc->createList['ppt'] = 'PPT';
|
||||
$lang->doc->createList['excel'] = 'Excel';
|
||||
|
||||
$lang->doc->types['doc'] = 'WIKI';
|
||||
$lang->doc->types['doc'] = 'Wiki';
|
||||
$lang->doc->types['api'] = 'API';
|
||||
|
||||
$lang->doc->contentTypeList['html'] = 'HTML';
|
||||
@@ -307,7 +306,7 @@ $lang->doc->versionNotFount = 'Existiert nicht in diesem Build.';
|
||||
$lang->doc->noDoc = 'Keine Dokumente. ';
|
||||
$lang->doc->noArticle = 'No articles.';
|
||||
$lang->doc->noLib = 'No libraries.';
|
||||
$lang->doc->noBook = 'The WIKI library has not created a manual, please create a new one :)';
|
||||
$lang->doc->noBook = 'The Wiki library has not created a manual, please create a new one :)';
|
||||
$lang->doc->cannotCreateOffice = 'Sorry, %s file can only be created in ZenTao Biz Series or above. Contact Philip@easysoft.ltd to know more about ZenTao Biz Series and ZenTao Max Series.';
|
||||
$lang->doc->notSetOffice = "<p>To create a %s document, you need to configure <a href='%s' target='_parent'>office convert</a>.<p>";
|
||||
$lang->doc->noSearchedDoc = 'Nichts gesucht.';
|
||||
|
||||
@@ -25,7 +25,7 @@ $lang->doclib->privateACL = "Private <span class='acl-tip'>(Only creators and wh
|
||||
$lang->doclib->tip = new stdclass();
|
||||
$lang->doclib->tip->selectExecution = "When execution is empty, the library created is the {$lang->projectCommon} library";
|
||||
|
||||
$lang->doclib->type['wiki'] = 'WIKI';
|
||||
$lang->doclib->type['wiki'] = 'Wiki';
|
||||
$lang->doclib->type['api'] = 'API';
|
||||
|
||||
$lang->doclib->aclListA = array();
|
||||
@@ -252,13 +252,12 @@ $lang->doc->typeList['word'] = 'Word';
|
||||
$lang->doc->typeList['ppt'] = 'PPT';
|
||||
$lang->doc->typeList['excel'] = 'Excel';
|
||||
|
||||
$lang->doc->createList['html'] = 'Create Document';
|
||||
$lang->doc->createList['template'] = 'Create By Template';
|
||||
$lang->doc->createList['template'] = 'Wiki';
|
||||
$lang->doc->createList['word'] = 'Word';
|
||||
$lang->doc->createList['ppt'] = 'PPT';
|
||||
$lang->doc->createList['excel'] = 'Excel';
|
||||
|
||||
$lang->doc->types['doc'] = 'WIKI';
|
||||
$lang->doc->types['doc'] = 'Wiki';
|
||||
$lang->doc->types['api'] = 'API';
|
||||
|
||||
$lang->doc->contentTypeList['html'] = 'HTML';
|
||||
@@ -307,7 +306,7 @@ $lang->doc->versionNotFount = 'It does not exist in this build.';
|
||||
$lang->doc->noDoc = 'No documents. ';
|
||||
$lang->doc->noArticle = 'No articles.';
|
||||
$lang->doc->noLib = 'No libraries.';
|
||||
$lang->doc->noBook = 'The WIKI library has not created a manual, please create a new one :)';
|
||||
$lang->doc->noBook = 'The Wiki library has not created a manual, please create a new one :)';
|
||||
$lang->doc->cannotCreateOffice = 'Sorry, %s file can only be created in ZenTao Biz Series or above. Contact Philip@easysoft.ltd to know more about ZenTao Biz Series and ZenTao Max Series.';
|
||||
$lang->doc->notSetOffice = "<p>To create a %s document, you need to configure <a href='%s'>office convert</a>.<p>";
|
||||
$lang->doc->noSearchedDoc = 'No documents found.';
|
||||
|
||||
@@ -25,7 +25,7 @@ $lang->doclib->privateACL = "Private <span class='acl-tip'>(Only creators and wh
|
||||
$lang->doclib->tip = new stdclass();
|
||||
$lang->doclib->tip->selectExecution = "When execution is empty, the library created is the {$lang->projectCommon} library";
|
||||
|
||||
$lang->doclib->type['wiki'] = 'WIKI';
|
||||
$lang->doclib->type['wiki'] = 'Wiki';
|
||||
$lang->doclib->type['api'] = 'API';
|
||||
|
||||
$lang->doclib->aclListA = array();
|
||||
@@ -252,13 +252,12 @@ $lang->doc->typeList['word'] = 'Word';
|
||||
$lang->doc->typeList['ppt'] = 'PPT';
|
||||
$lang->doc->typeList['excel'] = 'Excel';
|
||||
|
||||
$lang->doc->createList['html'] = 'Create Document';
|
||||
$lang->doc->createList['template'] = 'Create By Template';
|
||||
$lang->doc->createList['template'] = 'Wiki';
|
||||
$lang->doc->createList['word'] = 'Word';
|
||||
$lang->doc->createList['ppt'] = 'PPT';
|
||||
$lang->doc->createList['excel'] = 'Excel';
|
||||
|
||||
$lang->doc->types['doc'] = 'WIKI';
|
||||
$lang->doc->types['doc'] = 'Wiki';
|
||||
$lang->doc->types['api'] = 'API';
|
||||
|
||||
$lang->doc->contentTypeList['html'] = 'HTML';
|
||||
@@ -307,7 +306,7 @@ $lang->doc->versionNotFount = "N'existe pas dans ce build.";
|
||||
$lang->doc->noDoc = 'Aucun documents. ';
|
||||
$lang->doc->noArticle = 'No articles.';
|
||||
$lang->doc->noLib = 'No libraries.';
|
||||
$lang->doc->noBook = 'The WIKI library has not created a manual, please create a new one :)';
|
||||
$lang->doc->noBook = 'The Wiki library has not created a manual, please create a new one :)';
|
||||
$lang->doc->cannotCreateOffice = 'Désolé, %s peut seulement être créé dans Série ZenTao Biz ou plus. Coordonnées Philip@easysoft.ltd En savoir plus sur les séries zentao biz et zentao Max.';
|
||||
$lang->doc->notSetOffice = "<p>To create a %s document, you need to configure <a href='%s' target='_parent'>office convert</a>.<p>";
|
||||
$lang->doc->noSearchedDoc = 'Aucun documents trouvé.';
|
||||
|
||||
@@ -25,7 +25,7 @@ $lang->doclib->privateACL = "私有 <span class='acl-tip'>(仅创建者和有%
|
||||
$lang->doclib->tip = new stdclass();
|
||||
$lang->doclib->tip->selectExecution = "执行为空时,创建的库为{$lang->projectCommon}库";
|
||||
|
||||
$lang->doclib->type['wiki'] = 'WIKI文档库';
|
||||
$lang->doclib->type['wiki'] = 'Wiki文档库';
|
||||
$lang->doclib->type['api'] = '接口库';
|
||||
|
||||
$lang->doclib->aclListA = array();
|
||||
@@ -252,13 +252,12 @@ $lang->doc->typeList['word'] = 'Word';
|
||||
$lang->doc->typeList['ppt'] = 'PPT';
|
||||
$lang->doc->typeList['excel'] = 'Excel';
|
||||
|
||||
$lang->doc->createList['html'] = '创建文档';
|
||||
$lang->doc->createList['template'] = '由模板创建';
|
||||
$lang->doc->createList['template'] = 'Wiki文档';
|
||||
$lang->doc->createList['word'] = 'Word';
|
||||
$lang->doc->createList['ppt'] = 'PPT';
|
||||
$lang->doc->createList['excel'] = 'Excel';
|
||||
|
||||
$lang->doc->types['doc'] = 'WIKI文档';
|
||||
$lang->doc->types['doc'] = 'Wiki文档';
|
||||
$lang->doc->types['api'] = '接口文档';
|
||||
|
||||
$lang->doc->contentTypeList['html'] = 'HTML';
|
||||
@@ -307,7 +306,7 @@ $lang->doc->versionNotFount = '该版本文档不存在';
|
||||
$lang->doc->noDoc = '暂时没有文档。';
|
||||
$lang->doc->noArticle = '暂时没有文章。';
|
||||
$lang->doc->noLib = '暂时没有库。';
|
||||
$lang->doc->noBook = 'WIKI库还未创建手册,请新建 :)';
|
||||
$lang->doc->noBook = 'Wiki库还未创建手册,请新建 :)';
|
||||
$lang->doc->cannotCreateOffice = '<p>对不起,企业版才能创建%s文档。<p><p>试用企业版,请联系我们:4006-8899-23 0532-86893032。</p>';
|
||||
$lang->doc->notSetOffice = "创建%s文档,需要配置<a href='%s'>Office转换设置</a>。";
|
||||
$lang->doc->noSearchedDoc = '没有搜索到任何文档。';
|
||||
|
||||
+26
-34
@@ -748,14 +748,6 @@ class docModel extends model
|
||||
->fetch();
|
||||
|
||||
if(!$doc) return false;
|
||||
if(!$this->checkPrivDoc($doc))
|
||||
{
|
||||
echo(js::alert($this->lang->doc->accessDenied));
|
||||
$loginLink = $this->config->requestType == 'GET' ? "?{$this->config->moduleVar}=user&{$this->config->methodVar}=login" : "user{$this->config->requestFix}login";
|
||||
if(strpos($this->server->http_referer, $loginLink) !== false) return print(js::locate(inlink('index')));
|
||||
helper::end(print(js::locate('back')));
|
||||
die;
|
||||
}
|
||||
|
||||
$docs = $this->processCollector(array($doc->id => $doc));
|
||||
$doc = $docs[$doc->id];
|
||||
@@ -2732,7 +2724,6 @@ class docModel extends model
|
||||
*/
|
||||
public function setMenuByType($type, $objectID, $libID, $appendLib = 0)
|
||||
{
|
||||
$this->session->set('docList', $this->app->getURI(true), $this->app->tab);
|
||||
if(empty($type))
|
||||
{
|
||||
$doclib = $this->getLibById($libID);
|
||||
@@ -2744,20 +2735,8 @@ class docModel extends model
|
||||
$objectDropdown = '';
|
||||
if(in_array($type, array('project', 'product', 'execution')))
|
||||
{
|
||||
$objects = $this->getOrderedObjects($type);
|
||||
$objectID = $this->loadModel($type)->saveState($objectID, $objects);
|
||||
$table = $this->config->objectTables[$type];
|
||||
$libs = $this->getLibsByObject($type, $objectID, '', $appendLib);
|
||||
|
||||
if(($libID == 0 or !isset($libs[$libID])) and !empty($libs)) $libID = reset($libs)->id;
|
||||
$object = $this->dao->select('id,name,status')->from($table)->where('id')->eq($objectID)->fetch();
|
||||
$objectTitle = zget($objects, $objectID, '');
|
||||
$objectDropdown = $this->select($type, $objectTitle, $objectID);
|
||||
if($type == 'execution' and isset($libs[$libID]))
|
||||
{
|
||||
$objectTitle = zget($libs[$libID], 'name', '');
|
||||
$objectDropdown = "<div id='sidebarHeader'><div class='title' title='{$objectTitle}'>{$objectTitle}</div></div>";
|
||||
}
|
||||
$table = $this->config->objectTables[$type];
|
||||
$object = $this->dao->select('id,name,status')->from($table)->where('id')->eq($objectID)->fetch();
|
||||
|
||||
if(empty($object))
|
||||
{
|
||||
@@ -2765,6 +2744,22 @@ class docModel extends model
|
||||
$methodName = ($type == 'project' and $this->config->vision != 'lite') ? 'createGuide' : 'create';
|
||||
return print(js::locate(helper::createLink($type, $methodName, $param)));
|
||||
}
|
||||
|
||||
$objects = $this->getOrderedObjects($type);
|
||||
$objectID = $this->loadModel($type)->saveState($objectID, $objects);
|
||||
$libs = $this->getLibsByObject($type, $objectID, '', $appendLib);
|
||||
if(($libID == 0 or !isset($libs[$libID])) and !empty($libs)) $libID = reset($libs)->id;
|
||||
|
||||
$objectTitle = zget($objects, $objectID, '');
|
||||
if($this->app->tab != 'doc' and isset($libs[$libID]))
|
||||
{
|
||||
$objectTitle = zget($libs[$libID], 'name', '');
|
||||
$objectDropdown = "<div id='sidebarHeader'><div class='title' title='{$objectTitle}'>{$objectTitle}</div></div>";
|
||||
}
|
||||
else
|
||||
{
|
||||
$objectDropdown = $this->select($type, $objectTitle, $objectID);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -3155,21 +3150,18 @@ class docModel extends model
|
||||
|
||||
foreach($this->lang->doc->createList as $typeKey => $typeName)
|
||||
{
|
||||
if($this->config->edition != 'max' and $typeKey == 'template') continue;
|
||||
|
||||
$attr = "data-app='{$this->app->tab}'";
|
||||
$class = strpos($this->config->doc->officeTypes, $typeKey) !== false ? 'iframe' : '';
|
||||
$params = "objectType={$lib->type}&objectID=$objectID&libID={$lib->id}&moduleID=$moduleID&type=$typeKey";
|
||||
if($typeKey == 'template') $params = "objectType={$lib->type}&objectID=$objectID&libID={$lib->id}&moduleID=$moduleID&type=html&from=template";
|
||||
$docType = zget($this->config->doc->iconList, $typeKey);
|
||||
$icon = html::image("static/svg/{$docType}.svg", "class='file-icon'");
|
||||
$attr = "data-app='{$this->app->tab}'";
|
||||
$class = strpos($this->config->doc->officeTypes, $typeKey) !== false ? 'iframe' : '';
|
||||
$params = "objectType={$lib->type}&objectID=$objectID&libID={$lib->id}&moduleID=$moduleID&type=$typeKey";
|
||||
if($typeKey == 'template' and $this->config->edition == 'max') $params = "objectType={$lib->type}&objectID=$objectID&libID={$lib->id}&moduleID=$moduleID&type=html&from=template";
|
||||
|
||||
$html .= "<li>";
|
||||
$html .= html::a(helper::createLink('doc', 'create', $params, '', $class ? true : false), $typeName, '', "class='$class' $attr");
|
||||
$html .= html::a(helper::createLink('doc', 'create', $params, '', $class ? true : false), $icon . ' ' . $typeName, '', "class='$class' $attr");
|
||||
$html .= "</li>";
|
||||
|
||||
$printDivider = false;
|
||||
if($typeKey == 'template') $printDivider = true;
|
||||
if($this->config->edition != 'max' and $typeKey == 'html') $printDivider = true;
|
||||
if($printDivider) $html .= '<li class="divider"></li>';
|
||||
if($typeKey == 'template') $html .= '<li class="divider"></li>';
|
||||
}
|
||||
|
||||
$html .= '</ul></div>';
|
||||
|
||||
@@ -81,7 +81,7 @@ body {margin-bottom: 25px;}
|
||||
</td>
|
||||
<td class="c-name" title='<?php echo $doc->title;?>'>
|
||||
<?php
|
||||
$docType = $doc->type == 'text' ? 'wiki-file' : $doc->type;
|
||||
$docType = zget($config->doc->iconList, $doc->type);
|
||||
$icon = html::image("static/svg/{$docType}.svg", "class='file-icon'");
|
||||
if(common::hasPriv('doc', 'view'))
|
||||
{
|
||||
|
||||
@@ -68,6 +68,7 @@ js::set('objectType', isset($type) ? $type : '');
|
||||
js::set('objectID', isset($objectID) ? $objectID : '');
|
||||
js::set('isFirstLoad', isset($isFirstLoad) ? $isFirstLoad: '');
|
||||
js::set('canViewFiles', common::hasPriv('doc', 'showfiles'));
|
||||
js::set('spaceMethod', $config->doc->spaceMethod);
|
||||
?>
|
||||
|
||||
<div id="fileTree" class="file-tree menu-active-primary menu-hover-primary">
|
||||
@@ -435,6 +436,7 @@ $(function()
|
||||
if(!libID) libID = 0;
|
||||
if(!moduleID) moduleID = 0;
|
||||
linkParams = linkParams.replace('%s', 'libID=' + libID + '&moduleID=' + moduleID);
|
||||
var moduleName = config.currentModule;
|
||||
var methodName = '';
|
||||
if(config.currentModule == 'api')
|
||||
{
|
||||
@@ -446,27 +448,28 @@ $(function()
|
||||
methodName = 'showFiles';
|
||||
linkParams = 'type=' + objectType + '&objectID=' + objectID;
|
||||
}
|
||||
else if(objectType == 'mine' || objectType == 'view' || objectType == 'collect' || objectType == 'createdby')
|
||||
{
|
||||
var mySpaceType = 'mine';
|
||||
if(type == 'view' || type == 'collect') mySpaceType = type;
|
||||
if(type == 'createdBy' || type == 'createdby') mySpaceType = 'createdby';
|
||||
|
||||
methodName = 'mySpace';
|
||||
linkParams = 'type='+ mySpaceType + '&libID=' + libID + '&moduleID=' + moduleID;
|
||||
}
|
||||
else if(['text', 'word', 'ppt', 'excel'].indexOf(type) !== -1)
|
||||
{
|
||||
methodName = 'view';
|
||||
linkParams = 'docID=' + moduleID;
|
||||
}
|
||||
else if(objectType == 'execution')
|
||||
{
|
||||
moduleName = 'execution';
|
||||
methodName = 'doc';
|
||||
linkParams = 'executionID=0';
|
||||
}
|
||||
else
|
||||
{
|
||||
methodName = objectType == 'execution' || objectType == 'custom' ? 'tableContents' : objectType + 'Space';
|
||||
linkParams = objectType == 'execution' || objectType == 'custom' ? 'type=' + objectType + '&' + linkParams : linkParams;
|
||||
methodName = spaceMethod[objectType] ? spaceMethod[objectType] : 'teamSpace';
|
||||
if(['mine', 'view', 'collect', 'createdby'].indexOf(objectType) !== -1)
|
||||
{
|
||||
type = ['view', 'collect', 'createdby'].indexOf(type.toLowerCase()) !== -1 ? type.toLowerCase() : 'mine';
|
||||
linkParams = 'type=' + type + '&' + linkParams;
|
||||
}
|
||||
}
|
||||
|
||||
location.href = createLink(config.currentModule, methodName, linkParams);
|
||||
location.href = createLink(moduleName, methodName, linkParams);
|
||||
}
|
||||
|
||||
$('body').on('click', function()
|
||||
|
||||
@@ -16,6 +16,7 @@ body {margin-bottom: 25px;}
|
||||
#docListForm th.c-user {width: 80px;}
|
||||
#docListForm th.c-actions {width: 84px; padding-left: 15px;}
|
||||
#docListForm .c-module, #docListForm .c-object {width: 120px; overflow: hidden; white-space: nowrap; text-overflow: clip;}
|
||||
#docListForm .c-object {width: 180px;}
|
||||
#docListForm .table .c-name > .doc-title {display: inline-block; max-width: calc(100% - 80px); overflow: hidden; background: transparent; padding-right:0px;}
|
||||
#docListForm .table .c-name > span.doc-title {line-height: 0; vertical-align: inherit;}
|
||||
#docListForm .table .c-name > .draft {background-color:rgba(129, 102, 238, 0.12); color:#8166EE;}
|
||||
@@ -26,7 +27,7 @@ body {margin-bottom: 25px;}
|
||||
#docListForm .checkbox-primary > label {height: 16px; line-height: 16px; padding-left: 16px;}
|
||||
#docListForm .checkbox-primary > label:before {left: -1px; font-size: 10px;}
|
||||
#docListForm .checkbox-primary > label:after {width: 12px; height: 12px;}
|
||||
.table-files .btn {padding: 0 2px;}
|
||||
.table-files .btn {padding: 2px;}
|
||||
</style>
|
||||
<?php if(common::checkNotCN()):?>
|
||||
<style>
|
||||
@@ -34,6 +35,7 @@ body {margin-bottom: 25px;}
|
||||
#docListForm th.c-user {width: 102px !important;}
|
||||
</style>
|
||||
<?php endif;?>
|
||||
<?php js::set('isMyCollection', $type == 'collect' ? 1 : 0);?>
|
||||
<?php if(empty($docs)):?>
|
||||
<div class="table-empty-tip">
|
||||
<p>
|
||||
@@ -96,7 +98,7 @@ body {margin-bottom: 25px;}
|
||||
</td>
|
||||
<td class="c-name" title='<?php echo $doc->title;?>'>
|
||||
<?php
|
||||
$docType = $doc->type == 'text' ? 'wiki-file' : $doc->type;
|
||||
$docType = zget($config->doc->iconList, $doc->type);
|
||||
$icon = html::image("static/svg/{$docType}.svg", "class='file-icon'");
|
||||
if(common::hasPriv('doc', 'view'))
|
||||
{
|
||||
@@ -192,5 +194,11 @@ $(function()
|
||||
return checkedTotal ? checkedSummary.replace('%total%', checkedTotal) : pageSummary;
|
||||
}
|
||||
});
|
||||
|
||||
$('.ajaxCollect').click(function()
|
||||
{
|
||||
if(isMyCollection) window.location.reload();
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -24,7 +24,8 @@
|
||||
<div id="mainMenu" class="clearfix">
|
||||
<div id="leftBar" class="btn-toolbar pull-left">
|
||||
<?php echo $objectDropdown;?>
|
||||
<?php echo html::backButton("<i class='icon icon-back icon-sm'></i> " . $lang->goback, "id='backBtn'", 'btn btn-link')?>
|
||||
<?php $gobackLink = $this->session->docList ? $this->session->docList : inlink('teamSpace', "objectID=0&libID=$libID");?>
|
||||
<?php echo html::a($gobackLink, "<i class='icon-back'></i> " . $lang->goback, '', "class='btn btn-link'");?>
|
||||
</div>
|
||||
<div class="btn-toolbar pull-right">
|
||||
<?php
|
||||
|
||||
@@ -4,10 +4,11 @@ body {margin-bottom: 25px;}
|
||||
#docList th.c-id {width: 72px;}
|
||||
#docList th.c-user {width: 80px;}
|
||||
#docList th.c-actions {width: 84px; padding-left: 15px;}
|
||||
#docList .c-object {width: 120px; overflow: hidden; white-space: nowrap; text-overflow: clip;}
|
||||
#docList .c-object {width: 180px; overflow: hidden; white-space: nowrap; text-overflow: clip;}
|
||||
#docList.table .c-name > .doc-title {display: inline-block; max-width: calc(100% - 80px); overflow: hidden; background: transparent; padding-right:0px;}
|
||||
#docList.table .c-name > span.doc-title {line-height: 0; vertical-align: inherit;}
|
||||
#docList.table .c-name > .draft {background-color:rgba(129, 102, 238, 0.12); color:#8166EE;}
|
||||
#docList .btn {padding: 0 2px;}
|
||||
.btn.ajaxCollect {width: 20px; padding: 0 6px;}
|
||||
#docList .ajaxCollect {width: 30px; padding: 0 6px;}
|
||||
.btn.ajaxCollect > img {width: 20px;}
|
||||
#queryBox .btn-save-form, #queryBox #toggle-queries{display: none;}
|
||||
|
||||
@@ -151,3 +151,12 @@ $config->search->recPerPage = 10;
|
||||
/* Set the length of summary of search results. */
|
||||
$config->search->summaryLength = 120;
|
||||
$config->search->maxFileSize = 1024;
|
||||
|
||||
if($config->vision == 'lite')
|
||||
{
|
||||
$config->search->searchObject = array('trash', 'productlibDoc', 'productapiDoc', 'projectlibDoc', 'projectapiDoc');
|
||||
}
|
||||
else
|
||||
{
|
||||
$config->search->searchObject = array('trash');
|
||||
}
|
||||
|
||||
@@ -49,7 +49,7 @@ class search extends control
|
||||
$_SESSION['searchParams']['module'] = $module;
|
||||
$this->search->initSession($module, $fields, $params);
|
||||
|
||||
if(($module == 'trash' or substr($module, -3) == 'Doc') and $this->session->objectName)
|
||||
if(in_array($module, $this->config->search->searchObject) and $this->session->objectName)
|
||||
{
|
||||
$space = common::checkNotCN() ? ' ' : '';
|
||||
$this->lang->search->common = $this->lang->search->common . $space . $this->session->objectName;
|
||||
|
||||
@@ -401,7 +401,12 @@ class tree extends control
|
||||
$this->view->optionMenu = $this->tree->getOptionMenu($module->root, $module->type, 0, $module->branch, 'noMainBranch|nodeleted');
|
||||
}
|
||||
|
||||
if($type == 'doc') $this->view->libs = $this->loadModel('doc')->getLibs('all', $extra = 'withObject', '', 0, 'book');
|
||||
if($type == 'doc')
|
||||
{
|
||||
$docLib = $this->loadModel('doc')->getLibById($module->root);
|
||||
$objectID = isset($docLib->{$docLib->type}) ? $docLib->{$docLib->type} : 0;
|
||||
$this->view->libs = $this->doc->getLibs($docLib->type, '', '', $objectID, 'book');
|
||||
}
|
||||
|
||||
$this->view->module = $module;
|
||||
$this->view->type = $type;
|
||||
|
||||
@@ -1838,7 +1838,7 @@ class treeModel extends model
|
||||
if($self)
|
||||
{
|
||||
$self->parent = $module->parent;
|
||||
if($self->root) $module->root = $self->root;
|
||||
if($self->root and !isset($module->root)) $module->root = $self->root;
|
||||
}
|
||||
|
||||
$repeatName = $this->checkUnique($self, array("id{$self->id}" => $module->name), array("id{$self->id}" => $module->branch));
|
||||
@@ -1927,6 +1927,7 @@ class treeModel extends model
|
||||
$this->dao->update(TABLE_STORY)->set('product')->eq($newRoot)->where('module')->in($childIdList)->exec();
|
||||
$this->dao->update(TABLE_BUG)->set('product')->eq($newRoot)->where('module')->in($childIdList)->exec();
|
||||
$this->dao->update(TABLE_CASE)->set('product')->eq($newRoot)->where('module')->in($childIdList)->exec();
|
||||
$this->dao->update(TABLE_DOC)->set('lib')->eq($newRoot)->where('module')->in($childIdList)->exec();
|
||||
|
||||
if($type != 'story') return;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user