* Optimize repo page style.
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
.m-repo-ajaxgeteditorcontent {overflow: hidden;}
|
||||
#monacoEditor .tip {width: 15px; height: 15px; background: #D9D9D9; border-radius: 10px;}
|
||||
#log {background: #fff; margin-top: 2px; color: #707070; display: none; padding: 5px;}
|
||||
#monacoEditor .tip-circular {background: #2e7fff; border-radius: 10px; padding: 0px 7px;}
|
||||
#log {margin-top: 2px; display: none; padding: 5px; justify-content: space-between;}
|
||||
#log .history {margin-left: 5px;}
|
||||
#log .action-btn .btn {border: none; background: none;}
|
||||
#related {display: none; margin-top: 2px; background: #fff;}
|
||||
|
||||
#relationTabs .nav > li > a {padding: 8px 10px; display: flex; white-space: pre;}
|
||||
|
||||
@@ -4,9 +4,10 @@ body {background-color: #fff; padding-bottom: 20px;}
|
||||
.left-content {padding-left: 0px;}
|
||||
.left-content tr {line-height: 30px;}
|
||||
.left-content th {padding-top: 4px;}
|
||||
.right-content .detail-title {padding-bottom: 15px;}
|
||||
.right-content {border-left: 1px solid #EDEEF2; padding-top: 15px;}
|
||||
.text {width: 90%; white-space: normal; word-wrap: break-word; word-break: break-all; font-weight: normal; padding-left: 10px;}
|
||||
.right-content {border-left: 1px solid #EDEEF2;}
|
||||
.right-content .detail-content {margin-left: 15px;}
|
||||
.text {width: 55%; white-space: normal; word-wrap: break-word; word-break: break-all; padding-left: 10px; vertical-align: top;}
|
||||
.cell {min-height: 300px;}
|
||||
.menu-title {width: 100%;}
|
||||
.detail-content {margin-top: 0;}
|
||||
.article-content {margin-top: 0;}
|
||||
.spec-content {padding-right: 20px;}
|
||||
|
||||
@@ -229,6 +229,12 @@ h3 {font-size: 16px;}
|
||||
#fileTree ul > li.has-list:first-child:before {top: -13px;}
|
||||
#fileTree ul > li.tree-single-item:before {height: 23px;}
|
||||
#fileTree ul > li.has-list:after {width: 14px;}
|
||||
#filesTree .tree li.has-list.open:before {border: none;}
|
||||
#fileTabs .nav-tabs > li.tab-nav-item > a {background: linear-gradient( 109deg, transparent 10%, #9b9494 10%) 0 0, linear-gradient(-109deg, transparent 10%, #9b9494 10%) 100% 0; background-size: 90% 100%; background-repeat: no-repeat;}
|
||||
#fileTabs .nav-tabs > li.active > a {color: #2e7fff !important; background: linear-gradient( 109deg, transparent 10%, #ffffff 10%) 0 0, linear-gradient(-109deg, transparent 10%, #ffffff 10%) 100% 0; background-size: 90% 100%; background-repeat: no-repeat;}
|
||||
#relationTabs .nav-tabs >li > a .tab-nav-close {display: none;}
|
||||
#relationTabs .nav-tabs > li > a > i, #relationTabs .nav-tabs > li > a > span {background: #EDEEF2; font-weight: normal; padding: 1px 5px;}
|
||||
#relationTabs .nav-tabs > li.active > a > i, #relationTabs .nav-tabs > li.active > a > span {background: #E6F0FF; color: #2e7fff;}
|
||||
|
||||
#modules li {padding: 5px 0 0 15px;}
|
||||
.file-tree #modules .icon {color: #9EA3B0;}
|
||||
|
||||
@@ -28,7 +28,7 @@ $lang->repo->branch = 'Branch';
|
||||
$lang->repo->tag = 'Tag';
|
||||
$lang->repo->addWebHook = 'Add Webhook';
|
||||
$lang->repo->apiGetRepoByUrl = 'API: Get repo by URL';
|
||||
$lang->repo->blamTmpl = '%time %name commited %version %comment';
|
||||
$lang->repo->blameTmpl = 'Code for line <strong>%line</strong>, <span class="tip-circular"></span> %name commited at %time, %version %comment';
|
||||
$lang->repo->notRelated = 'There is currently no related ZenTao object';
|
||||
|
||||
$lang->repo->browseAction = 'Browse Repo';
|
||||
@@ -50,6 +50,7 @@ $lang->repo->unlinkedTasks = 'Unlinked Tasks';
|
||||
$lang->repo->submit = 'Submit';
|
||||
$lang->repo->cancel = 'Cancel';
|
||||
$lang->repo->addComment = 'Add Comment';
|
||||
$lang->repo->addIssue = 'Add Issue';
|
||||
|
||||
$lang->repo->copy = 'Click to copy';
|
||||
$lang->repo->copied = 'Copy successful';
|
||||
|
||||
@@ -28,7 +28,7 @@ $lang->repo->branch = 'Branch';
|
||||
$lang->repo->tag = 'Tag';
|
||||
$lang->repo->addWebHook = 'Add Webhook';
|
||||
$lang->repo->apiGetRepoByUrl = 'API: Get repo by URL';
|
||||
$lang->repo->blamTmpl = '%time %name commited %version %comment';
|
||||
$lang->repo->blameTmpl = 'Code for line <strong>%line</strong>, <span class="tip-circular"></span> %name commited at %time, %version %comment';
|
||||
$lang->repo->notRelated = 'There is currently no related ZenTao object';
|
||||
|
||||
$lang->repo->browseAction = 'Browse Repo';
|
||||
@@ -50,6 +50,7 @@ $lang->repo->unlinkedTasks = 'Unlinked Tasks';
|
||||
$lang->repo->submit = 'Submit';
|
||||
$lang->repo->cancel = 'Cancel';
|
||||
$lang->repo->addComment = 'Add Comment';
|
||||
$lang->repo->addIssue = 'Add Issue';
|
||||
|
||||
$lang->repo->copy = 'Click to copy';
|
||||
$lang->repo->copied = 'Copy successful';
|
||||
|
||||
@@ -28,7 +28,7 @@ $lang->repo->branch = 'Branch';
|
||||
$lang->repo->tag = 'Tag';
|
||||
$lang->repo->addWebHook = 'Add Webhook';
|
||||
$lang->repo->apiGetRepoByUrl = 'API: Get repo by URL';
|
||||
$lang->repo->blamTmpl = '%time %name commited %version %comment';
|
||||
$lang->repo->blameTmpl = 'Code for line <strong>%line</strong>, <span class="tip-circular"></span> %name commited at %time, %version %comment';
|
||||
$lang->repo->notRelated = 'There is currently no related ZenTao object';
|
||||
|
||||
$lang->repo->browseAction = 'Browse Repo';
|
||||
@@ -50,6 +50,7 @@ $lang->repo->unlinkedTasks = 'Unlinked Tasks';
|
||||
$lang->repo->submit = 'Soumettre';
|
||||
$lang->repo->cancel = 'Annuler';
|
||||
$lang->repo->addComment = 'Ajout Comment.';
|
||||
$lang->repo->addIssue = 'Add Issue';
|
||||
|
||||
$lang->repo->copy = 'Click to copy';
|
||||
$lang->repo->copied = 'Copy successful';
|
||||
|
||||
@@ -28,7 +28,7 @@ $lang->repo->branch = '分支';
|
||||
$lang->repo->tag = '标签';
|
||||
$lang->repo->addWebHook = '添加Webhook';
|
||||
$lang->repo->apiGetRepoByUrl = '接口:通过URL获取代码库';
|
||||
$lang->repo->blamTmpl = '%time 由 %name 提交 %version %comment';
|
||||
$lang->repo->blameTmpl = '第 <strong>%line</strong> 行代码相关信息,<span class="tip-circular"></span> %name 于 %time 提交 %version %comment';
|
||||
$lang->repo->notRelated = '暂时没有关联禅道对象';
|
||||
|
||||
$lang->repo->browseAction = '浏览代码库';
|
||||
@@ -50,6 +50,7 @@ $lang->repo->unlinkedTasks = '未关联任务';
|
||||
$lang->repo->submit = '提交';
|
||||
$lang->repo->cancel = '取消';
|
||||
$lang->repo->addComment = '添加评论';
|
||||
$lang->repo->addIssue = '提问题';
|
||||
|
||||
$lang->repo->copy = '点击复制';
|
||||
$lang->repo->copied = '复制成功';
|
||||
|
||||
@@ -19,7 +19,7 @@ js::set('jsRoot', $jsRoot);
|
||||
js::set('clientLang', $app->clientLang);
|
||||
js::set('fileExt', $this->config->repo->fileExt);
|
||||
js::set('file', $pathInfo);
|
||||
js::set('blameTmpl', $lang->repo->blamTmpl);
|
||||
js::set('blameTmpl', $lang->repo->blameTmpl);
|
||||
js::set('repoID', $repoID);
|
||||
js::set('showEditor', $showEditor);
|
||||
js::set('canLinkStory', $canLinkStory);
|
||||
@@ -44,28 +44,29 @@ js::import($jsRoot . 'monaco-editor/min/vs/loader.js');
|
||||
<div id="codeContainer"></div>
|
||||
<?php endif;?>
|
||||
<div id="log">
|
||||
<div class="tip"></div>
|
||||
<div class="history"></div>
|
||||
<div class="action-btn pull-right">
|
||||
<div class="btn btn-close pull-right"><i class="icon icon-close"></i></div>
|
||||
<?php if($canLinkStory or $canLinkBug or $canLinkTask or $canUnlinkObject):?>
|
||||
<div class="dropdown pull-right">
|
||||
<button class="btn" type="button" data-toggle="context-dropdown"><i class="icon icon-ellipsis-v icon-rotate-90"></i></button>
|
||||
<ul class="dropdown-menu">
|
||||
<?php
|
||||
if($canLinkStory) echo '<li id="linkStory">' . html::a('javascript:;', '<i class="icon icon-lightbulb"></i> ' . $lang->repo->linkStory) . '</li>';
|
||||
if($canLinkBug) echo '<li id="linkBug">' . html::a('javascript:;', '<i class="icon icon-bug"></i> ' . $lang->repo->linkBug) . '</li>';
|
||||
if($canLinkTask) echo '<li id="linkTask">' . html::a('javascript:;', '<i class="icon icon-todo"></i> ' . $lang->repo->linkTask) . '</li>';
|
||||
if($canUnlinkObject) echo '<li id="unlink">' . html::a('javascript:;', '<i class="icon icon-unlink"></i> ' . $lang->repo->unlink) . '</li>';
|
||||
?>
|
||||
</ul>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
</div>
|
||||
<div id="related">
|
||||
<div class="main-col main">
|
||||
<div class="content panel">
|
||||
<div class='btn-toolbar'>
|
||||
<div class="btn btn-left pull-left"><i class="icon icon-chevron-left"></i></div>
|
||||
<div class="btn btn-close pull-right"><i class="icon icon-close"></i></div>
|
||||
<?php if($canLinkStory or $canLinkBug or $canLinkTask or $canUnlinkObject):?>
|
||||
<div class="dropdown pull-right">
|
||||
<button class="btn" type="button" data-toggle="context-dropdown"><i class="icon icon-ellipsis-v icon-rotate-90"></i></button>
|
||||
<ul class="dropdown-menu">
|
||||
<?php
|
||||
if($canLinkStory) echo '<li id="linkStory">' . html::a('javascript:;', '<i class="icon icon-lightbulb"></i> ' . $lang->repo->linkStory) . '</li>';
|
||||
if($canLinkBug) echo '<li id="linkBug">' . html::a('javascript:;', '<i class="icon icon-bug"></i> ' . $lang->repo->linkBug) . '</li>';
|
||||
if($canLinkTask) echo '<li id="linkTask">' . html::a('javascript:;', '<i class="icon icon-todo"></i> ' . $lang->repo->linkTask) . '</li>';
|
||||
if($canUnlinkObject) echo '<li id="unlink">' . html::a('javascript:;', '<i class="icon icon-unlink"></i> ' . $lang->repo->unlink) . '</li>';
|
||||
?>
|
||||
</ul>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
<div class="btn btn-right pull-right"><i class="icon icon-chevron-right"></i></div>
|
||||
<div class='panel-title'>
|
||||
<div class="tabs w-10" id="relationTabs"></div>
|
||||
@@ -166,11 +167,12 @@ function getRelation(commit)
|
||||
function setTab(titleObj)
|
||||
{
|
||||
return {
|
||||
id: titleObj.type + '-' + titleObj.id,
|
||||
title: titleObj.title,
|
||||
icon: titleObj.type == 'story' ? 'icon-lightbulb text-primary' : (titleObj.type == 'task' ? 'icon-check-sign text-info' : 'icon-bug text-red'),
|
||||
type: 'iframe',
|
||||
url: createLink('repo', 'ajaxGetRelationInfo', 'objectID=' + titleObj.id + '&objectType=' + titleObj.type)
|
||||
id: titleObj.type + '-' + titleObj.id,
|
||||
title: titleObj.title,
|
||||
icon: titleObj.type == 'story' ? 'icon-lightbulb' : (titleObj.type == 'task' ? 'icon-check-sign' : 'icon-bug'),
|
||||
type: 'iframe',
|
||||
url: createLink('repo', 'ajaxGetRelationInfo', 'objectID=' + titleObj.id + '&objectType=' + titleObj.type),
|
||||
forbidClose: true
|
||||
};
|
||||
}
|
||||
|
||||
@@ -237,10 +239,11 @@ function showBlameAndRelation(line)
|
||||
var time = blame.time != 'unknown' ? blame.time : '';
|
||||
var user = blame.committer != 'unknown' ? blame.committer : '';
|
||||
var version = blame.revision.toString().substring(0, 10);
|
||||
var content = blameTmpl.replace('%time', time).replace('%name', user).replace('%version', version).replace('%comment', blame.message);
|
||||
$('.history').text(content);
|
||||
var content = blameTmpl.replace('%line', line).replace('%time', time).replace('%name', user).replace('%version', version).replace('%comment', blame.message);
|
||||
$('.history').html(content);
|
||||
$('#log').data('line', p_line);
|
||||
$('#log').css('display', 'flex');
|
||||
$('#log').css('justify-content', 'space-between');
|
||||
getRelation(blame.revision);
|
||||
}
|
||||
|
||||
|
||||
@@ -17,23 +17,35 @@ include '../../common/view/header.lite.html.php';
|
||||
<div class="left-content col-md-8">
|
||||
<table class="menu-title">
|
||||
<?php if($objectType == 'story'):?>
|
||||
<tr><th class='text-left nobr'><?php echo $lang->release->storyTitle;?>: </th><td class="text"><?php echo $object->title; ?></td></tr>
|
||||
<tr><th class='text-left nobr'><?php echo $lang->story->legendSpec;?>: </th><td class="text"><div class="detail-content article-content"><?php echo $object->spec; ?></div></td></tr>
|
||||
<tr><th class='text-left nobr'><?php echo $lang->story->verify;?>: </th><td class="text"><div class="detail-content article-content"><?php echo $object->verify; ?></div></td></tr>
|
||||
<tr>
|
||||
<td class="text text-primary"><strong><?php echo $object->title; ?></strong></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text"><div class="spec-content detail-content article-content"><?php echo $object->spec; ?></div></td>
|
||||
<td class="text right-content"><div class="detail-content article-content"><?php echo $object->verify; ?></div></td>
|
||||
</tr>
|
||||
<?php elseif($objectType == 'task'):?>
|
||||
<tr><th class='text-left nobr'><?php echo $lang->task->name;?>: </th><td class="text"><?php echo $object->name; ?></td></tr>
|
||||
<tr><th class='text-left nobr'><?php echo $lang->task->desc;?>: </th><td class="text"><div class="detail-content article-content"><?php echo $object->desc; ?></div></td></tr>
|
||||
<tr><th class='text-left nobr'><?php echo $lang->task->story;?>: </th><td class="text"><div class="detail-content article-content"><?php echo $object->storyTitle; ?></div></td></tr>
|
||||
<tr>
|
||||
<td class="text text-primary"><strong><?php echo $object->name; ?></strong></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text"><div class="spec-content detail-content article-content"><?php echo $object->desc; ?></div></td>
|
||||
<td class="text right-content"><div class="detail-content article-content"><?php echo $object->storyTitle; ?></div></td>
|
||||
</tr>
|
||||
<?php elseif($objectType == 'bug'):?>
|
||||
<tr><th class='text-left nobr'><?php echo $lang->bug->title;?>: </th><td class="text"><?php echo $object->title; ?></td></tr>
|
||||
<tr><th class='text-left nobr'><?php echo $lang->bug->type;?>: </th><td class="text"><?php echo zget($lang->bug->typeList, $object->type); ?></td></tr>
|
||||
<tr><th class='text-left nobr'><?php echo $lang->bug->steps;?>: </th><td class="text"><div class="detail-content article-content"><?php echo $object->steps; ?></div></td></tr>
|
||||
<tr>
|
||||
<td class="text text-primary"><strong><?php echo $object->title; ?></strong></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text"><div class="spec-content detail-content article-content"><?php echo $object->steps; ?></div></td>
|
||||
<td class="text right-content"><div class="detail-content article-content"><?php echo zget($lang->bug->typeList, $object->type);?></div></td>
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
</table>
|
||||
</div>
|
||||
<div class="main-col right-content col-md-4">
|
||||
<?php include '../../common/view/action.html.php';?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user