* adjust for task #6709.

This commit is contained in:
wangyidong
2019-12-10 17:08:58 +08:00
parent f8c530b3ee
commit 9d1e3969e8
4 changed files with 7 additions and 3 deletions
+1 -1
View File
@@ -133,7 +133,7 @@ class repo extends control
$this->scm->setEngine($repo);
$info = $this->scm->info($entry, $revision);
if($info->kind == 'dir') $this->locate($this->repo->createLink('log', "repoID=$repoID&entry=&revision=$revision", "entry=" . $this->repo->encodePath($info->path)));
if($info->kind == 'dir') $this->locate($this->repo->createLink('browse', "repoID=$repoID&path=&revision=$revision", "path=" . $this->repo->encodePath($info->path)));
$content = $this->scm->cat($entry, $revision);
$entry = urldecode($entry);
$pathInfo = pathinfo($entry);
+2
View File
@@ -177,3 +177,5 @@ h3 {font-size:16px;}
#sidebar>.sidebar-toggle{left:5px; right:auto;}
#sidebar>.sidebar-toggle>.icon{right:-4px; left:auto;}
#logForm .fixed-footer a.allLogs{color:#fff !important;}
+3 -1
View File
@@ -1,6 +1,8 @@
$(document).ready(function()
{
var $pre = $('.repoCode .content pre');
var rowTip = '';
if($('#rowTip').length > 0) rowTip = $('#rowTip').html();
if($pre.length)
{
@@ -11,7 +13,7 @@ $(document).ready(function()
for(var i = 0 ; i < arr.length ; i++)
{
line = i + 1;
code += "<tr data-line='" + line +"'><th id='L" + line + "'><div class='comment-btn view'><span class='icon-wrapper'><i class='icon-plus'></i></span></div>" + line + "</th><td>" + (arr[i] || '&nbsp;') + "</td></tr>";
code += "<tr data-line='" + line +"'><th id='L" + line + "'><div class='comment-btn view'><span class='icon-wrapper'><i class='icon-plus'></i></span></div>" + line + "</th><td>" + (arr[i] || '&nbsp;') + rowTip + "</td></tr>";
}
$pre.html("<table><tbody>" + code + "</tbody></table>");
}
+1 -1
View File
@@ -51,7 +51,7 @@ if(isset($entry)) $pathInfo .= '&type=file';
</table>
<div class='table-footer'>
<?php if(common::hasPriv('repo', 'diff')) echo html::submitButton($lang->repo->diff, '', count($revisions) < 2 ? 'disabled btn btn-primary' : 'btn btn-primary')?>
<?php echo html::a($this->repo->createLink('log', "repoID=$repoID&entry=&revision=HEAD&type=$logType", "entry=" . $this->repo->encodePath($path)), $lang->repo->allLog);?>
<?php echo html::a($this->repo->createLink('log', "repoID=$repoID&entry=&revision=HEAD&type=$logType", "entry=" . $this->repo->encodePath($path)), $lang->repo->allLog, '', "class='allLogs'");?>
<div class='pull-right'>
<div class='btn-group'>
<?php