Merge branch 'release/zentaopms_18.3' of https://gitlab.zcorp.cc/easycorp/zentaopms into release/zentaopms_18.3
This commit is contained in:
@@ -11,7 +11,7 @@ $config->api->struct = new stdClass();
|
||||
$config->api->struct->requiredFields = 'name,params';
|
||||
|
||||
$config->api->create = new stdclass();
|
||||
$config->api->create->requiredFields = 'lib,title,path';
|
||||
$config->api->create->requiredFields = 'title,path';
|
||||
|
||||
$config->api->edit = new stdclass();
|
||||
$config->api->edit->requiredFields = 'lib,title,path';
|
||||
|
||||
@@ -96,7 +96,7 @@ class api extends control
|
||||
$this->view->moduleID = $moduleID;
|
||||
$this->view->libTree = $this->api->getLibTree($libID, $libs, $objectID);
|
||||
$this->view->users = $this->user->getPairs('noclosed,noletter');
|
||||
$this->view->objectDropdown = $this->generateLibsDropMenu($libs[$libID], $release);
|
||||
$this->view->objectDropdown = isset($libs[$libID]) ? $this->generateLibsDropMenu($libs[$libID], $release) : '';
|
||||
|
||||
$this->display();
|
||||
}
|
||||
@@ -373,11 +373,12 @@ class api extends control
|
||||
/**
|
||||
* Create a api doc library.
|
||||
*
|
||||
* @param string normal|demo
|
||||
* @param string $type project|product
|
||||
* @param int $objectID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function createLib($type = 'product')
|
||||
public function createLib($type = 'product', $objectID = 0)
|
||||
{
|
||||
if(empty($type)) $type = 'product';
|
||||
|
||||
@@ -401,6 +402,7 @@ class api extends control
|
||||
$this->lang->api->aclList['default'] = sprintf($this->lang->api->aclList['default'], $this->lang->{$type}->common);
|
||||
|
||||
$this->view->type = $type;
|
||||
$this->view->objectID = $objectID;
|
||||
$this->view->groups = $this->loadModel('group')->getPairs();
|
||||
$this->view->users = $this->user->getPairs('nocode|noclosed');
|
||||
$this->view->projects = $this->loadModel('project')->getPairsByModel();
|
||||
@@ -544,7 +546,7 @@ class api extends control
|
||||
$libName = isset($lib->name) ? $lib->name . $this->lang->colon : '';
|
||||
|
||||
$this->getTypeOptions($libID);
|
||||
$this->view->gobackLink = $this->createLink('api', 'index', "libID=$libID&moduleID=$moduleID");
|
||||
$this->view->gobackLink = '';
|
||||
$this->view->user = $this->app->user->account;
|
||||
$this->view->allUsers = $this->loadModel('user')->getPairs('devfirst|noclosed');
|
||||
$this->view->libID = $libID;
|
||||
|
||||
@@ -62,7 +62,10 @@ js::set('struct_paramsType', $lang->struct->paramsType);
|
||||
<tbody>
|
||||
<tr>
|
||||
<th class='w-110px'><?php echo $lang->api->lib;?></th>
|
||||
<td> <?php echo html::select('lib', $libs, $libID, "class='form-control chosen' onchange=loadDocModule(this.value)");?> </td>
|
||||
<td>
|
||||
<?php echo html::select('selectedLib', $libs, $libID, "class='form-control chosen' disabled");?>
|
||||
<?php echo html::hidden('lib', $libID);?>
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -223,7 +226,7 @@ js::set('struct_paramsType', $lang->struct->paramsType);
|
||||
<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::backButton($lang->goback, "data-app='{$app->tab}' class='btn btn-back btn-wide'");?>
|
||||
<?php if(!empty($gobackLink)) echo html::a($gobackLink, $lang->goback, '', "class='btn btn-back btn-wide'");?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -31,13 +31,13 @@
|
||||
<tr id='productBox'>
|
||||
<th><?php echo $lang->api->product;?></th>
|
||||
<td class='required'>
|
||||
<span><?php echo html::select('product', $products, 0, "class='form-control chosen'")?></span>
|
||||
<span><?php echo html::select('product', $products, $objectID, "class='form-control chosen'")?></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id='projectBox' class='hidden'>
|
||||
<th><?php echo $lang->api->project;?></th>
|
||||
<td class='required'>
|
||||
<span><?php echo html::select('project', $projects, 0, "class='form-control chosen'")?></span>
|
||||
<span><?php echo html::select('project', $projects, $objectID, "class='form-control chosen'")?></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
@@ -24,9 +24,9 @@
|
||||
<?php
|
||||
if(common::hasPriv('api', 'struct')) echo html::a($this->createLink('api', 'struct', "libID=$libID"), "<i class='icon-treemap muted'> </i>" . $lang->api->struct, '', "class='btn btn-link'");
|
||||
if(common::hasPriv('api', 'releases')) echo html::a($this->createLink('api', 'releases', "libID=$libID", 'html', true), "<i class='icon-version muted'> </i>" . $lang->api->releases, '', "class='btn btn-link iframe' data-width='800px'");
|
||||
if(common::hasPriv('api', 'createRelease')) echo html::a($this->createLink('api', 'createRelease', "libID=$libID", 'html', true), "<i class='icon-publish muted'> </i>" . $lang->api->createRelease, '', "class='btn btn-link iframe' data-width='800px'");
|
||||
if(common::hasPriv('api', 'createRelease')) echo html::a($this->createLink('api', 'createRelease', "libID=$libID"), "<i class='icon-publish muted'> </i>" . $lang->api->createRelease, '', "class='btn btn-link iframe' data-width='800px'");
|
||||
//if(common::hasPriv('api', 'export')) echo html::a($this->createLink('api', 'export', "libID=$libID", 'html', true), "<i class='icon-export muted'> </i>" . $lang->export, '', "class='btn btn-link export' id='export'");
|
||||
if(common::hasPriv('api', 'createLib')) echo html::a($this->createLink('api', 'createLib', "type=" . ($objectType == 'project' ? 'project' : 'product')), '<i class="icon icon-plus"></i> ' . $lang->api->createLib, '', 'class="btn btn-secondary iframe" data-width="800px"');
|
||||
if(common::hasPriv('api', 'createLib')) echo html::a($this->createLink('api', 'createLib', "type=" . ($objectType == 'project' ? 'project' : 'product') . "&objectID=$objectID"), '<i class="icon icon-plus"></i> ' . $lang->api->createLib, '', 'class="btn btn-secondary iframe" data-width="800px"');
|
||||
if(common::hasPriv('api', 'create')) echo html::a($this->createLink('api', 'create', "libID=$libID&moduleID=$moduleID"), '<i class="icon icon-plus"></i> ' . $lang->api->createApi, '', 'class="btn btn-primary"');
|
||||
?>
|
||||
</div>
|
||||
@@ -57,10 +57,10 @@
|
||||
<?php if(common::hasPriv('tree', 'browse')):?>
|
||||
<li data-method="addCataLib" data-has-children='%hasChildren%' data-libid='%libID%' data-moduleid="%moduleID%" data-type="add"><a><i class="icon icon-controls"></i><?php echo $lang->doc->libDropdown['addModule'];?></a></li>
|
||||
<?php endif;?>
|
||||
<?php if(common::hasPriv('doc', 'editLib')):?>
|
||||
<li data-method="editLib"><a href='<?php echo inlink('editLib', 'libID=%libID%');?>' data-toggle='modal' data-type='iframe'><i class="icon icon-edit"></i><?php echo $lang->doc->libDropdown['editLib'];?></a></li>
|
||||
<?php if(common::hasPriv('api', 'editLib')):?>
|
||||
<li data-method="editLib"><a href='<?php echo inlink('editLib', 'libID=%libID%');?>' data-toggle='modal' data-type='iframe'><i class="icon icon-edit"></i><?php echo $lang->api->libDropdown['editLib'];?></a></li>
|
||||
<?php endif;?>
|
||||
<?php if(common::hasPriv('doc', 'deleteLib')):?>
|
||||
<?php if(common::hasPriv('api', 'deleteLib')):?>
|
||||
<li data-method="deleteLib"><a href='<?php echo inlink('deleteLib', 'libID=%libID%');?>' target='hiddenwin'><i class="icon icon-trash"></i><?php echo $lang->doc->libDropdown['deleteLib'];?></a></li>
|
||||
<?php endif;?>
|
||||
</ul>
|
||||
|
||||
@@ -15,7 +15,6 @@ $(function()
|
||||
|
||||
$('iframe.ke-edit-iframe').contents().find('.article-content').css('padding', '20px 20px 0 20px');
|
||||
|
||||
toggleAcl($('input[name="acl"]:checked').val(), 'doc');
|
||||
setTimeout(function(){initPage(docType)}, 50);
|
||||
if(typeof(window.editor) != 'undefined')
|
||||
{
|
||||
|
||||
@@ -63,6 +63,7 @@ $lang->doc->project = $lang->projectCommon;
|
||||
$lang->doc->execution = $lang->execution->common;
|
||||
$lang->doc->lib = 'Bibliothek';
|
||||
$lang->doc->module = 'Modul';
|
||||
$lang->doc->libAndModule = 'Bibliothek & Modul';
|
||||
$lang->doc->object = 'Object';
|
||||
$lang->doc->title = 'Titel';
|
||||
$lang->doc->digest = 'Zusammenfassung';
|
||||
@@ -195,9 +196,8 @@ $lang->doc->libIconList['custom'] = 'icon-folder-o';
|
||||
$lang->doc->systemLibs['product'] = $lang->productCommon . 'Dok Bibliothek';
|
||||
$lang->doc->systemLibs['execution'] = $lang->executionCommon . 'Dok Bibliothek';
|
||||
|
||||
$lang->doc->aclList['open'] = 'Öffentlich';
|
||||
$lang->doc->aclList['custom'] = 'Eigene';
|
||||
$lang->doc->aclList['private'] = 'Privat';
|
||||
$lang->doc->aclList['open'] = "Öffentlich <span class='text-gray'>(Access with library permissions)</span>";
|
||||
$lang->doc->aclList['private'] = "Privat <span class='text-gray'>(Only creators and whitelist users can access)</span>";
|
||||
|
||||
$lang->doc->typeList['html'] = 'Html';
|
||||
$lang->doc->typeList['markdown'] = 'Markdown';
|
||||
@@ -207,7 +207,6 @@ $lang->doc->typeList['ppt'] = 'PPT';
|
||||
$lang->doc->typeList['excel'] = 'Excel';
|
||||
|
||||
$lang->doc->createList['html'] = 'Create Document';
|
||||
$lang->doc->createList['api'] = 'Create API';
|
||||
$lang->doc->createList['template'] = 'Create By Template';
|
||||
$lang->doc->createList['word'] = 'Word';
|
||||
$lang->doc->createList['ppt'] = 'PPT';
|
||||
@@ -294,7 +293,8 @@ $lang->doc->noticeAcl['doc']['custom'] = 'Users in the whiltelist can access it
|
||||
$lang->doc->noticeAcl['doc']['private'] = 'Only the one who created it can access it.';
|
||||
|
||||
$lang->doc->placeholder = new stdclass();
|
||||
$lang->doc->placeholder->url = 'Url';
|
||||
$lang->doc->placeholder->url = 'URL';
|
||||
$lang->doc->placeholder->execution = 'When the execution is empty, the document is created in the project library';
|
||||
|
||||
$lang->doc->summary = "Total files on this page: <strong>%s</strong> , total size: <strong>%s</strong>, <strong>%s</strong>.";
|
||||
$lang->doc->ge = ':';
|
||||
|
||||
@@ -63,6 +63,7 @@ $lang->doc->project = $lang->projectCommon;
|
||||
$lang->doc->execution = $lang->execution->common;
|
||||
$lang->doc->lib = 'Library';
|
||||
$lang->doc->module = 'Catalog';
|
||||
$lang->doc->libAndModule = 'Library & Catalog';
|
||||
$lang->doc->object = 'Object';
|
||||
$lang->doc->title = 'Name';
|
||||
$lang->doc->digest = 'Summary';
|
||||
@@ -195,9 +196,8 @@ $lang->doc->libIconList['custom'] = 'icon-folder-o';
|
||||
$lang->doc->systemLibs['product'] = $lang->productCommon;
|
||||
$lang->doc->systemLibs['execution'] = $lang->executionCommon;
|
||||
|
||||
$lang->doc->aclList['open'] = 'Public';
|
||||
$lang->doc->aclList['custom'] = 'Custom';
|
||||
$lang->doc->aclList['private'] = 'Private';
|
||||
$lang->doc->aclList['open'] = "Public <span class='text-gray'>(Access with library permissions)</span>";
|
||||
$lang->doc->aclList['private'] = "Private <span class='text-gray'>(Only creators and whitelist users can access)</span>";
|
||||
|
||||
$lang->doc->typeList['html'] = 'Html';
|
||||
$lang->doc->typeList['markdown'] = 'Markdown';
|
||||
@@ -207,7 +207,6 @@ $lang->doc->typeList['ppt'] = 'PPT';
|
||||
$lang->doc->typeList['excel'] = 'Excel';
|
||||
|
||||
$lang->doc->createList['html'] = 'Create Document';
|
||||
$lang->doc->createList['api'] = 'Create API';
|
||||
$lang->doc->createList['template'] = 'Create By Template';
|
||||
$lang->doc->createList['word'] = 'Word';
|
||||
$lang->doc->createList['ppt'] = 'PPT';
|
||||
@@ -294,7 +293,8 @@ $lang->doc->noticeAcl['doc']['custom'] = 'Users in the whiltelist can access it
|
||||
$lang->doc->noticeAcl['doc']['private'] = 'Only the one who created it can access it.';
|
||||
|
||||
$lang->doc->placeholder = new stdclass();
|
||||
$lang->doc->placeholder->url = 'URL';
|
||||
$lang->doc->placeholder->url = 'URL';
|
||||
$lang->doc->placeholder->execution = 'When the execution is empty, the document is created in the project library';
|
||||
|
||||
$lang->doc->summary = "Total files on this page: <strong>%s</strong> , total size: <strong>%s</strong>, <strong>%s</strong>.";
|
||||
$lang->doc->ge = ':';
|
||||
|
||||
@@ -63,6 +63,7 @@ $lang->doc->project = $lang->projectCommon;
|
||||
$lang->doc->execution = $lang->execution->common;
|
||||
$lang->doc->lib = 'Bibliothèque';
|
||||
$lang->doc->module = 'Catégorie';
|
||||
$lang->doc->libAndModule = 'Library & Catalog';
|
||||
$lang->doc->object = 'Object';
|
||||
$lang->doc->title = 'Nom';
|
||||
$lang->doc->digest = 'Résumé';
|
||||
@@ -195,9 +196,8 @@ $lang->doc->libIconList['custom'] = 'icon-folder-o';
|
||||
$lang->doc->systemLibs['product'] = $lang->productCommon;
|
||||
$lang->doc->systemLibs['execution'] = $lang->executionCommon;
|
||||
|
||||
$lang->doc->aclList['open'] = 'Public';
|
||||
$lang->doc->aclList['custom'] = 'Person.';
|
||||
$lang->doc->aclList['private'] = 'Privé';
|
||||
$lang->doc->aclList['open'] = "Public <span class='text-gray'>(Access with library permissions)</span>";
|
||||
$lang->doc->aclList['private'] = "Privé <span class='text-gray'>(Only creators and whitelist users can access)</span>";
|
||||
|
||||
$lang->doc->typeList['html'] = 'Html';
|
||||
$lang->doc->typeList['markdown'] = 'Markdown';
|
||||
@@ -294,7 +294,8 @@ $lang->doc->noticeAcl['doc']['custom'] = 'Les utilisateurs de la Liste Blanche
|
||||
$lang->doc->noticeAcl['doc']['private'] = 'Seulement celui qui a ajouté le document peut y accéder.';
|
||||
|
||||
$lang->doc->placeholder = new stdclass();
|
||||
$lang->doc->placeholder->url = 'URL';
|
||||
$lang->doc->placeholder->url = 'URL';
|
||||
$lang->doc->placeholder->execution = 'When the execution is empty, the document is created in the project library';
|
||||
|
||||
$lang->doc->summary = "Total files on this page: <strong>%s</strong> , total size: <strong>%s</strong>, <strong>%s</strong>.";
|
||||
$lang->doc->ge = ':';
|
||||
|
||||
@@ -749,6 +749,7 @@ class docModel extends model
|
||||
->get();
|
||||
|
||||
$doc->contentMarkdown = $this->post->contentMarkdown;
|
||||
if($doc->acl == 'open') $doc->users = $doc->groups = '';
|
||||
if(empty($doc->lib) and strpos($doc->module, '_') !== false) list($doc->lib, $doc->module) = explode('_', $doc->module);
|
||||
if(empty($doc->lib)) return dao::$errors['lib'] = sprintf($this->lang->error->notempty, $this->lang->doc->lib);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user