* Reformat code style.

This commit is contained in:
zhujinyong
2021-10-19 13:21:22 +08:00
parent 64af527b27
commit 68e738fdd7
8 changed files with 172 additions and 176 deletions
+16 -14
View File
@@ -1,27 +1,29 @@
<?php
$config->api = new stdClass();
$config->api->createlib = new stdclass();
$config->api = new stdClass();
$config->api->createlib = new stdclass();
$config->api->createlib->requiredFields = 'name';
$config->api->editlib = new stdclass();
$config->api->editlib = new stdclass();
$config->api->editlib->requiredFields = 'name';
$config->api->struct = new stdClass();
$config->api->struct = new stdClass();
$config->api->struct->requiredFields = 'name,params';
$config->api->create = new stdclass();
$config->api->create = new stdclass();
$config->api->create->requiredFields = 'lib,title,path';
$config->api->edit = new stdclass();
$config->api->edit = new stdclass();
$config->api->edit->requiredFields = 'lib,title,path';
$config->api->publish = new stdclass();
$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->editlib = 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');
$config->api->editor = new stdclass();
$config->api->editor->createlib = array('id' => 'desc', 'tools' => 'simpleTools');
$config->api->editor->editlib = 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');
$config->api->editor->createstruct = array('id' => 'desc', 'tools' => 'simpleTools');
$config->api->editor->editstruct = array('id' => 'desc', 'tools' => 'simpleTools');
+40 -40
View File
@@ -10,10 +10,10 @@
* @link http://www.zentao.net
*/
?>
<?php include '../../common/view/header.html.php'; ?>
<?php include '../../common/view/kindeditor.html.php'; ?>
<?php js::set('example', $example); ?>
<?php js::set('libID', $libID); ?>
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/kindeditor.html.php';?>
<?php js::set('example', $example);?>
<?php js::set('libID', $libID);?>
<?php
js::set('typeOptions', $typeOptions);
js::set('langField', $lang->struct->field);
@@ -27,7 +27,7 @@ js::set('struct_action', $lang->struct->action);
js::set('struct_required', $lang->struct->required);
js::set('struct_paramsType', $lang->struct->paramsType);
?>
<?php js::import($jsRoot . 'vue/vue.js'); ?>
<?php js::import($jsRoot . 'vue/vue.js');?>
<div class='modal fade' id='filterStruct'>
<div class='modal-dialog mw-500px'>
<div class='modal-content'>
@@ -35,20 +35,20 @@ js::set('struct_paramsType', $lang->struct->paramsType);
<button type='button' class='close' data-dismiss='modal'>
<i class='icon icon-close'></i>
</button>
<h4 class='modal-title'><?php echo $lang->api->struct; ?></h4>
<h4 class='modal-title'><?php echo $lang->api->struct;?></h4>
</div>
<div class='modal-body'>
<table class='table table-form'>
<tbody>
<tr>
<td> <?php echo html::select('filter', $allStruct, '', "class='form-control chosen filterSelect'"); ?> </td>
<td> <?php echo html::select('filter', $allStruct, '', "class='form-control chosen filterSelect'");?> </td>
<td></td>
</tr>
</tbody>
</table>
</div>
<div class="modal-footer">
<?php echo html::submitButton($lang->confirm, '', 'btn btn-wide btn-primary submit-filter'); ?>
<?php echo html::submitButton($lang->confirm, '', 'btn btn-wide btn-primary submit-filter');?>
</div>
</div>
</div>
@@ -56,66 +56,66 @@ js::set('struct_paramsType', $lang->struct->paramsType);
<div id="mainContent" class="main-content">
<div class='center-block' id="apiApp">
<div class='main-header'>
<h2><?php echo $lang->api->create; ?></h2>
<h2><?php echo $lang->api->create;?></h2>
</div>
<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->api->lib; ?></th>
<td> <?php echo html::select('lib', $libs, $libID, "class='form-control chosen' onchange=loadDocModule(this.value)"); ?> </td>
<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></td>
</tr>
<tr>
<th><?php echo $lang->api->module; ?></th>
<th><?php echo $lang->api->module;?></th>
<td>
<span
id='moduleBox'><?php echo html::select('module', $moduleOptionMenu, $moduleID, "class='form-control chosen'"); ?></span>
id='moduleBox'><?php echo html::select('module', $moduleOptionMenu, $moduleID, "class='form-control chosen'");?></span>
</td>
<td></td>
</tr>
<tr>
<th><?php echo $lang->api->formTitle; ?></th>
<td colspan='2'><?php echo html::input('title', '', "class='form-control' required"); ?></td>
<th><?php echo $lang->api->formTitle;?></th>
<td colspan='2'><?php echo html::input('title', '', "class='form-control' required");?></td>
</tr>
<tr>
<th><?php echo $lang->api->path; ?></th>
<th><?php echo $lang->api->path;?></th>
<td colspan='2'>
<div class='table-row'>
<div class='table-col col-prefix'>
<?php echo html::select('protocol', $lang->api->protocalOptions, 'HTTP', "class='form-control chosen'"); ?>
<?php echo html::select('protocol', $lang->api->protocalOptions, 'HTTP', "class='form-control chosen'");?>
</div>
<div class='table-col col-prefix'>
<?php echo html::select('method', $lang->api->methodOptions, 'GET', "class='form-control chosen'"); ?>
<?php echo html::select('method', $lang->api->methodOptions, 'GET', "class='form-control chosen'");?>
</div>
<div class='table-col'>
<?php echo html::input('path', '', "class='form-control'"); ?>
<?php echo html::input('path', '', "class='form-control'");?>
</div>
</div>
</td>
</tr>
<tr>
<th><?php echo $lang->api->requestType; ?></th>
<th><?php echo $lang->api->requestType;?></th>
<td>
<span id='moduleBox'><?php echo html::select('requestType', $lang->api->requestTypeOptions, 'application/json', "class='form-control chosen'"); ?></span>
<span id='moduleBox'><?php echo html::select('requestType', $lang->api->requestTypeOptions, 'application/json', "class='form-control chosen'");?></span>
</td>
</tr>
<tr>
<th><?php echo $lang->api->status; ?></th>
<td><?php echo html::radio('status', $lang->api->statusOptions, apiModel::STATUS_DONE); ?></td>
<th><?php echo $lang->api->status;?></th>
<td><?php echo html::radio('status', $lang->api->statusOptions, apiModel::STATUS_DONE);?></td>
</tr>
<tr>
<th>
<nobr><?php echo $lang->api->owner; ?></nobr>
<nobr><?php echo $lang->api->owner;?></nobr>
</th>
<td>
<div class='input-group'>
<?php echo html::select('owner', $allUsers, $user, "class='form-control chosen'"); ?>
<?php echo html::select('owner', $allUsers, $user, "class='form-control chosen'");?>
</div>
</td>
</tr>
<tr>
<th><?php echo $lang->api->header; ?></th>
<th><?php echo $lang->api->header;?></th>
<td colspan="2">
<table class="table table-data">
<thead>
@@ -150,7 +150,7 @@ js::set('struct_paramsType', $lang->struct->paramsType);
</td>
</tr>
<tr>
<th><?php echo $lang->api->query; ?></th>
<th><?php echo $lang->api->query;?></th>
<td colspan="2">
<table class="table table-data">
<thead>
@@ -185,7 +185,7 @@ js::set('struct_paramsType', $lang->struct->paramsType);
</td>
</tr>
<tr>
<th><?php echo $lang->api->params; ?></th>
<th><?php echo $lang->api->params;?></th>
<td colspan='2'>
<body-field @change="changeAttr"></body-field>
<input type="hidden" name="params" v-model="params">
@@ -193,16 +193,16 @@ js::set('struct_paramsType', $lang->struct->paramsType);
</tr>
<tr>
<th>
<nobr><?php echo $lang->api->paramsExample; ?></nobr>
<nobr><?php echo $lang->api->paramsExample;?></nobr>
</th>
<td>
<div class='input-group'>
<?php echo html::textarea('paramsExample', '', "style='width:100%;height:200px'"); ?>
<?php echo html::textarea('paramsExample', '', "style='width:100%;height:200px'");?>
</div>
</td>
</tr>
<tr>
<th><?php echo $lang->api->response; ?></th>
<th><?php echo $lang->api->response;?></th>
<td colspan='2' id='responseDiv'>
<body-field @change="changeRes" :struct-type="'json'" :show-type="false"></body-field>
<input type="hidden" name="response" v-model="response">
@@ -210,25 +210,25 @@ js::set('struct_paramsType', $lang->struct->paramsType);
</tr>
<tr>
<th>
<nobr><?php echo $lang->api->responseExample; ?></nobr>
<nobr><?php echo $lang->api->responseExample;?></nobr>
</th>
<td>
<div class='input-group'>
<?php echo html::textarea('responseExample', '', "style='width:100%;height:200px'"); ?>
<?php echo html::textarea('responseExample', '', "style='width:100%;height:200px'");?>
</div>
</td>
</tr>
<tr id='contentBox'>
<th><?php echo $lang->api->desc; ?></th>
<th><?php echo $lang->api->desc;?></th>
<td colspan='2'>
<div class='contenthtml'><?php echo html::textarea('desc', '', "style='width:100%;height:200px'"); ?></div>
<div class='contenthtml'><?php echo html::textarea('desc', '', "style='width:100%;height:200px'");?></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'"); ?>
<?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>
@@ -236,5 +236,5 @@ js::set('struct_paramsType', $lang->struct->paramsType);
</form>
</div>
</div>
<?php js::set('noticeAcl', $lang->noticeAcl); ?>
<?php include '../../common/view/footer.html.php'; ?>
<?php js::set('noticeAcl', $lang->noticeAcl);?>
<?php include '../../common/view/footer.html.php';?>
+16 -17
View File
@@ -9,11 +9,11 @@
* @link http://www.zentao.net
*/
?>
<?php include '../../common/view/header.html.php'; ?>
<?php include '../../common/view/chosen.html.php'; ?>
<?php include '../../common/view/kindeditor.html.php'; ?>
<?php js::import($jsRoot . 'vue/vue.js'); ?>
<?php js::set('paramsTypeOption', $lang->api->paramsScopeOptions)?>
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/chosen.html.php';?>
<?php include '../../common/view/kindeditor.html.php';?>
<?php js::import($jsRoot . 'vue/vue.js');?>
<?php js::set('paramsTypeOption', $lang->api->paramsScopeOptions);?>
<?php
js::set('typeOptions', $typeOptions);
js::set('structAdd', $lang->struct->add);
@@ -32,19 +32,14 @@ js::set('struct', '');
<div id="mainContent" class="main-content">
<div class='center-block'>
<div class='main-header'>
<h2><?php echo $lang->api->createStruct; ?></h2>
<h2><?php echo $lang->api->createStruct;?></h2>
</div>
<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->api->structName; ?></th>
<td><?php echo html::input('name', '', "class='form-control' required"); ?> </td>
<td></td>
</tr>
<tr>
<th class='w-110px'><?php echo $lang->api->desc; ?></th>
<td> <?php echo html::input('desc', '', "class='form-control'"); ?> </td>
<th class='w-110px'><?php echo $lang->api->structName;?></th>
<td><?php echo html::input('name', '', "class='form-control' required");?> </td>
<td></td>
</tr>
<tr>
@@ -54,11 +49,15 @@ js::set('struct', '');
<input type="hidden" name="attribute" v-model="attr">
</td>
</tr>
<tr>
<th class='w-110px'><?php echo $lang->api->desc;?></th>
<td colspan="2"><?php echo html::textarea('desc', '', "class='form-control'");?></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'"); ?>
<?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>
@@ -67,4 +66,4 @@ js::set('struct', '');
</div>
</div>
</div>
<?php include '../../common/view/footer.html.php'; ?>
<?php include '../../common/view/footer.html.php';?>
+47 -48
View File
@@ -10,11 +10,11 @@
* @link http://www.zentao.net
*/
?>
<?php include '../../common/view/header.html.php'; ?>
<?php include '../../common/view/kindeditor.html.php'; ?>
<?php js::import($jsRoot . 'vue/vue.js'); ?>
<?php js::set('example', $example); ?>
<?php js::set('libID', $api->lib); ?>
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/kindeditor.html.php';?>
<?php js::import($jsRoot . 'vue/vue.js');?>
<?php js::set('example', $example);?>
<?php js::set('libID', $api->lib);?>
<?php
js::set('typeOptions', $typeOptions);
js::set('langField', $lang->struct->field);
@@ -36,15 +36,14 @@ js::set('api', $api);
<button type='button' class='close' data-dismiss='modal'>
<i class='icon icon-close'></i>
</button>
<h4 class='modal-title'><?php echo $lang->api->customType; ?></h4>
<h4 class='modal-title'><?php echo $lang->api->customType;?></h4>
</div>
<div class='modal-body'>
<textarea class="form-control customTypeTextarea" rows="10" placeholder=""></textarea>
</div>
<div class="modal-footer">
<button class="btn btn-wide btn-warning formatCustom"
style="float: left"><?php echo $lang->api->format; ?></button>
<?php echo html::submitButton($lang->confirm, '', 'btn btn-wide btn-primary submit-custom'); ?>
<button class="btn btn-wide btn-warning formatCustom" style="float: left"><?php echo $lang->api->format;?></button>
<?php echo html::submitButton($lang->confirm, '', 'btn btn-wide btn-primary submit-custom');?>
</div>
</div>
</div>
@@ -52,71 +51,71 @@ js::set('api', $api);
<div id="mainContent" class="main-content">
<div class='center-block' id="apiApp">
<div class='main-header'>
<?php if($edit): ?>
<?php if($edit):?>
<h2>
<span class='label label-id'><?php echo $api->id; ?></span>
<?php echo html::a($this->createLink('api', 'index', "apiID=$api->id"), $api->title, '', "title='$api->title'"); ?>
<small> <?php echo $lang->arrow . ' ' . $lang->api->edit; ?></small>
<span class='label label-id'><?php echo $api->id;?></span>
<?php echo html::a($this->createLink('api', 'index', "apiID=$api->id"), $api->title, '', "title='$api->title'");?>
<small> <?php echo $lang->arrow . ' ' . $lang->api->edit;?></small>
</h2>
<div
class='pull-right'><?php echo html::a('###', $lang->save, '', 'id="top-submit" class="btn btn-primary"'); ?></div>
<?php else: ?>
<h2><?php echo $lang->api->create; ?></h2>
<?php endif; ?>
class='pull-right'><?php echo html::a('###', $lang->save, '', 'id="top-submit" class="btn btn-primary"');?></div>
<?php else:?>
<h2><?php echo $lang->api->create;?></h2>
<?php endif;?>
</div>
<form class="load-indicator main-form form-ajax" id="dataform" method='post' enctype='multipart/form-data'>
<table class='table table-form'>
<tbody>
<tr>
<th><?php echo $lang->api->module; ?></th>
<th><?php echo $lang->api->module;?></th>
<td>
<span
id='moduleBox'><?php echo html::select('module', $moduleOptionMenu, $moduleID, "class='form-control chosen'"); ?></span>
id='moduleBox'><?php echo html::select('module', $moduleOptionMenu, $moduleID, "class='form-control chosen'");?></span>
</td>
<td></td>
</tr>
<tr>
<th><?php echo $lang->api->formTitle; ?></th>
<td colspan='2'><?php echo html::input('title', $api->title, "class='form-control' required"); ?></td>
<th><?php echo $lang->api->formTitle;?></th>
<td colspan='2'><?php echo html::input('title', $api->title, "class='form-control' required");?></td>
</tr>
<tr>
<th><?php echo $lang->api->path; ?></th>
<td colspan='2'><?php echo html::input('path', $api->path, "class='form-control'"); ?></td>
<th><?php echo $lang->api->path;?></th>
<td colspan='2'><?php echo html::input('path', $api->path, "class='form-control'");?></td>
</tr>
<tr>
<th><?php echo $lang->api->protocol; ?></th>
<td><?php echo html::radio('protocol', $lang->api->protocalOptions, $api->protocol ? $api->protocol : 'HTTP'); ?></td>
<th><?php echo $lang->api->protocol;?></th>
<td><?php echo html::radio('protocol', $lang->api->protocalOptions, $api->protocol ? $api->protocol : 'HTTP');?></td>
</tr>
<tr>
<th><?php echo $lang->api->method; ?></th>
<th><?php echo $lang->api->method;?></th>
<td>
<span
id='moduleBox'><?php echo html::select('method', $lang->api->methodOptions, $api->method ? $api->method : 'GET', "class='form-control chosen'"); ?></span>
id='moduleBox'><?php echo html::select('method', $lang->api->methodOptions, $api->method ? $api->method : 'GET', "class='form-control chosen'");?></span>
</td>
</tr>
<tr>
<th><?php echo $lang->api->requestType; ?></th>
<th><?php echo $lang->api->requestType;?></th>
<td>
<span
id='moduleBox'><?php echo html::select('requestType', $lang->api->requestTypeOptions, $api->requestType ? $api->requestType : 'application/json', "class='form-control chosen'"); ?></span>
id='moduleBox'><?php echo html::select('requestType', $lang->api->requestTypeOptions, $api->requestType ? $api->requestType : 'application/json', "class='form-control chosen'");?></span>
</td>
</tr>
<tr>
<th><?php echo $lang->api->status; ?></th>
<td><?php echo html::radio('status', $lang->api->statusOptions, $api->status ? $api->status : apiModel::STATUS_DOING); ?></td>
<th><?php echo $lang->api->status;?></th>
<td><?php echo html::radio('status', $lang->api->statusOptions, $api->status ? $api->status : apiModel::STATUS_DOING);?></td>
</tr>
<tr>
<th>
<nobr><?php echo $lang->api->owner; ?></nobr>
<nobr><?php echo $lang->api->owner;?></nobr>
</th>
<td>
<div class='input-group'>
<?php echo html::select('owner', $allUsers, $api->owner ? $api->owner : $user, "class='form-control chosen'"); ?>
<?php echo html::select('owner', $allUsers, $api->owner ? $api->owner : $user, "class='form-control chosen'");?>
</div>
</td>
</tr>
<tr>
<th><?php echo $lang->api->header; ?></th>
<th><?php echo $lang->api->header;?></th>
<td colspan="2">
<table class="table table-data">
<thead>
@@ -151,7 +150,7 @@ js::set('api', $api);
</td>
</tr>
<tr>
<th><?php echo $lang->api->query; ?></th>
<th><?php echo $lang->api->query;?></th>
<td colspan="2">
<table class="table table-data">
<thead>
@@ -186,7 +185,7 @@ js::set('api', $api);
</td>
</tr>
<tr>
<th><?php echo $lang->api->params; ?></th>
<th><?php echo $lang->api->params;?></th>
<td colspan='2'>
<body-field @change="changeAttr" :attr="api.params.params"></body-field>
<input type="hidden" name="params" v-model="params">
@@ -194,16 +193,16 @@ js::set('api', $api);
</tr>
<tr>
<th>
<nobr><?php echo $lang->api->paramsExample; ?></nobr>
<nobr><?php echo $lang->api->paramsExample;?></nobr>
</th>
<td>
<div class='input-group'>
<?php echo html::textarea('paramsExample', $api->paramsExample, "style='width:100%;height:200px'"); ?>
<?php echo html::textarea('paramsExample', $api->paramsExample, "style='width:100%;height:200px'");?>
</div>
</td>
</tr>
<tr>
<th><?php echo $lang->api->response; ?></th>
<th><?php echo $lang->api->response;?></th>
<td colspan='2' id='responseDiv'>
<body-field @change="changeRes" :struct-type="'json'" :show-type="false" :attr="api.response"></body-field>
<input type="hidden" name="response" v-model="response">
@@ -211,25 +210,25 @@ js::set('api', $api);
</tr>
<tr>
<th>
<nobr><?php echo $lang->api->responseExample; ?></nobr>
<nobr><?php echo $lang->api->responseExample;?></nobr>
</th>
<td>
<div class='input-group'>
<?php echo html::textarea('responseExample', $api->responseExample, "style='width:100%;height:200px'"); ?>
<?php echo html::textarea('responseExample', $api->responseExample, "style='width:100%;height:200px'");?>
</div>
</td>
</tr>
<tr id='contentBox'>
<th><?php echo $lang->api->desc; ?></th>
<th><?php echo $lang->api->desc;?></th>
<td colspan='2'>
<div class='contenthtml'><?php echo html::textarea('desc', $api->desc, "style='width:100%;height:200px'"); ?></div>
<div class='contenthtml'><?php echo html::textarea('desc', $api->desc, "style='width:100%;height:200px'");?></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'"); ?>
<?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>
@@ -237,5 +236,5 @@ js::set('api', $api);
</form>
</div>
</div>
<?php js::set('noticeAcl', $lang->noticeAcl); ?>
<?php include '../../common/view/footer.html.php'; ?>
<?php js::set('noticeAcl', $lang->noticeAcl);?>
<?php include '../../common/view/footer.html.php';?>
+5 -7
View File
@@ -10,7 +10,7 @@
* @link http://www.zentao.net
*/
?>
<?php include '../../common/view/header.html.php'; ?>
<?php include '../../common/view/header.html.php';?>
<div id='mainContent' class='main-row fade'>
<div class='main-col'>
<div class="cell" id="queryBox" data-module='user'></div>
@@ -38,12 +38,10 @@
<td><?php printf('%03d', $release->id);?></td>
<td><?php echo $release->version;?></td>
<td><?php echo $release->desc;?></td>
<td><?php echo $release->addedBy ?></td>
<td class="c-date"><?php echo $release->addedDate ?></td>
<td><?php echo $release->addedBy;?></td>
<td class="c-date"><?php echo $release->addedDate;?></td>
<td class='c-actions'>
<?php
echo html::a($this->createLink('api', 'deleteRelease', "libID=$libID&id=$release->id"), '<i class="icon-trash"></i>', 'hiddenwin', "title='{$lang->api->delete}' class='btn'");
?>
<?php echo html::a($this->createLink('api', 'deleteRelease', "libID=$libID&id=$release->id"), '<i class="icon-trash"></i>', 'hiddenwin', "title='{$lang->api->delete}' class='btn'");?>
</td>
</tr>
<?php endforeach;?>
@@ -52,4 +50,4 @@
</form>
</div>
</div>
<?php include '../../common/view/footer.html.php'; ?>
<?php include '../../common/view/footer.html.php';?>
+17 -18
View File
@@ -9,11 +9,11 @@
* @link http://www.zentao.net
*/
?>
<?php include '../../common/view/header.html.php'; ?>
<?php include '../../common/view/chosen.html.php'; ?>
<?php include '../../common/view/kindeditor.html.php'; ?>
<?php js::import($jsRoot . 'vue/vue.js'); ?>
<?php js::set('paramsTypeOption', $lang->api->paramsScopeOptions)?>
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/chosen.html.php';?>
<?php include '../../common/view/kindeditor.html.php';?>
<?php js::import($jsRoot . 'vue/vue.js');?>
<?php js::set('paramsTypeOption', $lang->api->paramsScopeOptions);?>
<?php
js::set('typeOptions', $typeOptions);
js::set('structAdd', $lang->struct->add);
@@ -26,25 +26,20 @@ js::set('struct_desc', $lang->struct->desc);
js::set('struct_action', $lang->struct->action);
js::set('struct_required', $lang->struct->required);
js::set('struct_paramsType', $lang->struct->paramsType);
js::set('struct', $struct)
js::set('struct', $struct);
?>
<div id="app">
<div id="mainContent" class="main-content">
<div class='center-block'>
<div class='main-header'>
<h2><?php echo $lang->api->createStruct; ?></h2>
<h2><?php echo $lang->api->createStruct;?></h2>
</div>
<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->api->structName; ?></th>
<td><?php echo html::input('name', $struct->name, "class='form-control' required"); ?> </td>
<td></td>
</tr>
<tr>
<th class='w-110px'><?php echo $lang->api->desc; ?></th>
<td> <?php echo html::input('desc', $struct->desc, "class='form-control'"); ?> </td>
<th class='w-110px'><?php echo $lang->api->structName;?></th>
<td><?php echo html::input('name', $struct->name, "class='form-control' required");?></td>
<td></td>
</tr>
<tr>
@@ -54,11 +49,15 @@ js::set('struct', $struct)
<input type="hidden" name="attribute" v-model="attr">
</td>
</tr>
<tr>
<th class='w-110px'><?php echo $lang->api->desc;?></th>
<td colspan="2"><?php echo html::textarea('desc', $struct->desc, "class='form-control'");?></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'"); ?>
<?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>
@@ -67,4 +66,4 @@ js::set('struct', $struct)
</div>
</div>
</div>
<?php include '../../common/view/footer.html.php'; ?>
<?php include '../../common/view/footer.html.php';?>
+25 -26
View File
@@ -10,15 +10,15 @@
* @link http://www.zentao.net
*/
?>
<?php include '../../common/view/header.html.php'; ?>
<?php include '../../common/view/header.html.php';?>
<?php js::set('confirmDelete', $lang->api->confirmDelete);?>
<div class="fade main-row split-row" id="mainRow">
<?php if($libID):?>
<?php $sideWidth = common::checkNotCN() ? '270' : '238'; ?>
<div class="side-col" style="width:<?php echo $sideWidth; ?>px" data-min-width="<?php echo $sideWidth; ?>">
<?php $sideWidth = common::checkNotCN() ? '270' : '238';?>
<div class="side-col" style="width:<?php echo $sideWidth;?>px" data-min-width="<?php echo $sideWidth;?>">
<div class="cell" style="min-height: 286px">
<div id='title'>
<li class='menu-title'><?php echo $this->lang->api->module; ?></li>
<li class='menu-title'><?php echo $this->lang->api->module;?></li>
<?php
if(!$isRelease)
{
@@ -43,27 +43,27 @@
}
?>
</div>
<?php if(!$moduleTree): ?>
<?php if(!$moduleTree):?>
<hr class="space">
<div class="text-center text-muted tips"><?php echo $lang->api->noModule; ?></div>
<?php endif; ?>
<?php echo $moduleTree; ?>
<div class="text-center text-muted tips"><?php echo $lang->api->noModule;?></div>
<?php endif;?>
<?php echo $moduleTree;?>
</div>
</div>
<?php endif;?>
<?php if($apiID):?>
<?php include './content.html.php'; ?>
<?php else: ?>
<?php if(empty($libs) || empty($apiList)): ?>
<?php include './content.html.php';?>
<?php else:?>
<?php if(empty($libs) || empty($apiList)):?>
<div class="cell">
<div class="detail">
<li class="detail-title"><?php echo intval($libID) > 0 ? $lang->api->apiList : $lang->api->title; ?></li>
<li class="detail-title"><?php echo intval($libID) > 0 ? $lang->api->apiList : $lang->api->title;?></li>
</div>
<div class="detail">
<div class="no-content"><img src="<?php echo $config->webRoot . 'theme/default/images/main/no_content.png' ?>"/>
<div class="no-content"><img src="<?php echo $config->webRoot . 'theme/default/images/main/no_content.png'?>"/>
</div>
<div class="notice text-muted"><?php echo (empty($libs)) ? $lang->api->noLib : $lang->api->noApi; ?></div>
<div class="notice text-muted"><?php echo (empty($libs)) ? $lang->api->noLib : $lang->api->noApi;?></div>
<div class="no-content-button">
<?php
$html = '';
@@ -80,27 +80,26 @@
</div>
</div>
</div>
<?php else: ?>
<?php else:?>
<div class="cell">
<div class="detail">
<ul class="list-group">
<?php foreach($apiList as $api): ?>
<?php foreach($apiList as $api):?>
<li class="list-group-item">
<div class="heading <?php echo $api->method;?>">
<a href="<?php echo helper::createLink('api', 'index', "libID={$api->lib}&moduleID=0&apiID={$api->id}&version=0&release=$release") ?>">
<span class="label label-primary"><?php echo $api->method; ?></span>
<span class="label label-warning"
style="width: 60px"><?php echo apiModel::getApiStatusText($api->status); ?></span>
<span class="path"><?php echo $api->path; ?></span>
<span class="desc"><?php echo $api->title; ?></span>
<a href="<?php echo helper::createLink('api', 'index', "libID={$api->lib}&moduleID=0&apiID={$api->id}&version=0&release=$release");?>">
<span class="label label-primary"><?php echo $api->method;?></span>
<span class="label label-warning" style="width: 60px"><?php echo apiModel::getApiStatusText($api->status);?></span>
<span class="path"><?php echo $api->path;?></span>
<span class="desc"><?php echo $api->title;?></span>
</a>
</div>
</li>
<?php endforeach; ?>
<?php endforeach;?>
</ul>
</div>
</div>
<?php endif; ?>
<?php endif; ?>
<?php endif;?>
<?php endif;?>
</div>
<?php include '../../common/view/footer.html.php'; ?>
<?php include '../../common/view/footer.html.php';?>
+6 -6
View File
@@ -10,7 +10,7 @@
* @link http://www.zentao.net
*/
?>
<?php include '../../common/view/header.html.php'; ?>
<?php include '../../common/view/header.html.php';?>
<div id='mainContent' class='main-row fade'>
<div class='main-col'>
<div class="cell" id="queryBox" data-module='user'></div>
@@ -36,10 +36,10 @@
<?php foreach($structs as $struct):?>
<tr>
<td><?php printf('%03d', $struct->id);?></td>
<td><?php echo $struct->type ?></td>
<td><?php echo $struct->name ?></td>
<td><?php echo $struct->addedBy ?></td>
<td class="c-date"><?php echo $struct->addedDate ?></td>
<td><?php echo $struct->type;?></td>
<td><?php echo $struct->name;?></td>
<td><?php echo $struct->addedBy;?></td>
<td class="c-date"><?php echo $struct->addedDate;?></td>
<td class='c-actions'>
<?php
echo html::a($this->createLink('api', 'editStruct', "libID=$libID&structID=$struct->id"), '<i class="icon-edit"></i>', '', "title='{$lang->api->edit}' class='btn'");
@@ -53,4 +53,4 @@
</form>
</div>
</div>
<?php include '../../common/view/footer.html.php'; ?>
<?php include '../../common/view/footer.html.php';?>