1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-19 18:29:23 +00:00

modified 'commit-time' in repo & repo_history; added 'commit-time' to repo_history_dir

This commit is contained in:
llj
2012-05-31 17:50:46 +08:00
parent 2f3867b1a3
commit aa9ce1520d
4 changed files with 12 additions and 16 deletions

View File

@@ -220,7 +220,7 @@ table img {
font-weight:normal; font-weight:normal;
} }
#simplemodal-container h3 { #simplemodal-container h3 {
margin-top:0; margin:0 0 4px;
} }
.simplemodal-close { .simplemodal-close {
margin-left:5px; margin-left:5px;
@@ -267,7 +267,8 @@ table img {
} }
.latest-commit-time-author { .latest-commit-time-author {
color:#333; color:#333;
margin-bottom:4px; font-size:13px;
font-weight:normal;
} }
.latest-commit { .latest-commit {
word-wrap:break-word; word-wrap:break-word;

View File

@@ -4,7 +4,10 @@
{% block main_panel %} {% block main_panel %}
<div id="repo-page" class="ovhd"> <div id="repo-page" class="ovhd">
<h2>{{repo.props.name}}</h2> <h2>
{{repo.props.name}}
<span class="latest-commit-time-author">({{ latest_commit.props.ctime|tsstr_sec }})</span>
</h2>
<div class="side fright"> <div class="side fright">
<h3>基本信息</h3> <h3>基本信息</h3>
@@ -60,14 +63,6 @@
{% if not is_owner and repo_ap == 'own' and not share_to_me %} {% if not is_owner and repo_ap == 'own' and not share_to_me %}
<p>该同步目录web匿名访问未开启不能在线查看。</p> <p>该同步目录web匿名访问未开启不能在线查看。</p>
{% else %} {% else %}
<p class="latest-commit-time-author">
{{ latest_commit.props.ctime|tsstr_sec }} by
{% if latest_commit.props.creator_name %}
{{ latest_commit.props.creator_name }}
{% else %}
未知
{% endif %}
</p>
<p class="path"> <p class="path">
当前路径: 当前路径:
{% for name, link in zipped %} {% for name, link in zipped %}

View File

@@ -81,14 +81,14 @@
//list modification made by a commit //list modification made by a commit
$('.lsch').each(function() { $('.lsch').each(function() {
$(this).click(function() { $(this).click(function() {
var str_time_author = '<p class="latest-commit-time-author">' + $(this).attr('data') + ' by ' + $(this).parent().prev().html() + '</p>'; var str_time_author = '<span class="latest-commit-time-author">(' + $(this).attr('data') + ')</span>';
$.ajax({ $.ajax({
url: $(this).attr('href'), url: $(this).attr('href'),
dataType: 'json', dataType: 'json',
cache: false, cache: false,
contentType: 'application/json; charset=utf-8', contentType: 'application/json; charset=utf-8',
success: function(data) { success: function(data) {
var str_title = '<h3>修改详情</h3>'; var str_title = '<h3>修改详情' + str_time_author + '</h3>';
var str_con = ''; var str_con = '';
var show = function(data_) { var show = function(data_) {
str_con += '<ul>'; str_con += '<ul>';
@@ -116,7 +116,7 @@
if (!str_con) { if (!str_con) {
str_con = '<p>没有文件被改动</p>'; str_con = '<p>没有文件被改动</p>';
} }
$('#ls-ch').html(str_title + str_time_author + str_con); $('#ls-ch').html(str_title + str_con);
$('#ls-ch').modal({appendTo:'#main'}); $('#ls-ch').modal({appendTo:'#main'});
} }
}); });

View File

@@ -5,7 +5,7 @@
{% if not repo.props.encrypted %} {% if not repo.props.encrypted %}
{% if is_owner or repo_ap == 'public' or share_to_me %} {% if is_owner or repo_ap == 'public' or share_to_me %}
<div class="latest-commit"> <div class="latest-commit">
<h3>最新修改</h3> <h3>修改信息</h3>
<p>{{ current_commit.props.desc|translate_commit_desc }}</p> <p>{{ current_commit.props.desc|translate_commit_desc }}</p>
<p class="al-rt"> <p class="al-rt">
<span class="author">by <span class="author">by
@@ -27,7 +27,7 @@
{% endblock%} {% endblock%}
{% block right_panel %} {% block right_panel %}
<h2 class="repo-history-hd">{{repo.props.name}} 历史浏览</h2> <h2 class="repo-history-hd">{{repo.props.name}} 历史浏览<span class="latest-commit-time-author">({{ current_commit.props.ctime|tsstr_sec }})</span></h2>
{% if repo.props.encrypted %} {% if repo.props.encrypted %}
<p>该同步目录已加密,不能在线查看。</p> <p>该同步目录已加密,不能在线查看。</p>
{% else %} {% else %}