* Code for bug#15615.

This commit is contained in:
xieqiyu
2021-10-19 18:40:55 +08:00
parent b70e00dbad
commit 5479e2db3f
3 changed files with 13 additions and 18 deletions
+11 -17
View File
@@ -20,28 +20,22 @@
<div id='title'>
<li class='menu-title'><?php echo $this->lang->api->module;?></li>
<?php
if(!$isRelease)
$canTreeBrowse = common::hasPriv('tree', 'browse');
$canEditPublish = common::hasPriv('api', 'editPublish');
$canEditLib = common::hasPriv('api', 'editLib');
$canDeleteLib = common::hasPriv('api', 'deleteLib');
$haveMoreButton = ($canTreeBrowse or $canEditPublish or $canEditLib or $canDeleteLib);
if(!$isRelease and $haveMoreButton)
{
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'>";
if(common::hasPriv('tree', 'browse'))
{
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>';
}
if(common::hasPriv('api', 'publish'))
{
echo '<li>' . html::a($this->createLink('api', 'editPublish', "libID=$libID", '', true), '<i class="icon-cog-outline"></i> ' . $this->lang->api->managePublish, '', "class='iframe'") . '</li>';
}
if($canTreeBrowse) 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>';
if($canEditPublish) echo '<li>' . html::a($this->createLink('api', 'editPublish', "libID=$libID", '', true), '<i class="icon-cog-outline"></i> ' . $this->lang->api->managePublish, '', "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>';
}
if($canEditLib) echo '<li>' . html::a($this->createLink('api', 'editLib', "rootID=$libID"), '<i class="icon-edit"></i> ' . $lang->api->editLib, '', "class='iframe'") . '</li>';
if($canDeleteLib) echo '<li>' . html::a($this->createLink('api', 'deleteLib', "rootID=$libID"), '<i class="icon-trash"></i> ' . $lang->api->deleteLib, 'hiddenwin') . '</li>';
echo '</ul></div>';
}
?>
+1
View File
@@ -437,3 +437,4 @@ $lang->changelog['15.7'][] = 'api-deleteStruct';
$lang->changelog['15.7'][] = 'api-create';
$lang->changelog['15.7'][] = 'api-edit';
$lang->changelog['15.7'][] = 'api-delete';
$lang->changelog['15.7'][] = 'api-editPublish';
+1 -1
View File
@@ -1390,7 +1390,7 @@ $lang->resource->api->createLib = 'createLib';
$lang->resource->api->editLib = 'editLib';
$lang->resource->api->deleteLib = 'deleteLib';
$lang->resource->api->publish = 'publish';
$lang->resource->api->editPublic = 'editPublish';
$lang->resource->api->editPublish = 'editPublish';
$lang->resource->api->struct = 'struct';
$lang->resource->api->createStruct = 'createStruct';
$lang->resource->api->editStruct = 'editStruct';