From 076ff985360eee5c8aa6f6bbe729e9bb34162169 Mon Sep 17 00:00:00 2001 From: caoyanyi Date: Thu, 30 Mar 2023 13:12:56 +0800 Subject: [PATCH] * Modify api page style. --- module/api/view/index.html.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/module/api/view/index.html.php b/module/api/view/index.html.php index 58e092ee3a..b1cb35174a 100644 --- a/module/api/view/index.html.php +++ b/module/api/view/index.html.php @@ -22,12 +22,12 @@
createLink('api', 'struct', "libID=$libID"), " " . $lang->api->struct, '', "class='btn btn-link'"); - if(common::hasPriv('api', 'releases')) echo html::a($this->createLink('api', 'releases', "libID=$libID", 'html', true), " " . $lang->api->releases, '', "class='btn btn-link iframe' data-width='800px'"); - if(common::hasPriv('api', 'createRelease')) echo html::a($this->createLink('api', 'createRelease', "libID=$libID"), " " . $lang->api->createRelease, '', "class='btn btn-link iframe' data-width='800px'"); - //if(common::hasPriv('api', 'export')) echo html::a($this->createLink('api', 'export', "libID=$libID", 'html', true), " " . $lang->export, '', "class='btn btn-link export' id='export'"); + if($libTree and common::hasPriv('api', 'struct')) echo html::a($this->createLink('api', 'struct', "libID=$libID"), " " . $lang->api->struct, '', "class='btn btn-link'"); + if($libTree and common::hasPriv('api', 'releases')) echo html::a($this->createLink('api', 'releases', "libID=$libID", 'html', true), " " . $lang->api->releases, '', "class='btn btn-link iframe' data-width='800px'"); + if($libTree and common::hasPriv('api', 'createRelease')) echo html::a($this->createLink('api', 'createRelease', "libID=$libID"), " " . $lang->api->createRelease, '', "class='btn btn-link iframe' data-width='800px'"); + //if($config->edition != 'open' and $libTree and common::hasPriv('api', 'export')) echo html::a($this->createLink('api', 'export', "libID=$libID", 'html', true), " " . $lang->export, '', "class='btn btn-link export' id='export'"); if(common::hasPriv('api', 'createLib')) echo html::a($this->createLink('api', 'createLib', "type=" . ($objectType == 'project' ? 'project' : 'product') . "&objectID=$objectID"), ' ' . $lang->api->createLib, '', 'class="btn btn-secondary iframe" data-width="800px"'); - if(common::hasPriv('api', 'create')) echo html::a($this->createLink('api', 'create', "libID=$libID&moduleID=$moduleID"), ' ' . $lang->api->createApi, '', 'class="btn btn-primary"'); + if($libTree and common::hasPriv('api', 'create')) echo html::a($this->createLink('api', 'create', "libID=$libID&moduleID=$moduleID"), ' ' . $lang->api->createApi, '', 'class="btn btn-primary"'); ?>