Skip to content

Commit

Permalink
Merge branch 'sprint/167_api_doc' into 'sprint/167'
Browse files Browse the repository at this point in the history
* Fix bug #15674.

See merge request easycorp/zentaopms!124
  • Loading branch information
孙广明 committed Oct 20, 2021
2 parents 28698c9 + 3f279a9 commit a394838
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 7 deletions.
4 changes: 2 additions & 2 deletions module/api/view/struct.html.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@
<td class="c-date"><?php echo $struct->addedDate;?></td>
<td class='c-actions'>
<?php
if(common::hasPriv('api', 'edit')) 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', 'delete')) 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->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'");
?>
</td>
</tr>
Expand Down
19 changes: 14 additions & 5 deletions module/tree/view/browse.html.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,18 @@
<?php js::set('viewType', $viewType);?>
<?php $this->app->loadLang('doc');?>
<?php $hasBranch = (strpos('story|bug|case', $viewType) !== false and (!empty($root->type) && $root->type != 'normal')) ? true : false;?>
<?php $name = $viewType == 'line' ? $lang->tree->line : (($viewType == 'doc' or $viewType == 'feedback' or $viewType == 'trainskill' or $viewType == 'trainpost') ? $lang->tree->cate : ($viewType == 'api' ? $lang->tree->dir : $lang->tree->name));?>
<?php $name = $viewType == 'doc' ? $lang->doc->catalogName : $name;?>
<?php $title = ($viewType == 'line' or $viewType == 'trainskill' or $viewType == 'trainpost') ? '' : ((strpos($viewType, 'doc') !== false or $viewType == 'api') ? $lang->doc->childType : ((strpos($viewType, 'feedback') !== false) ? $lang->tree->subCategory : $lang->tree->child));?>
<?php
$name = $lang->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 = '';
?>
<!--div id="mainMenu" class="clearfix">
<div class="btn-toolbar pull-left">
<?php $backLink = $this->session->{$viewType . 'List'} ? $this->session->{$viewType . 'List'} : 'javascript:history.go(-1)';?>
Expand Down Expand Up @@ -70,7 +79,7 @@
<div class="side-col col-4">
<div class="panel">
<div class="panel-heading">
<div class="panel-title"><?php echo $title;?></div>
<div class="panel-title"><?php echo $childTitle;?></div>
</div>
<div class="panel-body">
<ul id='modulesTree' data-name='tree-<?php echo $viewType;?>'></ul>
Expand Down Expand Up @@ -227,7 +236,7 @@
subModules:
{
linkTemplate: '<?php echo helper::createLink('tree', 'browse', "rootID=$rootID&viewType=$viewType&moduleID={0}&branch={1}"); ?>',
title: '<?php echo $title;?>',
title: '<?php echo $childTitle;?>',
template: '<a><?php echo $viewType == 'line' ? '' : '<i class="icon-split"></i>';?></a>',
}
},
Expand Down

0 comments on commit a394838

Please sign in to comment.