* Code for task #59750.
This commit is contained in:
@@ -7,6 +7,10 @@ include 'chosen.html.php';
|
||||
<?php if(empty($_GET['onlybody']) or $_GET['onlybody'] != 'yes'):?>
|
||||
<?php $this->app->loadConfig('sso');?>
|
||||
<?php if(!empty($config->sso->redirect)) js::set('ssoRedirect', $config->sso->redirect);?>
|
||||
<?php $isDocModule = $app->getModuleName() == 'doc';?>
|
||||
<?php $isManagedDocMethod = strpos(',create,edit,', ",{$app->getMethodName()},") !== false;?>
|
||||
<?php $isNotTextTypeDoc = (isset($docType) and strpos(',html,markdown,text,', ",$docType,") === false);?>
|
||||
<?php if(!$isDocModule or ($isDocModule and (!$isManagedDocMethod or ($isManagedDocMethod and $isNotTextTypeDoc)))):?>
|
||||
<header id='header'>
|
||||
<div id='mainHeader'>
|
||||
<div class='container'>
|
||||
@@ -44,6 +48,11 @@ include 'chosen.html.php';
|
||||
}
|
||||
?>
|
||||
</header>
|
||||
<?php else:?>
|
||||
<header id='header'>
|
||||
<div id='mainHeader' style="height: 0;"></div>
|
||||
</header>
|
||||
<?php endif;?>
|
||||
|
||||
<?php endif;?>
|
||||
<script>
|
||||
|
||||
@@ -36,7 +36,16 @@ $uid = uniqid('');
|
||||
'indent', 'outdent', 'subscript', 'superscript', '|',
|
||||
'table', 'code', 'pagebreak',
|
||||
'fullscreen', 'source', 'preview', 'about'];
|
||||
var editorToolsMap = {fullTools: fullTools, simpleTools: simpleTools, bugTools: bugTools};
|
||||
var docTools =
|
||||
[ 'formatblock', 'fontname', 'fontsize', 'lineheight', '|', 'forecolor', 'hilitecolor', '|', 'bold', 'italic','underline', 'strikethrough', '|',
|
||||
'justifyleft', 'justifycenter', 'justifyright', 'justifyfull', '|',
|
||||
'insertorderedlist', 'insertunorderedlist', '|',
|
||||
'emoticons', 'image', 'insertfile', 'hr', '|', 'link', '|',
|
||||
'undo', 'redo', '|', 'selectall', 'cut', 'copy', 'paste', '|', 'plainpaste', 'wordpaste', '|', 'removeformat', 'clearhtml','quickformat', '|',
|
||||
'indent', 'outdent', 'subscript', 'superscript', '|',
|
||||
'table', 'code', 'pagebreak',
|
||||
'source'];
|
||||
var editorToolsMap = {fullTools: fullTools, simpleTools: simpleTools, bugTools: bugTools, docTools: docTools};
|
||||
|
||||
/* Kindeditor default options. */
|
||||
var editorDefaults =
|
||||
|
||||
@@ -21,8 +21,8 @@ $config->doc->custom->objectLibs = $config->doc->customObjectLibs;
|
||||
$config->doc->custom->showLibs = 'zero,children';
|
||||
|
||||
$config->doc->editor = new stdclass();
|
||||
$config->doc->editor->create = array('id' => 'content', 'tools' => 'fullTools');
|
||||
$config->doc->editor->edit = array('id' => 'content', 'tools' => 'fullTools');
|
||||
$config->doc->editor->create = array('id' => 'content', 'tools' => 'docTools');
|
||||
$config->doc->editor->edit = array('id' => 'content', 'tools' => 'docTools');
|
||||
$config->doc->editor->view = array('id' => 'comment,lastComment', 'tools' => 'simple');
|
||||
$config->doc->editor->objectlibs = array('id' => 'comment,lastComment', 'tools' => 'simple');
|
||||
|
||||
|
||||
+29
-1
@@ -486,6 +486,7 @@ class doc extends control
|
||||
$this->view->lib = $lib;
|
||||
$this->view->groups = $this->loadModel('group')->getPairs();
|
||||
$this->view->users = $this->user->getPairs('noletter|noclosed|nodeleted', $doc->users);
|
||||
$this->view->docType = $doc->type;
|
||||
$this->display();
|
||||
}
|
||||
|
||||
@@ -782,6 +783,21 @@ class doc extends control
|
||||
return print(json_encode($this->doc->getAllLibGroups()));
|
||||
}
|
||||
|
||||
/**
|
||||
* AJAX: Get libs by type.
|
||||
*
|
||||
* @param string $type
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function ajaxGetLibsByType($type)
|
||||
{
|
||||
$unclosed = strpos($this->config->doc->custom->showLibs, 'unclosed') !== false ? 'unclosedProject' : '';
|
||||
$libs = $this->doc->getLibs($type, "withObject,$unclosed");
|
||||
|
||||
return print(html::select('lib', $libs, '', 'class="form-control"'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Ajax get all child module.
|
||||
*
|
||||
@@ -1239,11 +1255,23 @@ class doc extends control
|
||||
$response['message'] = $this->lang->saveSuccess;
|
||||
$response['result'] = 'success';
|
||||
$response['closeModal'] = true;
|
||||
$response['callback'] = "redirectParentWindow(\"{$this->post->objectType}\")";
|
||||
$response['callback'] = "redirectParentWindow(\"{$this->post->objectType}\", \"{$this->post->lib}\", \"{$this->post->type}\")";
|
||||
return $this->send($response);
|
||||
}
|
||||
|
||||
unset($this->lang->doc->libTypeList['book']);
|
||||
|
||||
$globalTypeList = $this->lang->doc->libTypeList;
|
||||
$globalTypeList = $this->config->vision == 'lite' ? $globalTypeList : $globalTypeList + $this->lang->doc->libGlobalList;
|
||||
|
||||
$defaultType = key($globalTypeList);
|
||||
$unclosed = strpos($this->config->doc->custom->showLibs, 'unclosed') !== false ? 'unclosedProject' : '';
|
||||
$libs = $this->doc->getLibs($defaultType, "withObject,$unclosed");
|
||||
|
||||
$this->view->globalTypeList = $globalTypeList;
|
||||
$this->view->defaultType = $defaultType;
|
||||
$this->view->libs = $libs;
|
||||
|
||||
$this->display();
|
||||
}
|
||||
|
||||
|
||||
@@ -26,12 +26,12 @@ $(function()
|
||||
if($(this).hasClass('ke-selected'))
|
||||
{
|
||||
$('#submit').removeClass('fullscreen-save')
|
||||
$('#submit').addClass('btn-wide')
|
||||
$('.form-actions #submit').addClass('btn-wide')
|
||||
}
|
||||
else
|
||||
{
|
||||
$('#submit').addClass('fullscreen-save')
|
||||
$('#submit').removeClass('btn-wide')
|
||||
$('.form-actions #submit').removeClass('btn-wide')
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -2,19 +2,46 @@
|
||||
* Redirect the parent window.
|
||||
*
|
||||
* @param string objectType
|
||||
* @param int libID
|
||||
* @param string docType
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function redirectParentWindow(objectType)
|
||||
function redirectParentWindow(objectType, libID, docType)
|
||||
{
|
||||
config.onlybody = 'no';
|
||||
if(objectType == 'api')
|
||||
{
|
||||
var link = createLink('api', 'create', 'libID=0') + '#app=doc';
|
||||
var link = createLink('api', 'create', 'libID=' + libID) + '#app=doc';
|
||||
}
|
||||
else
|
||||
{
|
||||
var link = createLink('doc', 'create', 'objectType=' + objectType + '&objectID=0&libID=0') + '#app=doc';
|
||||
var link = createLink('doc', 'create', 'objectType=' + objectType + '&objectID=0&libID=' + libID + '&moduleID=0&docType=' + docType) + '#app=doc';
|
||||
}
|
||||
window.parent.$.apps.open(link);
|
||||
}
|
||||
|
||||
/**
|
||||
* Load doc libs by type.
|
||||
*
|
||||
* @param string type
|
||||
* @return void
|
||||
*/
|
||||
function loadDocLibs(type)
|
||||
{
|
||||
$.get(createLink('doc', 'ajaxGetLibsByType', "type=" + type), function(data)
|
||||
{
|
||||
$('#lib').replaceWith(data);
|
||||
$('#lib_chosen').remove();
|
||||
$('#lib').chosen();
|
||||
})
|
||||
|
||||
if(type == 'api')
|
||||
{
|
||||
$('#docType').addClass('hidden');
|
||||
}
|
||||
else
|
||||
{
|
||||
$('#docType').removeClass('hidden');
|
||||
}
|
||||
}
|
||||
|
||||
+17
-16
@@ -136,22 +136,23 @@ $lang->doc->menuTitle = '目录';
|
||||
|
||||
$lang->doc->collectAction = '收藏文档';
|
||||
|
||||
$lang->doc->libName = '文档库名称';
|
||||
$lang->doc->libType = '文档库类型';
|
||||
$lang->doc->custom = '自定义文档库';
|
||||
$lang->doc->customAB = '自定义库';
|
||||
$lang->doc->createLib = '创建文档库';
|
||||
$lang->doc->allLibs = '文档库列表';
|
||||
$lang->doc->objectLibs = "文档库文档详情";
|
||||
$lang->doc->showFiles = '附件库';
|
||||
$lang->doc->editLib = '编辑文档库';
|
||||
$lang->doc->deleteLib = '删除文档库';
|
||||
$lang->doc->fixedMenu = '固定到菜单栏';
|
||||
$lang->doc->removeMenu = '从菜单栏移除';
|
||||
$lang->doc->search = '搜索';
|
||||
$lang->doc->allCollections = '查看全部收藏文档';
|
||||
$lang->doc->keywordsTips = '多个关键字请用逗号分隔。';
|
||||
$lang->doc->sortLibs = '文档库排序';
|
||||
$lang->doc->libName = '文档库名称';
|
||||
$lang->doc->libType = '文档库类型';
|
||||
$lang->doc->custom = '自定义文档库';
|
||||
$lang->doc->customAB = '自定义库';
|
||||
$lang->doc->createLib = '创建文档库';
|
||||
$lang->doc->allLibs = '文档库列表';
|
||||
$lang->doc->objectLibs = "文档库文档详情";
|
||||
$lang->doc->showFiles = '附件库';
|
||||
$lang->doc->editLib = '编辑文档库';
|
||||
$lang->doc->deleteLib = '删除文档库';
|
||||
$lang->doc->fixedMenu = '固定到菜单栏';
|
||||
$lang->doc->removeMenu = '从菜单栏移除';
|
||||
$lang->doc->search = '搜索';
|
||||
$lang->doc->allCollections = '查看全部收藏文档';
|
||||
$lang->doc->keywordsTips = '多个关键字请用逗号分隔。';
|
||||
$lang->doc->sortLibs = '文档库排序';
|
||||
$lang->doc->titlePlaceholder = '请输入标题';
|
||||
|
||||
global $config;
|
||||
/* 查询条件列表 */
|
||||
|
||||
@@ -10,135 +10,8 @@
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
?>
|
||||
<?php if($docType != '' and strpos($config->doc->officeTypes, $docType) !== false):?>
|
||||
<?php include '../../common/view/header.lite.html.php';?>
|
||||
<div id="mainContent" class="main-content">
|
||||
<div class='center-block'>
|
||||
<div class='main-header'>
|
||||
<h2><?php echo $lang->doc->create;?></h2>
|
||||
</div>
|
||||
<?php if($this->config->edition != 'open'):?>
|
||||
<div class='alert alert-warning strong'>
|
||||
<?php printf($lang->doc->notSetOffice, zget($lang->doc->typeList, $docType), common::hasPriv('custom', 'libreoffice') ? $this->createLink('custom', 'libreoffice', '', '', true) : '###');?>
|
||||
</div>
|
||||
<?php else:?>
|
||||
<div class='alert alert-warning strong'><?php printf($lang->doc->cannotCreateOffice, zget($lang->doc->typeList, $docType));?></div>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$("a[href^='###']").click(function()
|
||||
{
|
||||
alert('<?php echo $lang->doc->noLibreOffice;?>');
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
<?php if($docType == 'html' or $docType == 'markdown' or $docType == 'text'):?>
|
||||
<?php include 'createtexttype.html.php';?>
|
||||
<?php else:?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<?php include '../../common/view/kindeditor.html.php';?>
|
||||
<?php include '../../common/view/markdown.html.php';?>
|
||||
<?php js::set('holders', $lang->doc->placeholder);?>
|
||||
<?php js::set('type', 'doc');?>
|
||||
<div id="mainContent" class="main-content">
|
||||
<div class='center-block'>
|
||||
<div class='main-header'>
|
||||
<h2><?php echo $lang->doc->create;?></h2>
|
||||
</div>
|
||||
<?php if($objectType == 'custom' and empty($libs)):?>
|
||||
<?php echo html::a(helper::createLink('doc', 'createLib', "type=custom&objectID=$objectID"), '<i class="icon icon-plus"></i> ' . $lang->doc->createLib, '', 'class="iframe hidden createCustomLib"');?>
|
||||
<?php endif;?>
|
||||
<form class="load-indicator main-form form-ajax" id="dataform" method='post' enctype='multipart/form-data'>
|
||||
<table class='table table-form'>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th class='w-110px'><?php echo $lang->doc->lib;?></th>
|
||||
<td> <?php echo html::select('lib', $libs, $libID, "class='form-control chosen' onchange=loadDocModule(this.value)");?> </td><td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->doc->module;?></th>
|
||||
<td>
|
||||
<span id='moduleBox'><?php echo html::select('module', $moduleOptionMenu, $moduleID, "class='form-control chosen'");?></span>
|
||||
</td><td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->doc->title;?></th>
|
||||
<td colspan='2'><?php echo html::input('title', '', "class='form-control' required");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->doc->keywords;?></th>
|
||||
<td colspan='2'><?php echo html::input('keywords', '', "class='form-control' placeholder='{$lang->doc->keywordsTips}'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->doc->type;?></th>
|
||||
<?php
|
||||
$typeKeyList = array();
|
||||
foreach($lang->doc->types as $typeKey => $typeName) $typeKeyList[$typeKey] = $typeKey;
|
||||
?>
|
||||
<td><?php echo html::radio('type', $lang->doc->types, zget($typeKeyList, $docType, 'text'));?></td>
|
||||
</tr>
|
||||
<tr id='contentBox'>
|
||||
<th><?php echo $lang->doc->content;?></th>
|
||||
<td colspan='2'>
|
||||
<div class='contenthtml'><?php echo html::textarea('content', '', "style='width:100%;height:200px'");?></div>
|
||||
<div class='contentmarkdown hidden'><?php echo html::textarea('contentMarkdown', '', "style='width:100%;height:200px'");?></div>
|
||||
<?php echo html::hidden('contentType', 'html');?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id='urlBox' class='hidden'>
|
||||
<th><?php echo $lang->doc->url;?></th>
|
||||
<td colspan='2'><?php echo html::input('url', '', "class='form-control'");?></td>
|
||||
</tr>
|
||||
<tr id='fileBox'>
|
||||
<th><?php echo $lang->doc->files;?></th>
|
||||
<td colspan='2'><?php echo $this->fetch('file', 'buildform');?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->doc->mailto;?></th>
|
||||
<td colspan="2">
|
||||
<div class="input-group">
|
||||
<?php
|
||||
echo html::select('mailto[]', $users, '', "multiple class='form-control picker-select' data-drop-direction='top'");
|
||||
echo $this->fetch('my', 'buildContactLists');
|
||||
?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->doclib->control;?></th>
|
||||
<td colspan='2'>
|
||||
<?php $acl = $lib->acl == 'default' ? 'open' : $lib->acl;?>
|
||||
<?php $acl = ($lib->type == 'project' and $acl == 'private') ? 'open' : $acl;?>
|
||||
<?php echo html::radio('acl', $lang->doc->aclList, $acl, "onchange='toggleAcl(this.value, \"doc\")'");?>
|
||||
<span class='text-info' id='noticeAcl'><?php echo $lang->doc->noticeAcl['doc'][$acl];?></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id='whiteListBox' class='hidden'>
|
||||
<th><?php echo $lang->doc->whiteList;?></th>
|
||||
<td colspan='2'>
|
||||
<div class='input-group'>
|
||||
<span class='input-group-addon groups-addon'><?php echo $lang->doclib->group?></span>
|
||||
<?php echo html::select('groups[]', $groups, '', "class='form-control picker-select' multiple data-drop-direction='top'")?>
|
||||
</div>
|
||||
<div class='input-group'>
|
||||
<span class='input-group-addon'><?php echo $lang->doclib->user?></span>
|
||||
<?php echo html::select('users[]', $users, '', "class='form-control picker-select' multiple data-drop-direction='top'")?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan='3' class='text-center form-actions'>
|
||||
<?php echo html::submitButton();?>
|
||||
<?php if(empty($gobackLink)) echo html::backButton($lang->goback, "data-app='{$app->tab}'");?>
|
||||
<?php if(!empty($gobackLink)) echo html::a($gobackLink, $lang->goback, '', "class='btn btn-back btn-wide'");?>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<?php js::set('docType', $docType);?>
|
||||
<?php js::set('noticeAcl', $lang->doc->noticeAcl['doc']);?>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
<?php include 'createothertype.html.php';?>
|
||||
<?php endif;?>
|
||||
|
||||
@@ -0,0 +1,137 @@
|
||||
<?php
|
||||
/**
|
||||
* The create view of doc module of ZenTaoPMS.
|
||||
*
|
||||
* @copyright Copyright 2009-2015 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
|
||||
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
|
||||
* @author Jia Fu <fujia@cnezsoft.com>
|
||||
* @package doc
|
||||
* @version $Id: create.html.php 975 2010-07-29 03:30:25Z jajacn@126.com $
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
?>
|
||||
<?php if($docType != '' and strpos($config->doc->officeTypes, $docType) !== false):?>
|
||||
<?php include '../../common/view/header.lite.html.php';?>
|
||||
<div id="mainContent" class="main-content">
|
||||
<div class='center-block'>
|
||||
<div class='main-header'>
|
||||
<h2><?php echo $lang->doc->create;?></h2>
|
||||
</div>
|
||||
<?php if($this->config->edition != 'open'):?>
|
||||
<div class='alert alert-warning strong'>
|
||||
<?php printf($lang->doc->notSetOffice, zget($lang->doc->typeList, $docType), common::hasPriv('custom', 'libreoffice') ? $this->createLink('custom', 'libreoffice', '', '', true) : '###');?>
|
||||
</div>
|
||||
<?php else:?>
|
||||
<div class='alert alert-warning strong'><?php printf($lang->doc->cannotCreateOffice, zget($lang->doc->typeList, $docType));?></div>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$("a[href^='###']").click(function()
|
||||
{
|
||||
alert('<?php echo $lang->doc->noLibreOffice;?>');
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
<?php else:?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<?php include '../../common/view/kindeditor.html.php';?>
|
||||
<?php include '../../common/view/markdown.html.php';?>
|
||||
<?php js::set('holders', $lang->doc->placeholder);?>
|
||||
<?php js::set('type', 'doc');?>
|
||||
<div id="mainContent" class="main-content">
|
||||
<div class='center-block'>
|
||||
<div class='main-header'>
|
||||
<h2><?php echo $lang->doc->create;?></h2>
|
||||
</div>
|
||||
<?php if($objectType == 'custom' and empty($libs)):?>
|
||||
<?php echo html::a(helper::createLink('doc', 'createLib', "type=custom&objectID=$objectID"), '<i class="icon icon-plus"></i> ' . $lang->doc->createLib, '', 'class="iframe hidden createCustomLib"');?>
|
||||
<?php endif;?>
|
||||
<form class="load-indicator main-form form-ajax" id="dataform" method='post' enctype='multipart/form-data'>
|
||||
<table class='table table-form'>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th class='w-110px'><?php echo $lang->doc->lib;?></th>
|
||||
<td> <?php echo html::select('lib', $libs, $libID, "class='form-control chosen' onchange=loadDocModule(this.value)");?> </td><td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->doc->module;?></th>
|
||||
<td>
|
||||
<span id='moduleBox'><?php echo html::select('module', $moduleOptionMenu, $moduleID, "class='form-control chosen'");?></span>
|
||||
</td><td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->doc->title;?></th>
|
||||
<td colspan='2'><?php echo html::input('title', '', "class='form-control' required");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->doc->keywords;?></th>
|
||||
<td colspan='2'><?php echo html::input('keywords', '', "class='form-control' placeholder='{$lang->doc->keywordsTips}'");?></td>
|
||||
</tr>
|
||||
<tr id='contentBox'>
|
||||
<th><?php echo $lang->doc->content;?></th>
|
||||
<td colspan='2'>
|
||||
<div class='contenthtml'><?php echo html::textarea('content', '', "style='width:100%;height:200px'");?></div>
|
||||
<div class='contentmarkdown hidden'><?php echo html::textarea('contentMarkdown', '', "style='width:100%;height:200px'");?></div>
|
||||
<?php echo html::hidden('contentType', 'html');?>
|
||||
<?php echo html::hidden('type', $docType);?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id='urlBox' class='hidden'>
|
||||
<th><?php echo $lang->doc->url;?></th>
|
||||
<td colspan='2'><?php echo html::input('url', '', "class='form-control'");?></td>
|
||||
</tr>
|
||||
<tr id='fileBox'>
|
||||
<th><?php echo $lang->doc->files;?></th>
|
||||
<td colspan='2'><?php echo $this->fetch('file', 'buildform');?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->doc->mailto;?></th>
|
||||
<td colspan="2">
|
||||
<div class="input-group">
|
||||
<?php
|
||||
echo html::select('mailto[]', $users, '', "multiple class='form-control picker-select' data-drop-direction='top'");
|
||||
echo $this->fetch('my', 'buildContactLists');
|
||||
?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->doclib->control;?></th>
|
||||
<td colspan='2'>
|
||||
<?php $acl = $lib->acl == 'default' ? 'open' : $lib->acl;?>
|
||||
<?php $acl = ($lib->type == 'project' and $acl == 'private') ? 'open' : $acl;?>
|
||||
<?php echo html::radio('acl', $lang->doc->aclList, $acl, "onchange='toggleAcl(this.value, \"doc\")'");?>
|
||||
<span class='text-info' id='noticeAcl'><?php echo $lang->doc->noticeAcl['doc'][$acl];?></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id='whiteListBox' class='hidden'>
|
||||
<th><?php echo $lang->doc->whiteList;?></th>
|
||||
<td colspan='2'>
|
||||
<div class='input-group'>
|
||||
<span class='input-group-addon groups-addon'><?php echo $lang->doclib->group?></span>
|
||||
<?php echo html::select('groups[]', $groups, '', "class='form-control picker-select' multiple data-drop-direction='top'")?>
|
||||
</div>
|
||||
<div class='input-group'>
|
||||
<span class='input-group-addon'><?php echo $lang->doclib->user?></span>
|
||||
<?php echo html::select('users[]', $users, '', "class='form-control picker-select' multiple data-drop-direction='top'")?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan='3' class='text-center form-actions'>
|
||||
<?php echo html::submitButton();?>
|
||||
<?php if(empty($gobackLink)) echo html::backButton($lang->goback, "data-app='{$app->tab}'");?>
|
||||
<?php if(!empty($gobackLink)) echo html::a($gobackLink, $lang->goback, '', "class='btn btn-back btn-wide'");?>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<?php js::set('docType', $docType);?>
|
||||
<?php js::set('noticeAcl', $lang->doc->noticeAcl['doc']);?>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
<?php endif;?>
|
||||
@@ -0,0 +1,161 @@
|
||||
<?php
|
||||
/**
|
||||
* The create text view of doc module of ZenTaoPMS.
|
||||
*
|
||||
* @copyright Copyright 2009-2022 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
|
||||
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
|
||||
* @author Fangzhou Hu <hufangzhou@easycorp.ltd>
|
||||
* @package doc
|
||||
* @version $Id: createtext.html.php 975 2022-07-14 13:49:25Z $
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<?php include '../../common/view/kindeditor.html.php';?>
|
||||
<?php include '../../common/view/markdown.html.php';?>
|
||||
<?php js::set('holders', $lang->doc->placeholder);?>
|
||||
<?php js::set('type', 'doc');?>
|
||||
<style>
|
||||
#main {padding: 0;}
|
||||
.container {padding: 0 !important;}
|
||||
#mainContent {padding: 0 !important;}
|
||||
#dataform {overflow: hidden}
|
||||
.doc-title input {border: unset; font-size: 18px; font-weight: bold; color: #3c4353; padding-left: 16px;}
|
||||
.doc-title .form-control:focus {border: unset; box-shadow: unset;}
|
||||
.doc-title input::-webkit-input-placeholder {color: #D8DBDE;}
|
||||
.doc-title.required:after {top: 4px; right: 0; left: 12px; display: inline-table;}
|
||||
#submit {margin-right: 12px;}
|
||||
#headerBox {border-bottom: 1px solid #e3e3e3;}
|
||||
#editorContent {padding: 0;}
|
||||
|
||||
#contentBox {padding: 0; width: 100%;}
|
||||
.ke-container {overflow: visible;}
|
||||
.ke-container, .contentmarkdown {border: unset; background: #efefef;}
|
||||
.ke-container.focus {box-shadow: unset; border-color: unset;}
|
||||
.ke-toolbar {padding-left: 20px; width: 150%; height: 30px; border-bottom: unset;}
|
||||
.ke-edit {border-top: 1px solid rgb(220, 220, 220)}
|
||||
.ke-edit, .CodeMirror {margin-left: 20px; background: #fff;}
|
||||
.kindeditor-ph {padding-left: 20px !important;}
|
||||
.editor-toolbar {background: #fff; padding-left: 20px; border-right: unset; border-top: unset; height: 30px;}
|
||||
.hide-sidebar .ke-edit {padding-right: 20px;}
|
||||
.hide-sidebar .CodeMirror {padding-right: 50px;}
|
||||
.CodeMirror.CodeMirror-wrap {border-left: 0; border-right: 0; border-bottom: 0;}
|
||||
|
||||
#sidebar {top: 30px;}
|
||||
#sidebar .sidebar-toggle {right: 0; left: 0px; background: #efefef; border-radius: 0px; width: 20px; border-top: 1px solid rgb(220, 220, 220);}
|
||||
#sidebar > .sidebar-toggle:hover {background: #efefef;}
|
||||
#sidebar {width: 500px;}
|
||||
#sidebar table {margin-top: 5px;}
|
||||
#sidebar table th {font-weight: 400 !important;}
|
||||
.hide-sidebar #sidebar > .sidebar-toggle > .icon:before {content: "\e314";}
|
||||
.hide-sidebar #sidebar > .sidebar-toggle {left: -20px; z-index: 9;}
|
||||
#sidebar .cell {border-top: 1px solid rgb(220, 220, 220); border-radius: 0px;}
|
||||
#sidebar > .sidebar-toggle > .icon.icon-angle-right {left: 4px;}
|
||||
|
||||
.th-control {vertical-align: top !important;}
|
||||
|
||||
#noticeAcl {margin: 0;}
|
||||
</style>
|
||||
<?php if($objectType == 'custom' and empty($libs)):?>
|
||||
<?php echo html::a(helper::createLink('doc', 'createLib', "type=custom&objectID=$objectID"), '<i class="icon icon-plus"></i> ' . $lang->doc->createLib, '', 'class="iframe hidden createCustomLib"');?>
|
||||
<?php endif;?>
|
||||
<div id="mainContent" class="main-content">
|
||||
<form class="load-indicator main-form form-ajax" id="dataform" method='post' enctype='multipart/form-data'>
|
||||
<table class='table table-form'>
|
||||
<tbody>
|
||||
<tr id='headerBox'>
|
||||
<td class="doc-title" colspan='4'><?php echo html::input('title', '', "placeholder='{$lang->doc->titlePlaceholder}' class='form-control' required");?></td>
|
||||
<td class="text-right"><?php echo html::submitButton('', '', 'btn btn-primary') . html::backButton('', '', 'btn');?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan='5' id="editorContent">
|
||||
<div class="main-row fade in">
|
||||
<div id='contentBox' class="main-col">
|
||||
<div class='contenthtml'><?php echo html::textarea('content', '', "style='width:100%;'");?></div>
|
||||
<div class='contentmarkdown hidden'><?php echo html::textarea('contentMarkdown', '', "style='width:100%;'");?></div>
|
||||
<?php echo html::hidden('contentType', 'html');?>
|
||||
<?php echo html::hidden('type', 'text');?>
|
||||
</div>
|
||||
<div class="basicInfoBox side-col" id="sidebar">
|
||||
<div class="sidebar-toggle"><i class="icon icon-angle-right"></i></div>
|
||||
<div class="cell" style="width: 100%">
|
||||
<div class="detail">
|
||||
<div class='detail-title'><?php echo $lang->story->legendBasicInfo;?></div>
|
||||
<table class='table table-form'>
|
||||
<tr>
|
||||
<th class='w-100px'><?php echo $lang->doc->lib;?></th>
|
||||
<td colspan="2"><?php echo html::select('lib', $libs, $libID, "class='form-control chosen' onchange=loadDocModule(this.value)");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->doc->module;?></th>
|
||||
<td colspan="2">
|
||||
<span id='moduleBox'><?php echo html::select('module', $moduleOptionMenu, $moduleID, "class='form-control chosen'");?></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->doc->keywords;?></th>
|
||||
<td colspan='2'><?php echo html::input('keywords', '', "class='form-control' placeholder='{$lang->doc->keywordsTips}'");?></td>
|
||||
</tr>
|
||||
<tr id='fileBox'>
|
||||
<th><?php echo $lang->doc->files;?></th>
|
||||
<td colspan='2'><?php echo $this->fetch('file', 'buildform');?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->doc->mailto;?></th>
|
||||
<td colspan="2">
|
||||
<div class="input-group">
|
||||
<?php
|
||||
echo html::select('mailto[]', $users, '', "multiple class='form-control picker-select' data-drop-direction='top'");
|
||||
echo $this->fetch('my', 'buildContactLists');
|
||||
?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="th-control"><?php echo $lang->doclib->control;?></th>
|
||||
<td colspan='2'>
|
||||
<?php $acl = $lib->acl == 'default' ? 'open' : $lib->acl;?>
|
||||
<?php $acl = ($lib->type == 'project' and $acl == 'private') ? 'open' : $acl;?>
|
||||
<?php echo html::radio('acl', $lang->doc->aclList, $acl, "onchange='toggleAcl(this.value, \"doc\")'");?>
|
||||
<p class='text-info' id='noticeAcl'><?php echo $lang->doc->noticeAcl['doc'][$acl];?></p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id='whiteListBox' class='hidden'>
|
||||
<th><?php echo $lang->doc->whiteList;?></th>
|
||||
<td colspan='2'>
|
||||
<div class='input-group'>
|
||||
<span class='input-group-addon groups-addon'><?php echo $lang->doclib->group?></span>
|
||||
<?php echo html::select('groups[]', $groups, '', "class='form-control picker-select' multiple data-drop-direction='top'")?>
|
||||
</div>
|
||||
<div class='input-group'>
|
||||
<span class='input-group-addon'><?php echo $lang->doclib->user?></span>
|
||||
<?php echo html::select('users[]', $users, '', "class='form-control picker-select' multiple data-drop-direction='top'")?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
<script>
|
||||
$(function()
|
||||
{
|
||||
$('.doc-title input').focus();
|
||||
|
||||
$('#sidebar').height($(document).height() - $('#headerBox').height() - $('.ke-toolbar').height());
|
||||
setTimeout(function(){$('.ke-edit-iframe, .ke-edit').height($(document).height() - 120);}, 100);
|
||||
setTimeout(function(){$('.CodeMirror').height($(document).height() - 120);}, 100);
|
||||
|
||||
$('#editorContent .icon.icon-angle-right').css('top', '50%');
|
||||
})
|
||||
</script>
|
||||
<?php js::set('docType', $docType);?>
|
||||
<?php js::set('noticeAcl', $lang->doc->noticeAcl['doc']);?>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
@@ -10,109 +10,8 @@
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<?php if($doc->contentType == 'html') include '../../common/view/kindeditor.html.php';?>
|
||||
<?php if($doc->contentType == 'markdown') include '../../common/view/markdown.html.php';?>
|
||||
<?php js::set('needUpdateContent', $doc->content != $doc->draft);?>
|
||||
<?php js::set('confirmUpdateContent', $lang->doc->confirmUpdateContent);?>
|
||||
<?php js::set('docID', $doc->id);?>
|
||||
<?php js::set('draft', $doc->draft);?>
|
||||
<div id='mainContent' class='main-content'>
|
||||
<div class='center-block'>
|
||||
<div class='main-header'>
|
||||
<h2>
|
||||
<span class='label label-id'><?php echo $doc->id;?></span>
|
||||
<?php echo html::a($this->createLink('doc', 'view', "docID=$doc->id"), $doc->title, '', "title='$doc->title'");?>
|
||||
<small> <?php echo $lang->arrow . ' ' . $lang->doc->edit;?></small>
|
||||
</h2>
|
||||
<div class='pull-right'><?php echo html::a('###', $lang->save, '', 'id="top-submit" class="btn btn-primary"');?></div>
|
||||
</div>
|
||||
<form class='load-indicator main-form form-ajax' method='post' enctype='multipart/form-data' id='dataform'>
|
||||
<table class='table table-form'>
|
||||
<tr>
|
||||
<th class='w-110px'><?php echo $lang->doc->lib;?></th>
|
||||
<td> <?php echo html::select('lib', $libs, $doc->lib, "class='form-control chosen' onchange=loadDocModule(this.value)");?> </td><td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->doc->module;?></th>
|
||||
<td>
|
||||
<span id='moduleBox'><?php echo html::select('module', $moduleOptionMenu, $doc->module, "class='form-control chosen'");?></span>
|
||||
</td><td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->doc->title;?></th>
|
||||
<td colspan='2'><?php echo html::input('title', $doc->title, "class='form-control' required");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->doc->keywords;?></th>
|
||||
<td colspan='2'><?php echo html::input('keywords', $doc->keywords, "class='form-control' placeholder='{$lang->doc->keywordsTips}'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->doc->type;?></th>
|
||||
<td>
|
||||
<?php
|
||||
$typeList = $lang->doc->types;
|
||||
if(!isset($lang->doc->types[$doc->type])) $typeList = $lang->doc->typeList;
|
||||
echo html::radio('type', array($doc->type => zget($typeList, $doc->type)), $doc->type);
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id='contentBox' <?php if($doc->type == 'url') echo "class='hidden'"?>>
|
||||
<th><?php echo $lang->doc->content;?></th>
|
||||
<td colspan='2'><?php echo html::textarea('content', $doc->type == 'url' ? '' : htmlSpecialString($doc->content), "style='width:100%; height:200px'") . html::hidden('contentType', $doc->contentType);?></td>
|
||||
</tr>
|
||||
<tr id='urlBox' <?php if($doc->type != 'url') echo "class='hidden'"?>>
|
||||
<th><?php echo $lang->doc->url;?></th>
|
||||
<td colspan='2'><?php echo html::input('url', $doc->type == 'url' ? $doc->content : '', "class='form-control'");?></td>
|
||||
</tr>
|
||||
<tr id='fileBox'>
|
||||
<th><?php echo $lang->doc->files;?></th>
|
||||
<td colspan='2'><?php echo $this->fetch('file', 'buildform');?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->doc->mailto;?></th>
|
||||
<td colspan="2">
|
||||
<div class="input-group">
|
||||
<?php
|
||||
echo html::select('mailto[]', $users, $doc->mailto, "multiple class='form-control picker-select' data-drop-direction='top'");
|
||||
echo $this->fetch('my', 'buildContactLists');
|
||||
?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->doclib->control;?></th>
|
||||
<td colspan='2'>
|
||||
<?php $acl = $lib->acl == 'private' ? 'private' : $doc->acl;?>
|
||||
<?php echo html::radio('acl', $lang->doc->aclList, $acl, "onchange='toggleAcl(this.value, \"doc\")'")?>
|
||||
<span class='text-info' id='noticeAcl'><?php echo $lang->doc->noticeAcl['doc'][$acl];?></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id='whiteListBox' class='hidden'>
|
||||
<th><?php echo $lang->doc->whiteList;?></th>
|
||||
<td colspan='2'>
|
||||
<div class='input-group w-p100'>
|
||||
<span class='input-group-addon groups-addon'><?php echo $lang->doclib->group?></span>
|
||||
<?php echo html::select('groups[]', $groups, $doc->groups, "class='form-control picker-select' multiple data-drop-direction='top'")?>
|
||||
</div>
|
||||
<div class='input-group w-p100'>
|
||||
<span class='input-group-addon'><?php echo $lang->doclib->user?></span>
|
||||
<?php echo html::select('users[]', $users, $doc->users, "class='form-control picker-select' multiple data-drop-direction='top'")?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan='3' class='text-center form-actions'>
|
||||
<?php
|
||||
echo html::hidden('editedDate', $doc->editedDate);
|
||||
echo html::submitButton();
|
||||
echo html::backButton($lang->goback, "data-app='{$app->tab}'");
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<?php js::set('noticeAcl', $lang->doc->noticeAcl['doc']);?>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
<?php if($doc->type == 'text'):?>
|
||||
<?php include 'edittexttype.html.php';?>
|
||||
<?php else:?>
|
||||
<?php include 'editothertype.html.php';?>
|
||||
<?php endif;?>
|
||||
|
||||
@@ -0,0 +1,118 @@
|
||||
<?php
|
||||
/**
|
||||
* The edit view of doc module of ZenTaoPMS.
|
||||
*
|
||||
* @copyright Copyright 2009-2015 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
|
||||
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
|
||||
* @author Jia Fu <fujia@cnezsoft.com>
|
||||
* @package doc
|
||||
* @version $Id: edit.html.php 975 2010-07-29 03:30:25Z jajacn@126.com $
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<?php if($doc->contentType == 'html') include '../../common/view/kindeditor.html.php';?>
|
||||
<?php if($doc->contentType == 'markdown') include '../../common/view/markdown.html.php';?>
|
||||
<?php js::set('needUpdateContent', $doc->content != $doc->draft);?>
|
||||
<?php js::set('confirmUpdateContent', $lang->doc->confirmUpdateContent);?>
|
||||
<?php js::set('docID', $doc->id);?>
|
||||
<?php js::set('draft', $doc->draft);?>
|
||||
<div id='mainContent' class='main-content'>
|
||||
<div class='center-block'>
|
||||
<div class='main-header'>
|
||||
<h2>
|
||||
<span class='label label-id'><?php echo $doc->id;?></span>
|
||||
<?php echo html::a($this->createLink('doc', 'view', "docID=$doc->id"), $doc->title, '', "title='$doc->title'");?>
|
||||
<small> <?php echo $lang->arrow . ' ' . $lang->doc->edit;?></small>
|
||||
</h2>
|
||||
<div class='pull-right'><?php echo html::a('###', $lang->save, '', 'id="top-submit" class="btn btn-primary"');?></div>
|
||||
</div>
|
||||
<form class='load-indicator main-form form-ajax' method='post' enctype='multipart/form-data' id='dataform'>
|
||||
<table class='table table-form'>
|
||||
<tr>
|
||||
<th class='w-110px'><?php echo $lang->doc->lib;?></th>
|
||||
<td> <?php echo html::select('lib', $libs, $doc->lib, "class='form-control chosen' onchange=loadDocModule(this.value)");?> </td><td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->doc->module;?></th>
|
||||
<td>
|
||||
<span id='moduleBox'><?php echo html::select('module', $moduleOptionMenu, $doc->module, "class='form-control chosen'");?></span>
|
||||
</td><td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->doc->title;?></th>
|
||||
<td colspan='2'><?php echo html::input('title', $doc->title, "class='form-control' required");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->doc->keywords;?></th>
|
||||
<td colspan='2'><?php echo html::input('keywords', $doc->keywords, "class='form-control' placeholder='{$lang->doc->keywordsTips}'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->doc->type;?></th>
|
||||
<td>
|
||||
<?php
|
||||
$typeList = $lang->doc->types;
|
||||
if(!isset($lang->doc->types[$doc->type])) $typeList = $lang->doc->typeList;
|
||||
echo html::radio('type', array($doc->type => zget($typeList, $doc->type)), $doc->type);
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id='contentBox' <?php if($doc->type == 'url') echo "class='hidden'"?>>
|
||||
<th><?php echo $lang->doc->content;?></th>
|
||||
<td colspan='2'><?php echo html::textarea('content', $doc->type == 'url' ? '' : htmlSpecialString($doc->content), "style='width:100%; height:200px'") . html::hidden('contentType', $doc->contentType);?></td>
|
||||
</tr>
|
||||
<tr id='urlBox' <?php if($doc->type != 'url') echo "class='hidden'"?>>
|
||||
<th><?php echo $lang->doc->url;?></th>
|
||||
<td colspan='2'><?php echo html::input('url', $doc->type == 'url' ? $doc->content : '', "class='form-control'");?></td>
|
||||
</tr>
|
||||
<tr id='fileBox'>
|
||||
<th><?php echo $lang->doc->files;?></th>
|
||||
<td colspan='2'><?php echo $this->fetch('file', 'buildform');?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->doc->mailto;?></th>
|
||||
<td colspan="2">
|
||||
<div class="input-group">
|
||||
<?php
|
||||
echo html::select('mailto[]', $users, $doc->mailto, "multiple class='form-control picker-select' data-drop-direction='top'");
|
||||
echo $this->fetch('my', 'buildContactLists');
|
||||
?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->doclib->control;?></th>
|
||||
<td colspan='2'>
|
||||
<?php $acl = $lib->acl == 'private' ? 'private' : $doc->acl;?>
|
||||
<?php echo html::radio('acl', $lang->doc->aclList, $acl, "onchange='toggleAcl(this.value, \"doc\")'")?>
|
||||
<span class='text-info' id='noticeAcl'><?php echo $lang->doc->noticeAcl['doc'][$acl];?></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id='whiteListBox' class='hidden'>
|
||||
<th><?php echo $lang->doc->whiteList;?></th>
|
||||
<td colspan='2'>
|
||||
<div class='input-group w-p100'>
|
||||
<span class='input-group-addon groups-addon'><?php echo $lang->doclib->group?></span>
|
||||
<?php echo html::select('groups[]', $groups, $doc->groups, "class='form-control picker-select' multiple data-drop-direction='top'")?>
|
||||
</div>
|
||||
<div class='input-group w-p100'>
|
||||
<span class='input-group-addon'><?php echo $lang->doclib->user?></span>
|
||||
<?php echo html::select('users[]', $users, $doc->users, "class='form-control picker-select' multiple data-drop-direction='top'")?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan='3' class='text-center form-actions'>
|
||||
<?php
|
||||
echo html::hidden('editedDate', $doc->editedDate);
|
||||
echo html::submitButton();
|
||||
echo html::backButton($lang->goback, "data-app='{$app->tab}'");
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<?php js::set('noticeAcl', $lang->doc->noticeAcl['doc']);?>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
@@ -0,0 +1,158 @@
|
||||
<?php
|
||||
/**
|
||||
* The create view of doc module of ZenTaoPMS.
|
||||
*
|
||||
* @copyright Copyright 2009-2015 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
|
||||
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
|
||||
* @author Jia Fu <fujia@cnezsoft.com>
|
||||
* @package doc
|
||||
* @version $Id: create.html.php 975 2010-07-29 03:30:25Z jajacn@126.com $
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<?php if($doc->contentType == 'html') include '../../common/view/kindeditor.html.php';?>
|
||||
<?php if($doc->contentType == 'markdown') include '../../common/view/markdown.html.php';?>
|
||||
<?php js::set('needUpdateContent', $doc->content != $doc->draft);?>
|
||||
<?php js::set('confirmUpdateContent', $lang->doc->confirmUpdateContent);?>
|
||||
<?php js::set('docID', $doc->id);?>
|
||||
<?php js::set('draft', $doc->draft);?>
|
||||
<?php js::set('holders', $lang->doc->placeholder);?>
|
||||
<?php js::set('type', 'doc');?>
|
||||
<style>
|
||||
#main {padding: 0;}
|
||||
.container {padding: 0 !important;}
|
||||
#mainContent {padding: 0 !important;}
|
||||
#dataform {overflow: hidden}
|
||||
.doc-title input {border: unset; font-size: 18px; font-weight: bold; color: #3c4353; padding-left: 16px;}
|
||||
.doc-title .form-control:focus {border: unset; box-shadow: unset;}
|
||||
.doc-title input::-webkit-input-placeholder {color: #D8DBDE;}
|
||||
.doc-title.required:after {top: 4px; right: 0; left: 12px; display: inline-table;}
|
||||
#submit {margin-right: 12px;}
|
||||
#headerBox {border-bottom: 1px solid #e3e3e3;}
|
||||
#editorContent {padding: 0;}
|
||||
|
||||
#contentBox {padding: 0; width: 100%;}
|
||||
.ke-container {overflow: visible;}
|
||||
.ke-container, .contentmarkdown {border: unset; background: #efefef;}
|
||||
.ke-container.focus {box-shadow: unset; border-color: unset;}
|
||||
.ke-toolbar {padding-left: 20px; width: 150%; height: 29px; border-bottom: unset;}
|
||||
.ke-edit {border-top: 1px solid rgb(220, 220, 220)}
|
||||
.ke-edit, .CodeMirror {margin-left: 20px; background: #fff;}
|
||||
.kindeditor-ph {padding-left: 20px !important;}
|
||||
.editor-toolbar {background: #fff; padding-left: 20px; border-right: unset; border-top: unset; height: 29px;}
|
||||
.hide-sidebar .ke-edit {padding-right: 20px;}
|
||||
.hide-sidebar .CodeMirror {padding-right: 50px;}
|
||||
.CodeMirror.CodeMirror-wrap {border-left: 0; border-right: 0; border-bottom: 0;}
|
||||
|
||||
#sidebar {top: 29px;}
|
||||
#sidebar .sidebar-toggle {right: 0; left: 0px; background: #efefef; border-radius: 0px; width: 20px; border-top: 1px solid rgb(220, 220, 220);}
|
||||
#sidebar > .sidebar-toggle:hover {background: #efefef;}
|
||||
#sidebar {width: 500px;}
|
||||
#sidebar table {margin-top: 5px;}
|
||||
#sidebar table th {font-weight: 400 !important;}
|
||||
.hide-sidebar #sidebar > .sidebar-toggle > .icon:before {content: "\e314";}
|
||||
.hide-sidebar #sidebar > .sidebar-toggle {left: -20px; z-index: 9;}
|
||||
#sidebar .cell {border-top: 1px solid rgb(220, 220, 220); border-radius: 0px;}
|
||||
#sidebar>.sidebar-toggle>.icon.icon-angle-right {left: 4px;}
|
||||
|
||||
.th-control {vertical-align: top !important;}
|
||||
|
||||
#noticeAcl {margin: 0;}
|
||||
</style>
|
||||
<div id="mainContent" class="main-content">
|
||||
<form class="load-indicator main-form form-ajax" id="dataform" method='post' enctype='multipart/form-data'>
|
||||
<table class='table table-form'>
|
||||
<tbody>
|
||||
<tr id='headerBox'>
|
||||
<td class="doc-title" colspan='4'><?php echo html::input('title', $doc->title, "placeholder='{$lang->doc->titlePlaceholder}' class='form-control' required");?></td>
|
||||
<td class="text-right"><?php echo html::submitButton('', '', 'btn btn-primary') . html::backButton('', '', 'btn');?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan='5' id="editorContent">
|
||||
<div class="main-row fade in">
|
||||
<div id='contentBox' class="main-col">
|
||||
<div class='contenthtml'><?php echo html::textarea('content', htmlSpecialString($doc->content), "style='width:100%;'");?></div>
|
||||
<?php echo html::hidden('contentType', $doc->contentType);?>
|
||||
<?php echo html::hidden('type', 'text');?>
|
||||
<?php echo html::hidden('editedDate', $doc->editedDate);?>
|
||||
</div>
|
||||
<div class="basicInfoBox side-col" id="sidebar">
|
||||
<div class="sidebar-toggle"><i class="icon icon-angle-right"></i></div>
|
||||
<div class="cell" style="width: 100%">
|
||||
<div class="detail">
|
||||
<div class='detail-title'><?php echo $lang->story->legendBasicInfo;?></div>
|
||||
<table class='table table-form'>
|
||||
<tr>
|
||||
<th class='w-100px'><?php echo $lang->doc->lib;?></th>
|
||||
<td colspan="2" class="required"><?php echo html::select('lib', $libs, $doc->lib, "class='form-control chosen' onchange=loadDocModule(this.value)");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->doc->module;?></th>
|
||||
<td colspan="2">
|
||||
<span id='moduleBox'><?php echo html::select('module', $moduleOptionMenu, $doc->module, "class='form-control chosen'");?></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->doc->keywords;?></th>
|
||||
<td colspan='2'><?php echo html::input('keywords', $doc->keywords, "class='form-control' placeholder='{$lang->doc->keywordsTips}'");?></td>
|
||||
</tr>
|
||||
<tr id='fileBox'>
|
||||
<th><?php echo $lang->doc->files;?></th>
|
||||
<td colspan='2'><?php echo $this->fetch('file', 'buildform');?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->doc->mailto;?></th>
|
||||
<td colspan="2">
|
||||
<div class="input-group">
|
||||
<?php
|
||||
echo html::select('mailto[]', $users, $doc->mailto, "multiple class='form-control picker-select' data-drop-direction='top'");
|
||||
echo $this->fetch('my', 'buildContactLists');
|
||||
?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="th-control"><?php echo $lang->doclib->control;?></th>
|
||||
<td colspan='2'>
|
||||
<?php $acl = $lib->acl == 'private' ? 'private' : $doc->acl;?>
|
||||
<?php echo html::radio('acl', $lang->doc->aclList, $acl, "onchange='toggleAcl(this.value, \"doc\")'")?>
|
||||
<p class='text-info' id='noticeAcl'><?php echo $lang->doc->noticeAcl['doc'][$acl];?></p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id='whiteListBox' class='hidden'>
|
||||
<th><?php echo $lang->doc->whiteList;?></th>
|
||||
<td colspan='2'>
|
||||
<div class='input-group w-p100'>
|
||||
<span class='input-group-addon groups-addon'><?php echo $lang->doclib->group?></span>
|
||||
<?php echo html::select('groups[]', $groups, $doc->groups, "class='form-control picker-select' multiple data-drop-direction='top'")?>
|
||||
</div>
|
||||
<div class='input-group w-p100'>
|
||||
<span class='input-group-addon'><?php echo $lang->doclib->user?></span>
|
||||
<?php echo html::select('users[]', $users, $doc->users, "class='form-control picker-select' multiple data-drop-direction='top'")?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
<script>
|
||||
$(function()
|
||||
{
|
||||
$('.doc-title input').focus();
|
||||
|
||||
$('#sidebar').height($(document).height() - 120);
|
||||
setTimeout(function(){$('.ke-edit-iframe, .ke-edit').height($(document).height() - 120);}, 100);
|
||||
setTimeout(function(){$('.CodeMirror').height($(document).height() - 120);}, 100);
|
||||
})
|
||||
</script>
|
||||
<?php js::set('noticeAcl', $lang->doc->noticeAcl['doc']);?>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
@@ -21,12 +21,19 @@
|
||||
<table class='table table-form'>
|
||||
<tr>
|
||||
<th class='w-80px'><?php echo $lang->doc->libType;?></th>
|
||||
<?php if($config->vision == 'lite'):?>
|
||||
<?php $globalList = $lang->doc->libTypeList;?>
|
||||
<?php else:?>
|
||||
<?php $globalList = $lang->doc->libTypeList + $lang->doc->libGlobalList;?>
|
||||
<?php endif;?>
|
||||
<td class='w-p90'><?php echo html::radio('objectType', $globalList, key($globalList));?></td>
|
||||
<td class='w-p90'><?php echo html::radio('objectType', $globalTypeList, $defaultType, "onchange=loadDocLibs(this.value)");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='w-100px'><?php echo $lang->doc->lib;?></th>
|
||||
<td class='w-p90'><?php echo html::select('lib', $libs, '', "class='form-control chosen'");?></td>
|
||||
</tr>
|
||||
<tr id='docType'>
|
||||
<th><?php echo $lang->doc->type;?></th>
|
||||
<?php
|
||||
$typeKeyList = array();
|
||||
foreach($lang->doc->types as $typeKey => $typeName) $typeKeyList[$typeKey] = $typeKey;
|
||||
?>
|
||||
<td><?php echo html::radio('type', $lang->doc->types, 'text');?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan='3' class='text-center form-actions'><?php echo html::submitButton($lang->confirm);?></td>
|
||||
|
||||
@@ -6267,7 +6267,7 @@ class upgradeModel extends model
|
||||
|
||||
foreach($stories as $storyID => $story)
|
||||
{
|
||||
if(!empty($story->assingnedTo))
|
||||
if(!empty($story->assignedTo))
|
||||
{
|
||||
$story->reviewer = $story->assingnedTo;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user