* finish task #6935.
This commit is contained in:
@@ -151,7 +151,7 @@ $lang->repo->error->output = "The command is: %s\nThe error is(%s): %s\n"
|
||||
$lang->repo->error->clientVersion = "Client version is too low, please upgrade or change SVN client";
|
||||
$lang->repo->error->encoding = "The encoding maybe wrong. Please change the encoding and try again.";
|
||||
|
||||
$lang->repo->synTips = '<strong>You may find the reference about how to set Git sync from <a target="_blank" href="https://www.zentao.pm/book/zentaomanual/free-open-source-project-management-software-git-105.html">here</a>.</strong>';
|
||||
$lang->repo->syncTips = '<strong>You may find the reference about how to set Git sync from <a target="_blank" href="https://www.zentao.pm/book/zentaomanual/free-open-source-project-management-software-git-105.html">here</a>.</strong>';
|
||||
$lang->repo->encodingsTips = "The encodings of commit comments, can be comma separated values,e.g. utf-8";
|
||||
|
||||
$lang->repo->example = new stdclass();
|
||||
|
||||
@@ -153,7 +153,7 @@ $lang->repo->error->output = "执行命令:%s\n错误结果(%s): %s\n
|
||||
$lang->repo->error->clientVersion = "客户端版本过低,请升级或更换SVN客户端";
|
||||
$lang->repo->error->encoding = "编码可能错误,请更换编码重试。";
|
||||
|
||||
$lang->repo->synTips = '请参照<a target="_blank" href="https://www.zentao.net/book/zentaopmshelp/207.html">这里</a>,设置版本库定时同步。';
|
||||
$lang->repo->syncTips = '请参照<a target="_blank" href="https://www.zentao.net/book/zentaopmshelp/207.html">这里</a>,设置版本库定时同步。';
|
||||
$lang->repo->encodingsTips = "提交日志的编码,可以用逗号连接起来的多个,比如utf-8。";
|
||||
|
||||
$lang->repo->example = new stdclass();
|
||||
|
||||
@@ -0,0 +1,113 @@
|
||||
<?php
|
||||
/**
|
||||
* The browse view file of repo module of ZenTaoPMS.
|
||||
*
|
||||
* @copyright Copyright 2009-2012 青岛易软天创网络科技有限公司 (QingDao Nature Easy Soft Network Technology Co,LTD www.cnezsoft.com)
|
||||
* @author Wang Yidong, Zhu Jinyong
|
||||
* @package repo
|
||||
* @version $Id: browse.html.php $
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<div id='mainMenu' class='clearfix'>
|
||||
<div class='btn-toolbar pull-left'>
|
||||
<div class="page-title">
|
||||
<strong>
|
||||
<?php
|
||||
echo html::a($this->repo->createLink('browse', "repoID=$repoID"), $repo->name);
|
||||
if(!empty($path))
|
||||
{
|
||||
$paths = explode('/', $path);
|
||||
$postPath = '';
|
||||
foreach($paths as $pathName)
|
||||
{
|
||||
$postPath .= $pathName . '/';
|
||||
echo '/' . ' ' . html::a($this->repo->createLink('browse', "repoID=$repoID", "path=" . $this->repo->encodePath($postPath) . "&revision=$revision"), trim($pathName, '/'));
|
||||
}
|
||||
}
|
||||
?>
|
||||
</strong>
|
||||
</div>
|
||||
</div>
|
||||
<div class="btn-toolbar pull-right">
|
||||
<span class='last-sync-time'<?php echo $lang->repo->notice->lastSyncTime . $cacheTime?></span>
|
||||
<?php echo html::a($this->repo->createLink('browse', "repoID=$repoID&path=&revision=$revision&refresh=1", "path=" . $this->repo->encodePath($path)), "<i class='icon icon-refresh'></i> ". $lang->refresh, '', "class='btn btn-primary'");?>
|
||||
</div>
|
||||
</div>
|
||||
<div id="mainContent" class="main-row fade">
|
||||
<div class="main-col main-table">
|
||||
<table class='table table-fixed'>
|
||||
<thead>
|
||||
<tr>
|
||||
<th width='30'></th>
|
||||
<th style="min-width: 150px;"><?php echo $lang->repo->name?></th>
|
||||
<th width='80' class='text-center'><?php echo $lang->repo->revisions?></th>
|
||||
<th width='80'><?php echo $lang->repo->time?></th>
|
||||
<th width='120'><?php echo $lang->repo->committer?></th>
|
||||
<th><?php echo $lang->repo->comment?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach($infos as $info):?>
|
||||
<?php if(empty($info->name)) continue;?>
|
||||
<tr>
|
||||
<td class="icon">
|
||||
<span class="<?php echo $info->kind == 'dir' ? 'directory' : 'file';?> mini-icon"></span>
|
||||
</td>
|
||||
<td>
|
||||
<?php
|
||||
$infoPath = trim($path . '/' . $info->name, '/');
|
||||
$link = $info->kind == 'dir' ? $this->repo->createLink('browse', "repoID=$repoID", "path=" . $this->repo->encodePath($infoPath)) : $this->repo->createLink('view', "repoID=$repoID&entry=", 'entry=' . $this->repo->encodePath($infoPath));
|
||||
echo html::a($link, $info->name, '', "title='{$info->name}'");
|
||||
?>
|
||||
</td>
|
||||
<td align='center'><?php echo $repo->SCM == 'Git' ? substr($info->revision, 0, 10) : $info->revision;?></td>
|
||||
<td><?php echo substr($info->date, 0, 10)?></td>
|
||||
<td><?php echo $info->committer?></td>
|
||||
<?php $comment = htmlspecialchars($info->comment, ENT_QUOTES);?>
|
||||
<td class='comment' title='<?php echo $comment?>'><?php echo $comment?></td>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="side-col" id="sidebar">
|
||||
<div class="sidebar-toggle"><i class="icon icon-angle-right"></i></div>
|
||||
<div class='side-body'><?php include 'ajaxsidelogs.html.php';?></div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$(function()
|
||||
{
|
||||
$.get(createLink('repo', 'ajaxSyncLatestCommit', "repoID=<?php echo $repoID;?>"), function(data)
|
||||
{
|
||||
if(data == 'finished')
|
||||
{
|
||||
$('#mainContent').load(location.href + ' #mainContent', function()
|
||||
{
|
||||
$('#mainContent #mainContent .main-col').unwrap();
|
||||
$('#sidebar #logForm').table();
|
||||
|
||||
if($("input:checkbox[name='revision[]']:checked").length < 2)
|
||||
{
|
||||
$("input:checkbox[name='revision[]']:lt(2)").attr('checked', 'checked');
|
||||
}
|
||||
$("input:checkbox[name='revision[]']").each(function(){ if(!$(this).is(':checked')) $(this).attr("disabled","disabled")});
|
||||
$("input:checkbox[name='revision[]']").click(function()
|
||||
{
|
||||
var checkNum = $("input:checkbox[name='revision[]']:checked").length;
|
||||
if (checkNum >= 2)
|
||||
{
|
||||
$("input:checkbox[name='revision[]']").each(function(){ if(!$(this).is(':checked')) $(this).attr("disabled","disabled")});
|
||||
}
|
||||
else
|
||||
{
|
||||
$("input:checkbox[name='revision[]']").each(function(){$(this).attr("disabled", false)});
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
@@ -27,7 +27,7 @@
|
||||
<tr>
|
||||
<th class='thWidth'><?php echo $lang->repo->type; ?></th>
|
||||
<td style="width:550px"><?php echo html::select('SCM', $lang->repo->scmList, 'Git', "onchange='scmChanged(this.value)' class='form-control'"); ?></td>
|
||||
<td class="tips-git"><?php echo $lang->repo->synTips; ?></td>
|
||||
<td class="tips-git"><?php echo $lang->repo->syncTips; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->repo->name; ?></th>
|
||||
@@ -62,7 +62,11 @@
|
||||
<tr class="account-fields">
|
||||
<th><?php echo $lang->repo->password;?></th>
|
||||
<td>
|
||||
<div class='input-group'>
|
||||
<?php echo html::password('password', '', "class='form-control'");?>
|
||||
<span class='input-group-addon fix-border fix-padding'></span>
|
||||
<?php echo html::select('encrypt', $lang->repo->encryptList, 'base64', "class='form-control'");?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
<th class='thWidth'><?php echo $lang->repo->type; ?></th>
|
||||
<td style="width:550px"><?php echo html::select('SCM', $lang->repo->scmList, $repo->SCM, "onchange='scmChanged(this.value)' class='form-control'"); ?></td>
|
||||
<td>
|
||||
<span class="tips-git"><?php echo $lang->repo->synTips; ?></span>
|
||||
<span class="tips-git"><?php echo $lang->repo->syncTips; ?></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -66,7 +66,11 @@
|
||||
<tr class="account-fields">
|
||||
<th><?php echo $lang->repo->password;?></th>
|
||||
<td>
|
||||
<div class='input-group'>
|
||||
<?php echo html::password('password', $repo->password, "class='form-control'");?>
|
||||
<span class='input-group-addon fix-border fix-padding'></span>
|
||||
<?php echo html::select('encrypt', $lang->repo->encryptList, $repo->encrypt, "class='form-control'");?>
|
||||
</div>
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
|
||||
Reference in New Issue
Block a user