finish api release.
This commit is contained in:
@@ -15,7 +15,12 @@ $config->api->create->requiredFields = 'lib,title,path';
|
||||
$config->api->edit = new stdclass();
|
||||
$config->api->edit->requiredFields = 'lib,title,path';
|
||||
|
||||
$config->api->publish = new stdclass();
|
||||
$config->api->publish->requiredFields = 'version';
|
||||
|
||||
$config->api->editor = new stdclass();
|
||||
$config->api->editor->createlib = array('id' => 'desc', 'tools' => 'simpleTools');
|
||||
$config->api->editor->create = array('id' => 'desc', 'tools' => 'simpleTools');
|
||||
$config->api->editor->edit = array('id' => 'desc', 'tools' => 'simpleTools');
|
||||
$config->api->editor->publish = array('id' => 'desc', 'tools' => 'simpleTools');
|
||||
|
||||
|
||||
Regular → Executable
+37
-4
@@ -76,6 +76,38 @@ class api extends control
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/**
|
||||
* Publish a api doc lib.
|
||||
*
|
||||
* @param $libID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function publish($libID)
|
||||
{
|
||||
$lib = $this->doc->getLibById($libID);
|
||||
|
||||
if(!empty($_POST)) {
|
||||
$data = fixer::input('post')
|
||||
->add('lib', $libID)
|
||||
->add('addedBy', $this->app->user->account)
|
||||
->add('addedDate', helper::now())
|
||||
->get();
|
||||
|
||||
// check version is exist.
|
||||
if($this->api->getReleaseByVersion($data->version))
|
||||
{
|
||||
return $this->sendError($this->lang->api->noUniqueVersion);
|
||||
}
|
||||
$this->api->publishLib($data);
|
||||
if(dao::isError()) return $this->sendError(dao::getError());
|
||||
return $this->sendSuccess(array('locate' => $this->createLink('api', 'index', "libID=$libID")));
|
||||
}
|
||||
|
||||
$this->view->title = $this->lang->api->publish . $lib->name;
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/**
|
||||
* Api doc global struct page.
|
||||
*
|
||||
@@ -159,6 +191,7 @@ class api extends control
|
||||
*/
|
||||
public function editStruct($libID, $structID)
|
||||
{
|
||||
common::setMenuVars('doc', $libID);
|
||||
$struct = $this->api->getStructByID($structID);
|
||||
|
||||
if(!empty($_POST))
|
||||
@@ -321,7 +354,6 @@ class api extends control
|
||||
return $this->sendError(dao::getError());
|
||||
}
|
||||
|
||||
$this->action->create('api', $apiID, 'Edited');
|
||||
return $this->sendSuccess(array('locate' => helper::createLink('api', 'index', "libID=0&moduleID=0&apiID=$apiID")));
|
||||
}
|
||||
|
||||
@@ -345,9 +377,9 @@ class api extends control
|
||||
'value' => $key,
|
||||
];
|
||||
}
|
||||
$this->view->typeOptions = $options;
|
||||
$this->view->user = $this->app->user->account;
|
||||
$this->view->allUsers = $this->loadModel('user')->getPairs('devfirst|noclosed');;
|
||||
$this->view->typeOptions = $options;
|
||||
$this->view->user = $this->app->user->account;
|
||||
$this->view->allUsers = $this->loadModel('user')->getPairs('devfirst|noclosed');;
|
||||
$this->view->moduleOptionMenu = $this->loadModel('tree')->getOptionMenu($api->lib, 'api', $startModuleID = 0);
|
||||
$this->view->moduleID = $api->module ? (int)$api->module : (int)$this->cookie->lastDocModule;
|
||||
$this->view->example = $example;
|
||||
@@ -517,6 +549,7 @@ class api extends control
|
||||
// global struct link
|
||||
$menu = '';
|
||||
|
||||
$menu .= html::a(helper::createLink('api', 'publish', "libID=$libID"), $this->lang->api->publish, '', 'class="btn btn-link iframe"');
|
||||
// page of index menu
|
||||
if(intval($libID) > 0)
|
||||
{
|
||||
|
||||
@@ -3,9 +3,9 @@ var app = new Vue({
|
||||
data: {
|
||||
header: [],
|
||||
queryP: [],
|
||||
body: [],
|
||||
params: "",
|
||||
body: "",
|
||||
response: "",
|
||||
params: "",
|
||||
defaultHeader: [
|
||||
{ field: '', required: '', desc: '' }
|
||||
],
|
||||
@@ -33,7 +33,7 @@ var app = new Vue({
|
||||
},
|
||||
deep: true
|
||||
},
|
||||
params: {
|
||||
body: {
|
||||
handler() {
|
||||
this.setParams()
|
||||
},
|
||||
@@ -42,7 +42,7 @@ var app = new Vue({
|
||||
},
|
||||
methods: {
|
||||
changeAttr(val) {
|
||||
this.params = JSON.stringify(val)
|
||||
this.body = val
|
||||
},
|
||||
changeRes(val) {
|
||||
this.response = JSON.stringify(val)
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
console.log(struct)
|
||||
new Vue({
|
||||
el: '#app',
|
||||
data: function () {
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
$(document).ready(function()
|
||||
{
|
||||
$('#apiForm').ajaxForm({
|
||||
success: (data) => {
|
||||
if (data.result == 'success') {
|
||||
if (data.locate) {
|
||||
window.parent.location.href = data.locate
|
||||
}
|
||||
$.zui.closeModal()
|
||||
}
|
||||
}
|
||||
})
|
||||
});
|
||||
Regular → Executable
+3
@@ -14,6 +14,7 @@ $lang->api->common = 'API接口';
|
||||
$lang->api->getModel = '超级model调用接口';
|
||||
$lang->api->sql = 'SQL查询接口';
|
||||
|
||||
$lang->api->publish = '发布';
|
||||
$lang->api->edit = '编辑';
|
||||
$lang->api->delete = '删除';
|
||||
$lang->api->position = '位置';
|
||||
@@ -29,6 +30,8 @@ $lang->api->noParam = 'GET方式调试不需要输入参数,';
|
||||
$lang->api->noModule = '接口库下没有目录,请先维护目录';
|
||||
$lang->api->post = 'POST方式调试请参照页面表单';
|
||||
$lang->api->noUniqueName = '接口库名已存在。';
|
||||
$lang->api->noUniqueVersion = '版本已存在。';
|
||||
$lang->api->version = '版本';
|
||||
$lang->api->createLib = '创建接口库';
|
||||
$lang->api->createStruct = '创建数据结构';
|
||||
$lang->api->editStruct = '修改数据结构';
|
||||
|
||||
+100
-3
@@ -28,6 +28,59 @@ class apiModel extends model
|
||||
/* Params. */
|
||||
const PARAMS_TYPE_CUSTOM = 'custom';
|
||||
|
||||
/**
|
||||
* @param object $data
|
||||
* @access public
|
||||
* @return int
|
||||
*/
|
||||
public function publishLib($data)
|
||||
{
|
||||
/* Get lib modules list. */
|
||||
$modules = $this->dao->select('*')->from(TABLE_MODULE)
|
||||
->where('root')->eq((int)$data->lib)
|
||||
->andWhere('type')->eq('api')
|
||||
->andWhere('deleted')->eq(0)
|
||||
->orderBy('grade desc, `order`')
|
||||
->fetchAll();
|
||||
|
||||
/* Get all api list. */
|
||||
$apis = $this->dao->select('id,version')->from(TABLE_API)
|
||||
->where('lib')->eq($data->lib)
|
||||
->andWhere('deleted')->eq(0)
|
||||
->fetchAll();
|
||||
|
||||
/* Get all struct list. */
|
||||
$structs = $this->dao->select('id,version')->from(TABLE_APISTRUCT)
|
||||
->where('lib')->eq($data->lib)
|
||||
->andWhere('deleted')->eq(0)
|
||||
->fetchAll();
|
||||
|
||||
$snap = array('modules' => $modules, 'apis' => $apis, 'structs' => $structs);
|
||||
|
||||
$data->snap = json_encode($snap);
|
||||
$this->dao->insert(TABLE_API_LIB_RELEASE)->data($data)
|
||||
->autoCheck()
|
||||
->batchCheck($this->config->api->publish->requiredFields, 'notempty')
|
||||
->exec();
|
||||
|
||||
return dao::isError() ? false : $this->dao->lastInsertID();
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete a lib publish.
|
||||
*
|
||||
* @param int $id
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function deletePublish($id)
|
||||
{
|
||||
$this->dao->update(TABLE_API_LIB_RELEASE)
|
||||
->set('deleted')->eq(1)
|
||||
->where('id')->eq($id)
|
||||
->exec();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an api doc.
|
||||
*
|
||||
@@ -54,11 +107,24 @@ class apiModel extends model
|
||||
*/
|
||||
public function createStruct($data)
|
||||
{
|
||||
$data->version = 1;
|
||||
$this->dao->insert(TABLE_APISTRUCT)->data($data)
|
||||
->autoCheck()
|
||||
->batchCheck($this->config->api->struct->requiredFields, 'notempty')
|
||||
->exec();
|
||||
|
||||
/* Create a struct version. */
|
||||
$version = array(
|
||||
'name' => $data->name,
|
||||
'type' => $data->type,
|
||||
'desc' => $data->desc,
|
||||
'version' => $data->version,
|
||||
'attribute' => $data->attribute,
|
||||
'addedBy' => $data->addedBy,
|
||||
'addedDate' => $data->addedDate
|
||||
);
|
||||
$this->dao->insert(TABLE_APISTRUCT_SPEC)->data($version)->exec();
|
||||
|
||||
return dao::isError() ? 0 : $this->dao->lastInsertID();
|
||||
}
|
||||
|
||||
@@ -77,6 +143,8 @@ class apiModel extends model
|
||||
unset($data->addedBy);
|
||||
unset($data->addedDate);
|
||||
|
||||
$data->version = $old->version + 1;
|
||||
|
||||
$this->dao->update(TABLE_APISTRUCT)
|
||||
->data($data)->autoCheck()
|
||||
->batchCheck($this->config->api->struct->requiredFields, 'notempty')
|
||||
@@ -85,6 +153,18 @@ class apiModel extends model
|
||||
|
||||
if(dao::isError()) return false;
|
||||
|
||||
/* Create a struct version */
|
||||
$version = array(
|
||||
'name' => $data->name,
|
||||
'type' => $data->type,
|
||||
'desc' => $data->desc,
|
||||
'version' => $data->version,
|
||||
'attribute' => $data->attribute,
|
||||
'addedBy' => $data->editedBy,
|
||||
'addedDate' => $data->editedDate
|
||||
);
|
||||
$this->dao->insert(TABLE_APISTRUCT_SPEC)->data($version)->exec();
|
||||
|
||||
return common::createChanges($old, $data);
|
||||
}
|
||||
|
||||
@@ -170,6 +250,23 @@ class apiModel extends model
|
||||
return $model;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get release by version.
|
||||
*
|
||||
* @param $version
|
||||
* @access public
|
||||
* @return object
|
||||
*/
|
||||
public function getReleaseByVersion($version)
|
||||
{
|
||||
$model = $this->dao->select('*')
|
||||
->from(TABLE_API_LIB_RELEASE)
|
||||
->where('version')->eq($version)
|
||||
->fetch();
|
||||
if($model) $model->snap = json_decode(htmlspecialchars_decode($model->snap), true);
|
||||
return $model;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get api doc by id.
|
||||
@@ -249,7 +346,7 @@ class apiModel extends model
|
||||
public static function getApiStatusText($status)
|
||||
{
|
||||
global $lang;
|
||||
switch($status)
|
||||
switch ($status)
|
||||
{
|
||||
case static::STATUS_DOING:
|
||||
{
|
||||
@@ -432,12 +529,12 @@ class apiModel extends model
|
||||
}
|
||||
else
|
||||
{
|
||||
while($row = $stmt->fetch()) $rows[$row->$keyField] = $row;
|
||||
while ($row = $stmt->fetch()) $rows[$row->$keyField] = $row;
|
||||
}
|
||||
|
||||
$result['status'] = 'success';
|
||||
$result['data'] = $rows;
|
||||
} catch(PDOException $e)
|
||||
} catch (PDOException $e)
|
||||
{
|
||||
$result['status'] = 'fail';
|
||||
$result['message'] = $e->getMessage();
|
||||
|
||||
+140
-128
@@ -17,10 +17,10 @@
|
||||
<ul class='dropdown-menu api-version-menu'
|
||||
style='max-height:240px; max-width: 300px; overflow-y:auto'>
|
||||
<?php for($version = $api->version; $version > 0; $version--):?>
|
||||
<li>
|
||||
<a href='javascript:void(0)'
|
||||
data-url='<?php echo $this->createLink('api', 'index', "libID=0&moduleID=0&apiID=$apiID&version=$version");?>'>#<?php echo $version;?></a>
|
||||
</li>
|
||||
<li>
|
||||
<a href='javascript:void(0)'
|
||||
data-url='<?php echo $this->createLink('api', 'index', "libID=0&moduleID=0&apiID=$apiID&version=$version");?>'>#<?php echo $version;?></a>
|
||||
</li>
|
||||
<?php endfor;?>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -35,7 +35,7 @@
|
||||
$deleteURL = $this->createLink('api', 'delete', "apiID=$api->id&confirm=yes");
|
||||
echo html::a("javascript:ajaxDeleteApi(\"$deleteURL\", confirmDelete)", '<i class="icon-trash"></i>', '', "title='{$lang->api->delete}' class='btn btn-link'");
|
||||
}
|
||||
;?>
|
||||
;?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -43,121 +43,133 @@
|
||||
<h2 class="title" title="<?php echo $api->title;?>"><?php echo $api->title;?></h2>
|
||||
<div class="desc"><?php echo $api->desc;?></div>
|
||||
<?php if($api->params['header']):?>
|
||||
<h3 class="title"><?php echo $lang->api->header;?></h3>
|
||||
<table class="table table-data paramsTable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><?php echo $lang->api->req->name;?></th>
|
||||
<th><?php echo $lang->api->req->type;?></th>
|
||||
<th><?php echo $lang->api->req->required;?></th>
|
||||
<th><?php echo $lang->api->req->desc;?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach($api->params['header'] as $param):?>
|
||||
<tr>
|
||||
<td><?php echo $param['field'];?></td>
|
||||
<td>
|
||||
String
|
||||
</td>
|
||||
<td><?php echo $param['required'] ? '是' : '否';?></td>
|
||||
<td><?php echo $param['desc'];?></td>
|
||||
<tr>
|
||||
<?php endforeach;
|
||||
;?>
|
||||
</tbody>
|
||||
</table>
|
||||
<h3 class="title"><?php echo $lang->api->header;?></h3>
|
||||
<table class="table table-data paramsTable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><?php echo $lang->api->req->name;?></th>
|
||||
<th><?php echo $lang->api->req->type;?></th>
|
||||
<th><?php echo $lang->api->req->required;?></th>
|
||||
<th><?php echo $lang->api->req->desc;?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach($api->params['header'] as $param):?>
|
||||
<tr>
|
||||
<td><?php echo $param['field'];?></td>
|
||||
<td>
|
||||
String
|
||||
</td>
|
||||
<td><?php echo $param['required'] ? '是' : '否';?></td>
|
||||
<td><?php echo $param['desc'];?></td>
|
||||
<tr>
|
||||
<?php endforeach;
|
||||
;?>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php endif;?>
|
||||
<?php if($api->params['query']):?>
|
||||
<h3 class="title"><?php echo $lang->api->query;?></h3>
|
||||
<table class="table table-data paramsTable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><?php echo $lang->api->req->name;?></th>
|
||||
<th><?php echo $lang->api->req->type;?></th>
|
||||
<th><?php echo $lang->api->req->required;?></th>
|
||||
<th><?php echo $lang->api->req->desc;?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach($api->params['query'] as $param):?>
|
||||
<tr>
|
||||
<td><?php echo $param['field'];?></td>
|
||||
<td>
|
||||
String
|
||||
</td>
|
||||
<td><?php echo $param['required'] ? '是' : '否';?></td>
|
||||
<td><?php echo $param['desc'];?></td>
|
||||
<tr>
|
||||
<?php endforeach;
|
||||
;?>
|
||||
</tbody>
|
||||
</table>
|
||||
<h3 class="title"><?php echo $lang->api->query;?></h3>
|
||||
<table class="table table-data paramsTable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><?php echo $lang->api->req->name;?></th>
|
||||
<th><?php echo $lang->api->req->type;?></th>
|
||||
<th><?php echo $lang->api->req->required;?></th>
|
||||
<th><?php echo $lang->api->req->desc;?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach($api->params['query'] as $param):?>
|
||||
<tr>
|
||||
<td><?php echo $param['field'];?></td>
|
||||
<td>
|
||||
String
|
||||
</td>
|
||||
<td><?php echo $param['required'] ? '是' : '否';?></td>
|
||||
<td><?php echo $param['desc'];?></td>
|
||||
<tr>
|
||||
<?php endforeach;
|
||||
;?>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php endif;?>
|
||||
<?php
|
||||
function parseTree($data) {
|
||||
$str = '<tr>';
|
||||
$str .= '<td>'. $data['field'] .'</td>';
|
||||
$str .= '<td>'. $data['paramsType'] .'</td>';
|
||||
function parseTree($data, $level = 0)
|
||||
{
|
||||
$str = '<tr>';
|
||||
$field = '';
|
||||
for($i=0; $i < $level; $i++)
|
||||
{
|
||||
$field .= ' ';
|
||||
}
|
||||
$field .= $data['field'];
|
||||
$str .= '<td>' . $field . '</td>';
|
||||
$str .= '<td>' . $data['paramsType'] . '</td>';
|
||||
$require = $data['required'] ? '是' : '否';
|
||||
$str .= '<td>'. $require .'</td>';
|
||||
$str .= '<td>'. $data['desc'] .'</td>';
|
||||
$str .= '</tr>';
|
||||
if(isset($data['children']) && count($data['children']) > 0) {
|
||||
foreach($data['children'] as $item) {
|
||||
$str .= parseTree($item);
|
||||
$str .= '<td>' . $require . '</td>';
|
||||
$str .= '<td>' . $data['desc'] . '</td>';
|
||||
$str .= '</tr>';
|
||||
if(isset($data['children']) && count($data['children']) > 0)
|
||||
{
|
||||
$level++;
|
||||
foreach($data['children'] as $item)
|
||||
{
|
||||
$str .= parseTree($item, $level);
|
||||
}
|
||||
}
|
||||
return $str;
|
||||
}
|
||||
?>
|
||||
<?php if($api->params['params']):?>
|
||||
<h3 class="title"><?php echo $lang->api->params;?></h3>
|
||||
<table class="table table-data paramsTable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><?php echo $lang->api->req->name;?></th>
|
||||
<th><?php echo $lang->api->req->type;?></th>
|
||||
<th><?php echo $lang->api->req->required;?></th>
|
||||
<th><?php echo $lang->api->req->desc;?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
foreach($api->params['params'] as $item) {
|
||||
echo parseTree($item);
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
<h3 class="title"><?php echo $lang->api->params;?></h3>
|
||||
<table class="table table-data paramsTable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><?php echo $lang->api->req->name;?></th>
|
||||
<th><?php echo $lang->api->req->type;?></th>
|
||||
<th><?php echo $lang->api->req->required;?></th>
|
||||
<th><?php echo $lang->api->req->desc;?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
foreach($api->params['params'] as $item)
|
||||
{
|
||||
echo parseTree($item);
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php endif;?>
|
||||
<?php if($api->paramsExample):?>
|
||||
<h3 class="title"><?php echo $lang->api->paramsExample;?></h3>
|
||||
<pre><code><?php echo $api->paramsExample;?></code></pre>
|
||||
<h3 class="title"><?php echo $lang->api->paramsExample;?></h3>
|
||||
<pre><code><?php echo $api->paramsExample;?></code></pre>
|
||||
<?php endif;?>
|
||||
<?php if($api->response):?>
|
||||
<h3 class="title"><?php echo $lang->api->response;?></h3>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><?php echo $lang->api->req->name;?></th>
|
||||
<th><?php echo $lang->api->req->type;?></th>
|
||||
<th><?php echo $lang->api->req->required;?></th>
|
||||
<th><?php echo $lang->api->req->desc;?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
foreach($api->response as $item) {
|
||||
echo parseTree($item);
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
<h3 class="title"><?php echo $lang->api->response;?></h3>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><?php echo $lang->api->req->name;?></th>
|
||||
<th><?php echo $lang->api->req->type;?></th>
|
||||
<th><?php echo $lang->api->req->required;?></th>
|
||||
<th><?php echo $lang->api->req->desc;?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
foreach($api->response as $item)
|
||||
{
|
||||
echo parseTree($item);
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php endif;?>
|
||||
<?php if($api->responseExample):?>
|
||||
<h3><?php echo $lang->api->responseExample;?></h3>
|
||||
<pre><code><?php echo $api->responseExample;?></code></pre>
|
||||
<h3><?php echo $lang->api->responseExample;?></h3>
|
||||
<pre><code><?php echo $api->responseExample;?></code></pre>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
</div>
|
||||
@@ -166,7 +178,7 @@
|
||||
<?php
|
||||
$canBeChanged = common::canBeChanged('api', $api);
|
||||
if($canBeChanged) $actionFormLink = $this->createLink('action', 'comment', "objectType=doc&objectID=$api->id");
|
||||
;?>
|
||||
;?>
|
||||
<?php include '../../common/view/action.html.php';?>
|
||||
</div>
|
||||
</div>
|
||||
@@ -180,30 +192,30 @@
|
||||
<div class="detail-content">
|
||||
<table class="table table-data">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th class='c-lib'><?php echo $lang->api->lib;?></th>
|
||||
<td><?php echo $api->libName;?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->doc->module;?></th>
|
||||
<td><?php echo $api->moduleName ? $api->moduleName : '/';?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->doc->addedDate;?></th>
|
||||
<td><?php echo $api->addedDate;?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->api->owner;?></th>
|
||||
<td><?php echo zget($users, $api->owner, '');?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->doc->editedBy;?></th>
|
||||
<td><?php echo zget($users, $api->editedBy, '');?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->doc->editedDate;?></th>
|
||||
<td><?php echo $api->editedDate;?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='c-lib'><?php echo $lang->api->lib;?></th>
|
||||
<td><?php echo $api->libName;?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->doc->module;?></th>
|
||||
<td><?php echo $api->moduleName ? $api->moduleName : '/';?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->doc->addedDate;?></th>
|
||||
<td><?php echo $api->addedDate;?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->api->owner;?></th>
|
||||
<td><?php echo zget($users, $api->owner, '');?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->doc->editedBy;?></th>
|
||||
<td><?php echo zget($users, $api->editedBy, '');?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->doc->editedDate;?></th>
|
||||
<td><?php echo $api->editedDate;?></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
<?php
|
||||
/**
|
||||
* The createlib 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)
|
||||
* @author Jia Fu <fujia@cnezsoft.com>
|
||||
* @package doc
|
||||
* @version $Id: createlib.html.php 975 2010-07-29 03:30:25Z jajacn@126.com $
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.lite.html.php';?>
|
||||
<?php include '../../common/view/chosen.html.php';?>
|
||||
<?php include '../../common/view/kindeditor.html.php';?>
|
||||
<div id="main">
|
||||
<div class="container">
|
||||
<div id='mainContent' class='main-content'>
|
||||
<div class='center-block'>
|
||||
<div class='main-header'>
|
||||
<h2><?php echo $lang->api->publish;?></h2>
|
||||
</div>
|
||||
<form class='load-indicator main-form' id="apiForm" method='post' enctype='multipart/form-data'>
|
||||
<table class='table table-form'>
|
||||
<tr>
|
||||
<th><?php echo $lang->api->version?></th>
|
||||
<td style="width: 80%"><?php echo html::input('version', '', "class='form-control'")?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->api->desc;?></th>
|
||||
<td colspan='2'>
|
||||
<?php echo html::textarea('desc', '', "rows='8' class='form-control kindeditor' hidefocus='true' tabindex=''");?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='text-center form-actions' colspan='2'><?php echo html::submitButton();?></td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php include '../../common/view/footer.lite.html.php';?>
|
||||
Reference in New Issue
Block a user