diff --git a/module/api/css/index.css b/module/api/css/index.css index 2b3b4a18de..0a5dd949bf 100644 --- a/module/api/css/index.css +++ b/module/api/css/index.css @@ -113,3 +113,12 @@ .paramsTable th {text-align: left!important; font-size: 14px;} .paramsTable td {text-align: left;} + +.tree-group {position: relative;} +.tree-group > .module-name {white-space: nowrap; overflow: hidden; text-overflow: ellipsis; width: 100%; display: block;} +.tree li.active > .tree-group a {font-weight: 700; color: #0c64eb;} +.tree-actions {display: inline-block; margin-left: 5px; vertical-align: middle;} +.tree-group .tree-actions {display: none; position: absolute; right: 0; top: 0; background-color: #fff; white-space: nowrap;} +.tree-group:hover .tree-actions {display: block} +.tree-actions a {display: inline-block; margin-left: 5px; font-size: 13px; opacity: .6;} +.tree li.active > .tree-group a {font-weight: 700; color: #0c64eb;} diff --git a/module/doc/model.php b/module/doc/model.php index c3cbdba155..2b1aea9e20 100644 --- a/module/doc/model.php +++ b/module/doc/model.php @@ -2305,10 +2305,16 @@ EOT; foreach($moduleDocs[0] as $doc) { $treeMenu[0] .= 'id == $docID ? ' class="active"' : ' class="independent"') . '>'; + $treeMenu[0] .= "
" . html::a(inlink('index', "libID=$rootID&moduelID=0&apiID={$doc->id}"), "  " . $doc->title, '', "data-app='{$this->app->tab}' class='doc-title' title='{$doc->title}'") . ''; - $treeMenu[0] .= html::a(inlink('index', "libID=$rootID&moduelID=0&apiID={$doc->id}"), "  " . $doc->title, '', "data-app='{$this->app->tab}' class='doc-title' title='{$doc->title}'"); + if(common::hasPriv('api', 'edit')) + { + $treeMenu[0] .= "
"; + $treeMenu[0] .= html::a(helper::createLink('api', 'edit', "docID={$doc->id}"), "", '', "title={$this->lang->doc->edit} data-app='{$this->app->tab}'"); + $treeMenu[0] .= '
'; + } - $treeMenu[0] .= ''; + $treeMenu[0] .= '
'; } }