* Finish Task #43676,43675,43672,43671,43679,43669
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
ALTER TABLE `zt_apistruct`
|
||||
MODIFY COLUMN `desc` text CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL AFTER `type`;
|
||||
@@ -67,7 +67,7 @@ class api extends control
|
||||
$this->view->apiList = $apiList;
|
||||
}
|
||||
|
||||
$this->setMenu($libID);
|
||||
$this->setMenu($libID, $moduleID);
|
||||
|
||||
$this->view->isRelease = $release > 0;
|
||||
$this->view->release = $release;
|
||||
@@ -469,6 +469,7 @@ class api extends control
|
||||
{
|
||||
$now = helper::now();
|
||||
$params = fixer::input('post')
|
||||
->trim('title,path')
|
||||
->remove('type')
|
||||
->skipSpecial('params,response')
|
||||
->add('addedBy', $this->app->user->account)
|
||||
@@ -612,10 +613,11 @@ class api extends control
|
||||
* Set doc menu by method name.
|
||||
*
|
||||
* @param int $libID
|
||||
* @param int $moduleID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
private function setMenu($libID = 0)
|
||||
private function setMenu($libID = 0, $moduleID = 0)
|
||||
{
|
||||
common::setMenuVars('doc', $libID);
|
||||
|
||||
@@ -640,7 +642,7 @@ class api extends control
|
||||
if(common::hasPriv('api', 'create'))
|
||||
{
|
||||
$menu .= "<li>";
|
||||
$menu .= html::a(helper::createLink('api', 'create', "libID=$libID"), "<i class='icon-rich-text icon'></i> " . $this->lang->api->apiDoc, '', "data-app='{$this->app->tab}'");
|
||||
$menu .= html::a(helper::createLink('api', 'create', "libID=$libID&moduleID=$moduleID"), "<i class='icon-rich-text icon'></i> " . $this->lang->api->apiDoc, '', "data-app='{$this->app->tab}'");
|
||||
$menu .= "</li>";
|
||||
}
|
||||
|
||||
|
||||
@@ -69,7 +69,7 @@ js::set('struct_paramsType', $lang->struct->paramsType);
|
||||
<tr>
|
||||
<th><?php echo $lang->api->module;?></th>
|
||||
<td>
|
||||
<span id='moduleBox'><?php echo html::select('module', $moduleOptionMenu, '', "class='form-control chosen'");?></span>
|
||||
<span id='moduleBox'><?php echo html::select('module', $moduleOptionMenu, $moduleID, "class='form-control chosen'");?></span>
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
|
||||
@@ -42,7 +42,9 @@
|
||||
</div>
|
||||
<?php if(!$moduleTree):?>
|
||||
<hr class="space">
|
||||
<div class="text-center text-muted tips"><?php echo $lang->api->noModule;?></div>
|
||||
<?php if(!$isRelease):?>
|
||||
<div class="text-center text-muted tips"><?php echo $lang->api->noModule;?></div>
|
||||
<?php endif;?>
|
||||
<?php endif;?>
|
||||
<?php echo $moduleTree;?>
|
||||
</div>
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
<td><?php echo zget($users, $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 if(common::hasPriv('api', 'deleteRelease')) echo html::a($this->createLink('api', 'deleteRelease', "libID=$libID&id=$release->id"), '<i class="icon-trash"></i>', 'hiddenwin', "title='{$lang->api->deleteRelease}' class='btn'");?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
|
||||
@@ -49,8 +49,8 @@
|
||||
<td class="c-date"><?php echo $struct->addedDate;?></td>
|
||||
<td class='c-actions'>
|
||||
<?php
|
||||
if(common::hasPriv('api', 'editStruct')) echo html::a($this->createLink('api', 'editStruct', "libID=$libID&structID=$struct->id"), '<i class="icon-edit"></i>', '', "title='{$lang->api->edit}' class='btn'");
|
||||
if(common::hasPriv('api', 'deleteStruct')) echo html::a($this->createLink('api', 'deleteStruct', "libID=$libID&structID=$struct->id"), '<i class="icon-trash"></i>', 'hiddenwin', "title='{$lang->api->delete}' class='btn'");
|
||||
if(common::hasPriv('api', 'editStruct')) echo html::a($this->createLink('api', 'editStruct', "libID=$libID&structID=$struct->id"), '<i class="icon-edit"></i>', '', "title='{$lang->api->editStruct}' class='btn'");
|
||||
if(common::hasPriv('api', 'deleteStruct')) echo html::a($this->createLink('api', 'deleteStruct', "libID=$libID&structID=$struct->id"), '<i class="icon-trash"></i>', 'hiddenwin', "title='{$lang->api->deleteStruct}' class='btn'");
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
Reference in New Issue
Block a user