diff --git a/module/doc/config.php b/module/doc/config.php index d74556c33e..b93e631848 100644 --- a/module/doc/config.php +++ b/module/doc/config.php @@ -14,6 +14,8 @@ $config->doc->edit->requiredFields = 'title'; $config->doc->customObjectLibs = 'files,customFiles'; $config->doc->notArticleType = ''; +$config->doc->canCreateOffice = false; +$config->doc->officeTypes = 'word,ppt,excel'; $config->doc->custom = new stdclass(); $config->doc->custom->objectLibs = $config->doc->customObjectLibs; diff --git a/module/doc/lang/zh-cn.php b/module/doc/lang/zh-cn.php index cba554cbf7..c326493948 100644 --- a/module/doc/lang/zh-cn.php +++ b/module/doc/lang/zh-cn.php @@ -122,6 +122,9 @@ $lang->doc->aclList['private'] = '私有'; $lang->doc->typeList['html'] = '富文本'; $lang->doc->typeList['markdown'] = 'Markdown'; $lang->doc->typeList['url'] = '链接'; +$lang->doc->typeList['word'] = 'Word'; +$lang->doc->typeList['ppt'] = 'PPT'; +$lang->doc->typeList['excel'] = 'Excel'; $lang->doc->types['text'] = '文档'; $lang->doc->types['url'] = '链接'; @@ -160,6 +163,7 @@ $lang->doc->errorMainSysLib = "该系统文档库不能删除!"; $lang->doc->accessDenied = "您没有权限访问!"; $lang->doc->versionNotFount = '该版本文档不存在'; $lang->doc->noDoc = '暂时没有文档。'; +$lang->doc->cannotCreateOffice = '对不起,企业版才能创建%s文档。'; $lang->doc->noSearchedDoc = '没有搜索到任何文档。'; $lang->doc->noEditedDoc = '您还没有编辑任何文档。'; $lang->doc->noOpenedDoc = '您还没有创建任何文档。'; diff --git a/module/doc/view/browse.html.php b/module/doc/view/browse.html.php index 1818f8bf90..5d38158ff4 100644 --- a/module/doc/view/browse.html.php +++ b/module/doc/view/browse.html.php @@ -58,7 +58,8 @@ var browseType = '';
diff --git a/module/doc/view/create.html.php b/module/doc/view/create.html.php index af8b953695..97835583f0 100644 --- a/module/doc/view/create.html.php +++ b/module/doc/view/create.html.php @@ -10,6 +10,19 @@ * @link http://www.zentao.net */ ?> +doc->officeTypes, $docType) !== false and !$config->doc->canCreateOffice):?> + +