From 68e738fdd79439a1da395593dcefa4338621479e Mon Sep 17 00:00:00 2001 From: zhujinyong Date: Tue, 19 Oct 2021 13:21:22 +0800 Subject: [PATCH] * Reformat code style. --- module/api/config.php | 30 +++++---- module/api/view/create.html.php | 80 +++++++++++----------- module/api/view/createstruct.html.php | 33 +++++----- module/api/view/edit.html.php | 95 +++++++++++++-------------- module/api/view/editpublish.html.php | 12 ++-- module/api/view/editstruct.html.php | 35 +++++----- module/api/view/index.html.php | 51 +++++++------- module/api/view/struct.html.php | 12 ++-- 8 files changed, 172 insertions(+), 176 deletions(-) diff --git a/module/api/config.php b/module/api/config.php index ab48a047d3..61fc3a5985 100644 --- a/module/api/config.php +++ b/module/api/config.php @@ -1,27 +1,29 @@ 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'); diff --git a/module/api/view/create.html.php b/module/api/view/create.html.php index a26d9c2e82..65612b5690 100644 --- a/module/api/view/create.html.php +++ b/module/api/view/create.html.php @@ -10,10 +10,10 @@ * @link http://www.zentao.net */ ?> - - - - + + + + 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); ?> - + @@ -56,66 +56,66 @@ js::set('struct_paramsType', $lang->struct->paramsType);
-

api->create; ?>

+

api->create;?>

- - + + - + - - + + - + - + - - + + - +
api->lib; ?> api->lib;?>
api->module; ?>api->module;?> + id='moduleBox'>
api->formTitle; ?>api->formTitle;?>
api->path; ?>api->path;?>
- api->protocalOptions, 'HTTP', "class='form-control chosen'"); ?> + api->protocalOptions, 'HTTP', "class='form-control chosen'");?>
- api->methodOptions, 'GET', "class='form-control chosen'"); ?> + api->methodOptions, 'GET', "class='form-control chosen'");?>
- +
api->requestType; ?>api->requestType;?> - api->requestTypeOptions, 'application/json', "class='form-control chosen'"); ?> + api->requestTypeOptions, 'application/json', "class='form-control chosen'");?>
api->status; ?>api->statusOptions, apiModel::STATUS_DONE); ?>api->status;?>api->statusOptions, apiModel::STATUS_DONE);?>
- api->owner; ?> + api->owner;?>
- +
api->header; ?>api->header;?> @@ -150,7 +150,7 @@ js::set('struct_paramsType', $lang->struct->paramsType); - +
api->query; ?>api->query;?> @@ -185,7 +185,7 @@ js::set('struct_paramsType', $lang->struct->paramsType); - + - + - + @@ -236,5 +236,5 @@ js::set('struct_paramsType', $lang->struct->paramsType); -noticeAcl); ?> - +noticeAcl);?> + diff --git a/module/api/view/createstruct.html.php b/module/api/view/createstruct.html.php index 045485e61f..532907d95b 100644 --- a/module/api/view/createstruct.html.php +++ b/module/api/view/createstruct.html.php @@ -9,11 +9,11 @@ * @link http://www.zentao.net */ ?> - - - - -api->paramsScopeOptions)?> + + + + +api->paramsScopeOptions);?> struct->add); @@ -32,19 +32,14 @@ js::set('struct', '');
-

api->createStruct; ?>

+

api->createStruct;?>

