finish api release.
This commit is contained in:
@@ -19,7 +19,7 @@
|
||||
<?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>
|
||||
data-url='<?php echo $this->createLink('api', 'index', "libID={$api->lib}&moduleID=0&apiID=$apiID&version=$version&release=$release");?>'>#<?php echo $version;?></a>
|
||||
</li>
|
||||
<?php endfor;?>
|
||||
</ul>
|
||||
@@ -29,13 +29,16 @@
|
||||
<div class="actions">
|
||||
<?php
|
||||
echo html::a("javascript:fullScreen()", '<i class="icon-fullscreen"></i>', '', "title='{$lang->fullscreen}' class='btn btn-link fullscreen-btn'");
|
||||
if(common::hasPriv('api', 'edit')) echo html::a(inlink('edit', "apiID=$api->id"), '<i class="icon-edit"></i>', '', "title='{$lang->api->edit}' class='btn btn-link' data-app='{$this->app->tab}'");
|
||||
if(common::hasPriv('doc', 'delete'))
|
||||
if(!$isRelease)
|
||||
{
|
||||
$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'");
|
||||
if(common::hasPriv('api', 'edit')) echo html::a(inlink('edit', "apiID=$api->id"), '<i class="icon-edit"></i>', '', "title='{$lang->api->edit}' class='btn btn-link' data-app='{$this->app->tab}'");
|
||||
if(common::hasPriv('api', 'delete'))
|
||||
{
|
||||
$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>
|
||||
@@ -97,13 +100,13 @@
|
||||
<?php
|
||||
function parseTree($data, $level = 0)
|
||||
{
|
||||
$str = '<tr>';
|
||||
$str = '<tr>';
|
||||
$field = '';
|
||||
for($i=0; $i < $level; $i++)
|
||||
for($i = 0; $i < $level; $i++)
|
||||
{
|
||||
$field .= ' ';
|
||||
$field .= ' ∟ ';
|
||||
}
|
||||
$field .= $data['field'];
|
||||
$field .= $data['field'];
|
||||
$str .= '<td>' . $field . '</td>';
|
||||
$str .= '<td>' . $data['paramsType'] . '</td>';
|
||||
$require = $data['required'] ? '是' : '否';
|
||||
|
||||
@@ -122,7 +122,7 @@ js::set('struct_paramsType', $lang->struct->paramsType);
|
||||
<tr>
|
||||
<th class="w-300px"><?php echo $lang->struct->field;?></th>
|
||||
<th class="w-80px"><?php echo $lang->struct->required;?></th>
|
||||
<th class="w-200px"><?php echo $lang->struct->desc;?></th>
|
||||
<th class="w-300px"><?php echo $lang->struct->desc;?></th>
|
||||
<th><?php echo $lang->struct->action;?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -138,7 +138,7 @@ js::set('struct_paramsType', $lang->struct->paramsType);
|
||||
</label>
|
||||
</div>
|
||||
</td>
|
||||
<td class="w-200px">
|
||||
<td class="w-300px">
|
||||
<input type="text" placeholder="<?php echo $lang->struct->desc;?>" autocomplete="off" class="form-control" v-model="item.desc">
|
||||
</td>
|
||||
<td>
|
||||
@@ -157,7 +157,7 @@ js::set('struct_paramsType', $lang->struct->paramsType);
|
||||
<tr>
|
||||
<th class="w-300px"><?php echo $lang->struct->field;?></th>
|
||||
<th class="w-80px"><?php echo $lang->struct->required;?></th>
|
||||
<th class="w-200px"><?php echo $lang->struct->desc;?></th>
|
||||
<th class="w-300px"><?php echo $lang->struct->desc;?></th>
|
||||
<th><?php echo $lang->struct->action;?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -173,7 +173,7 @@ js::set('struct_paramsType', $lang->struct->paramsType);
|
||||
</label>
|
||||
</div>
|
||||
</td>
|
||||
<td class="w-200px">
|
||||
<td class="w-300px">
|
||||
<input type="text" placeholder="<?php echo $lang->struct->desc;?>" autocomplete="off" class="form-control" v-model="item.desc">
|
||||
</td>
|
||||
<td>
|
||||
|
||||
@@ -18,16 +18,25 @@
|
||||
<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->apiDoc; ?></li>
|
||||
<li class='menu-title'><?php echo $this->lang->api->module; ?></li>
|
||||
<?php
|
||||
echo "<div class='menu-actions'>";
|
||||
echo html::a('javascript:;', "<i class='icon icon-ellipsis-v'></i>", '', "data-toggle='dropdown' class='btn btn-link'");
|
||||
echo "<ul class='dropdown-menu pull-right'>";
|
||||
echo '<li>' . html::a($this->createLink('tree', 'browse', "rootID=$libID&view=api", '', true), '<i class="icon-cog-outline"></i> ' . $this->lang->api->manageType, '', "class='iframe'") . '</li>';
|
||||
echo "<li class='divider'></li>";
|
||||
echo '<li>' . html::a($this->createLink('api', 'editLib', "rootID=$libID"), '<i class="icon-edit"></i> ' . $lang->api->editLib, '', "class='iframe'") . '</li>';
|
||||
echo '<li>' . html::a($this->createLink('api', 'deleteLib', "rootID=$libID"), '<i class="icon-trash"></i> ' . $lang->api->deleteLib, 'hiddenwin') . '</li>';
|
||||
echo '</ul></div>';
|
||||
if(!$isRelease)
|
||||
{
|
||||
echo "<div class='menu-actions'>";
|
||||
echo html::a('javascript:;', "<i class='icon icon-ellipsis-v'></i>", '', "data-toggle='dropdown' class='btn btn-link'");
|
||||
echo "<ul class='dropdown-menu pull-right'>";
|
||||
echo '<li>' . html::a($this->createLink('tree', 'browse', "rootID=$libID&view=api", '', true), '<i class="icon-cog-outline"></i> ' . $this->lang->api->manageType, '', "class='iframe'") . '</li>';
|
||||
echo "<li class='divider'></li>";
|
||||
if(common::hasPriv('api', 'createLib'))
|
||||
{
|
||||
echo '<li>' . html::a($this->createLink('api', 'editLib', "rootID=$libID"), '<i class="icon-edit"></i> ' . $lang->api->editLib, '', "class='iframe'") . '</li>';
|
||||
}
|
||||
if(common::hasPriv('api', 'deleteLib'))
|
||||
{
|
||||
echo '<li>' . html::a($this->createLink('api', 'deleteLib', "rootID=$libID"), '<i class="icon-trash"></i> ' . $lang->api->deleteLib, 'hiddenwin') . '</li>';
|
||||
}
|
||||
echo '</ul></div>';
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<?php if(!$moduleTree): ?>
|
||||
@@ -40,52 +49,54 @@
|
||||
<?php endif;?>
|
||||
|
||||
<?php if($apiID):?>
|
||||
<?php include './content.html.php';?>
|
||||
<?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->module : $lang->api->title; ?></li>
|
||||
<?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>
|
||||
</div>
|
||||
<div class="detail">
|
||||
<div class="no-content"><img src="<?php echo $config->webRoot . 'theme/default/images/main/no_content.png' ?>"/>
|
||||
</div>
|
||||
<div class="detail">
|
||||
<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="no-content-button">
|
||||
<?php
|
||||
$html = '';
|
||||
if($libID && common::hasPriv('api', 'create'))
|
||||
{
|
||||
$html = html::a(helper::createLink('api', 'create', "libID={$libID}"), '<i class="icon icon-plus"></i> ' . $lang->api->createApi, '', 'class="btn btn-info btn-wide"');
|
||||
}
|
||||
else
|
||||
{
|
||||
$html = html::a(helper::createLink('api', 'createLib'), '<i class="icon icon-plus"></i> ' . $lang->api->createLib, '', 'class="btn btn-info btn-wide iframe"');
|
||||
}
|
||||
echo $html;
|
||||
?>
|
||||
</div>
|
||||
<div class="notice text-muted"><?php echo (empty($libs)) ? $lang->api->noLib : $lang->api->noApi; ?></div>
|
||||
<div class="no-content-button">
|
||||
<?php
|
||||
$html = '';
|
||||
if($libID && common::hasPriv('api', 'create'))
|
||||
{
|
||||
$html = html::a(helper::createLink('api', 'create', "libID={$libID}"), '<i class="icon icon-plus"></i> ' . $lang->api->createApi, '', 'class="btn btn-info btn-wide"');
|
||||
}
|
||||
else
|
||||
{
|
||||
$html = html::a(helper::createLink('api', 'createLib'), '<i class="icon icon-plus"></i> ' . $lang->api->createLib, '', 'class="btn btn-info btn-wide iframe"');
|
||||
}
|
||||
echo $html;
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<?php else: ?>
|
||||
<div class="cell">
|
||||
<div class="detail">
|
||||
<ul class="list-group">
|
||||
<?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=0&moduleID=0&apiID='. $api->id) ?>">
|
||||
<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; ?>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<?php else: ?>
|
||||
<div class="cell">
|
||||
<div class="detail">
|
||||
<ul class="list-group">
|
||||
<?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>
|
||||
</div>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php include '../../common/view/footer.html.php'; ?>
|
||||
|
||||
Reference in New Issue
Block a user