1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-08-02 07:47:32 +00:00

improved repo

This commit is contained in:
llj 2012-05-05 17:50:03 +08:00
parent 5143d5d370
commit 352a014d39
3 changed files with 26 additions and 40 deletions

View File

@ -198,38 +198,28 @@ input.ccnet_id { width: 400px; }
margin-bottom: 12px;
}
/*repo page*/
#repo-page h2 {
margin-bottom:16px;
}
#repo-page .side {
color:#333;
padding-top:33px;
width:230px;
width:260px;
}
#repo-page .main {
width:680px;
width:650px;
}
#repo-page .more {
font-weight:normal;
font-size:12px;
color:#080;
}
#repo-page h2 {
margin-bottom:12px;
.latest-commit {
word-wrap:break-word;
}
#repo-page h3 {
margin-top:24px;
}
.recent-commit {
margin:0;
}
.recent-commit li {
padding:0;
background:none;
color:#222;
}
.recent-commit .author {
.latest-commit .author {
font-style:italic;
margin-left:4px;
}
.recent-commit .time {
.latest-commit .time {
color:#666;
margin-left:2px;
}

View File

@ -3,9 +3,24 @@
{% block main_panel %}
<div id="repo-page" class="ovhd">
<h2>{{repo.props.name}}</h2>
<div class="side fright">
<p>{{repo.props.desc}}</p>
<p>大小:{{ repo_size|filesizeformat }}</p>
<p class="latest-commit mgt10">
{{ latest_commit.props.desc }}<br />
<span class="author">by
{% if latest_commit.props.creator_name %}
{{ latest_commit.props.creator_name }}
{% else %}
未知
{% endif %}
</span>
<span class="time">{{ latest_commit.props.ctime|tsstr_sec }}</span>
</p>
<a href="{{ SITE_ROOT }}repo/history/{{repo.props.id}}/" class="more">更多历史...</a>
<p class="mgt10">
<span class="item-name">WEB匿名访问:</span>
{% if is_owner %}
@ -21,25 +36,6 @@
</p>
</div>
<div class="main fleft">
<h2>{{repo.props.name}}</h2>
<ul class="recent-commit">
{% for commit in recent_commits %}
<li>
{{ commit.props.desc }}
<span class="author">
{% if commit.props.creator_name %}
by {{ commit.props.creator_name }}
{% else %}
未知
{% endif %}
</span>
<span class="time">{{ commit.props.ctime|tsstr_sec }}</span>
</li>
{% endfor %}
</ul>
<a href="{{ SITE_ROOT }}repo/history/{{repo.props.id}}/" class="more">更多...</a>
<h3>子目录及文件</h3>
{% if repo.props.encrypted %}
<p>该同步目录已加密,不能在线查看。</p>
{% else %}

View File

@ -171,7 +171,7 @@ def repo(request, repo_id):
repo = get_repo(repo_id)
recent_commits = get_commits(repo_id, 0, 3)
latest_commit = get_commits(repo_id, 0, 1)[0]
token = ""
is_owner = False
@ -205,7 +205,7 @@ def repo(request, repo_id):
return render_to_response('repo.html', {
"repo": repo,
"recent_commits": recent_commits,
"latest_commit": latest_commit,
"is_owner": is_owner,
"repo_ap": repo_ap,
"repo_size": repo_size,