api->params; ?>api->params;?> @@ -193,16 +193,16 @@ js::set('struct_paramsType', $lang->struct->paramsType);
- api->paramsExample; ?> + api->paramsExample;?>
- +
api->response; ?>api->response;?> @@ -210,25 +210,25 @@ js::set('struct_paramsType', $lang->struct->paramsType);
- api->responseExample; ?> + api->responseExample;?>
- +
api->desc; ?>api->desc;?> -
+
- - goback, "data-app='{$app->tab}'"); ?> - goback, '', "class='btn btn-back btn-wide'"); ?> + + goback, "data-app='{$app->tab}'");?> + goback, '', "class='btn btn-back btn-wide'");?>
- - - - - - - + + @@ -54,11 +49,15 @@ js::set('struct', ''); + + + + @@ -67,4 +66,4 @@ js::set('struct', ''); - + diff --git a/module/api/view/edit.html.php b/module/api/view/edit.html.php index f338606508..45162f654e 100644 --- a/module/api/view/edit.html.php +++ b/module/api/view/edit.html.php @@ -10,11 +10,11 @@ * @link http://www.zentao.net */ ?> - - - - -lib); ?> + + + + +lib);?> struct->field); @@ -36,15 +36,14 @@ js::set('api', $api); - + @@ -52,71 +51,71 @@ js::set('api', $api);
- +

- id; ?> - createLink('api', 'index', "apiID=$api->id"), $api->title, '', "title='$api->title'"); ?> - arrow . ' ' . $lang->api->edit; ?> + id;?> + createLink('api', 'index', "apiID=$api->id"), $api->title, '', "title='$api->title'");?> + arrow . ' ' . $lang->api->edit;?>

save, '', 'id="top-submit" class="btn btn-primary"'); ?>
- -

api->create; ?>

- + class='pull-right'>save, '', 'id="top-submit" class="btn btn-primary"');?>
+ +

api->create;?>

+
api->structName; ?>
api->desc; ?> api->structName;?>
api->desc;?>
- - goback, "data-app='{$app->tab}'"); ?> - goback, '', "class='btn btn-back btn-wide'"); ?> + + goback, "data-app='{$app->tab}'");?> + goback, '', "class='btn btn-back btn-wide'");?>
- + - - + + - - + + - - + + - + - + - - + + - +
api->module; ?>api->module;?> + id='moduleBox'>
api->formTitle; ?>title, "class='form-control' required"); ?>api->formTitle;?>title, "class='form-control' required");?>
api->path; ?>path, "class='form-control'"); ?>api->path;?>path, "class='form-control'");?>
api->protocol; ?>api->protocalOptions, $api->protocol ? $api->protocol : 'HTTP'); ?>api->protocol;?>api->protocalOptions, $api->protocol ? $api->protocol : 'HTTP');?>
api->method; ?>api->method;?> api->methodOptions, $api->method ? $api->method : 'GET', "class='form-control chosen'"); ?> + id='moduleBox'>api->methodOptions, $api->method ? $api->method : 'GET', "class='form-control chosen'");?>
api->requestType; ?>api->requestType;?> api->requestTypeOptions, $api->requestType ? $api->requestType : 'application/json', "class='form-control chosen'"); ?> + id='moduleBox'>api->requestTypeOptions, $api->requestType ? $api->requestType : 'application/json', "class='form-control chosen'");?>
api->status; ?>api->statusOptions, $api->status ? $api->status : apiModel::STATUS_DOING); ?>api->status;?>api->statusOptions, $api->status ? $api->status : apiModel::STATUS_DOING);?>
- api->owner; ?> + api->owner;?>
- owner ? $api->owner : $user, "class='form-control chosen'"); ?> + owner ? $api->owner : $user, "class='form-control chosen'");?>
api->header; ?>api->header;?> @@ -151,7 +150,7 @@ js::set('api', $api); - +
api->query; ?>api->query;?> @@ -186,7 +185,7 @@ js::set('api', $api); - + - + - + @@ -237,5 +236,5 @@ js::set('api', $api); -noticeAcl); ?> - +noticeAcl);?> + diff --git a/module/api/view/editpublish.html.php b/module/api/view/editpublish.html.php index 0d718d576e..5a9f44d7eb 100644 --- a/module/api/view/editpublish.html.php +++ b/module/api/view/editpublish.html.php @@ -10,7 +10,7 @@ * @link http://www.zentao.net */ ?> - +
@@ -38,12 +38,10 @@
- - + + @@ -52,4 +50,4 @@ - + diff --git a/module/api/view/editstruct.html.php b/module/api/view/editstruct.html.php index a6a1d5e451..0cc8792cb0 100644 --- a/module/api/view/editstruct.html.php +++ b/module/api/view/editstruct.html.php @@ -9,11 +9,11 @@ * @link http://www.zentao.net */ ?> - - - - -api->paramsScopeOptions)?> + + + + +api->paramsScopeOptions);?> 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); ?>
-

