diff --git a/module/api/view/struct.html.php b/module/api/view/struct.html.php index ddd4e6b55d0..d7f744ab1f0 100644 --- a/module/api/view/struct.html.php +++ b/module/api/view/struct.html.php @@ -49,8 +49,8 @@ addedDate;?> createLink('api', 'editStruct', "libID=$libID&structID=$struct->id"), '', '', "title='{$lang->api->edit}' class='btn'"); - if(common::hasPriv('api', 'delete')) echo html::a($this->createLink('api', 'deleteStruct', "libID=$libID&structID=$struct->id"), '', 'hiddenwin', "title='{$lang->api->delete}' class='btn'"); + if(common::hasPriv('api', 'editStruct')) echo html::a($this->createLink('api', 'editStruct', "libID=$libID&structID=$struct->id"), '', '', "title='{$lang->api->edit}' class='btn'"); + if(common::hasPriv('api', 'deleteStruct')) echo html::a($this->createLink('api', 'deleteStruct', "libID=$libID&structID=$struct->id"), '', 'hiddenwin', "title='{$lang->api->delete}' class='btn'"); ?> diff --git a/module/tree/view/browse.html.php b/module/tree/view/browse.html.php index 7f9c2ec747d..46d6946d32b 100644 --- a/module/tree/view/browse.html.php +++ b/module/tree/view/browse.html.php @@ -21,9 +21,18 @@ app->loadLang('doc');?> type) && $root->type != 'normal')) ? true : false;?> -tree->line : (($viewType == 'doc' or $viewType == 'feedback' or $viewType == 'trainskill' or $viewType == 'trainpost') ? $lang->tree->cate : ($viewType == 'api' ? $lang->tree->dir : $lang->tree->name));?> -doc->catalogName : $name;?> -doc->childType : ((strpos($viewType, 'feedback') !== false) ? $lang->tree->subCategory : $lang->tree->child));?> +tree->name; +if($viewType == 'line') $name = $lang->tree->line; +if($viewType == 'api') $name = $lang->tree->dir; +if($viewType == 'doc') $name = $lang->doc->catalogName; +if($viewType == 'feedback' or $viewType == 'trainskill' or $viewType == 'trainpost') $name = $lang->tree->dir; + +$childTitle = $lang->tree->child; +if(strpos($viewType, 'feedback') !== false) $childTitle = $lang->tree->subCategory; +if(strpos($viewType, 'doc') !== false or $viewType == 'api') $childTitle = $lang->doc->childType; +if($viewType == 'line' or $viewType == 'trainskill' or $viewType == 'trainpost') $childTitle = ''; +?>