api->createStruct; ?>

+

api->createStruct;?>

api->params; ?>api->params;?> @@ -194,16 +193,16 @@ js::set('api', $api);
- api->paramsExample; ?> + api->paramsExample;?>
- paramsExample, "style='width:100%;height:200px'"); ?> + paramsExample, "style='width:100%;height:200px'");?>
api->response; ?>api->response;?> @@ -211,25 +210,25 @@ js::set('api', $api);
- api->responseExample; ?> + api->responseExample;?>
- responseExample, "style='width:100%;height:200px'"); ?> + responseExample, "style='width:100%;height:200px'");?>
api->desc; ?>api->desc;?> -
desc, "style='width:100%;height:200px'"); ?>
+
desc, "style='width:100%;height:200px'");?>
- - goback, "data-app='{$app->tab}'"); ?> - goback, '', "class='btn btn-back btn-wide'"); ?> + + goback, "data-app='{$app->tab}'");?> + goback, '', "class='btn btn-back btn-wide'");?>
id);?> version;?> desc;?>addedBy ?>addedDate ?>addedBy;?>addedDate;?> - createLink('api', 'deleteRelease', "libID=$libID&id=$release->id"), '', 'hiddenwin', "title='{$lang->api->delete}' class='btn'"); - ?> + createLink('api', 'deleteRelease', "libID=$libID&id=$release->id"), '', 'hiddenwin', "title='{$lang->api->delete}' class='btn'");?>
- - - - - - - + + @@ -54,11 +49,15 @@ js::set('struct', $struct) + + + + @@ -67,4 +66,4 @@ js::set('struct', $struct) - + diff --git a/module/api/view/index.html.php b/module/api/view/index.html.php index 135c29ea0a..a63fce5607 100644 --- a/module/api/view/index.html.php +++ b/module/api/view/index.html.php @@ -10,15 +10,15 @@ * @link http://www.zentao.net */ ?> - +api->confirmDelete);?>
- -
+ +
- +
- +
-
api->noModule; ?>
- - +
api->noModule;?>
+ +
- - - + + +
-
  • 0 ? $lang->api->apiList : $lang->api->title; ?>
  • +
  • 0 ? $lang->api->apiList : $lang->api->title;?>
  • - + diff --git a/module/api/view/struct.html.php b/module/api/view/struct.html.php index ba43f059eb..da6e059ce5 100644 --- a/module/api/view/struct.html.php +++ b/module/api/view/struct.html.php @@ -10,7 +10,7 @@ * @link http://www.zentao.net */ ?> - +
    @@ -36,10 +36,10 @@
    - - - - + + + +
    api->structName; ?>name, "class='form-control' required"); ?>
    api->desc; ?> desc, "class='form-control'"); ?> api->structName;?>name, "class='form-control' required");?>
    api->desc;?>desc, "class='form-control'");?>
    - - goback, "data-app='{$app->tab}'"); ?> - goback, '', "class='btn btn-back btn-wide'"); ?> + + goback, "data-app='{$app->tab}'");?> + goback, '', "class='btn btn-back btn-wide'");?>
    id);?>type ?>name ?>addedBy ?>addedDate ?>type;?>name;?>addedBy;?>addedDate;?> createLink('api', 'editStruct', "libID=$libID&structID=$struct->id"), '', '', "title='{$lang->api->edit}' class='btn'"); @@ -53,4 +53,4 @@ - +