1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-08-22 08:47:22 +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; margin-bottom: 12px;
} }
/*repo page*/ /*repo page*/
#repo-page h2 {
margin-bottom:16px;
}
#repo-page .side { #repo-page .side {
color:#333; color:#333;
padding-top:33px; width:260px;
width:230px;
} }
#repo-page .main { #repo-page .main {
width:680px; width:650px;
} }
#repo-page .more { #repo-page .more {
font-weight:normal; font-weight:normal;
font-size:12px; font-size:12px;
color:#080; color:#080;
} }
#repo-page h2 { .latest-commit {
margin-bottom:12px; word-wrap:break-word;
} }
#repo-page h3 { .latest-commit .author {
margin-top:24px;
}
.recent-commit {
margin:0;
}
.recent-commit li {
padding:0;
background:none;
color:#222;
}
.recent-commit .author {
font-style:italic; font-style:italic;
margin-left:4px;
} }
.recent-commit .time { .latest-commit .time {
color:#666; color:#666;
margin-left:2px; margin-left:2px;
} }

View File

@ -3,9 +3,24 @@
{% block main_panel %} {% block main_panel %}
<div id="repo-page" class="ovhd"> <div id="repo-page" class="ovhd">
<h2>{{repo.props.name}}</h2>
<div class="side fright"> <div class="side fright">
<p>{{repo.props.desc}}</p> <p>{{repo.props.desc}}</p>
<p>大小:{{ repo_size|filesizeformat }}</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"> <p class="mgt10">
<span class="item-name">WEB匿名访问:</span> <span class="item-name">WEB匿名访问:</span>
{% if is_owner %} {% if is_owner %}
@ -21,25 +36,6 @@
</p> </p>
</div> </div>
<div class="main fleft"> <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 %} {% if repo.props.encrypted %}
<p>该同步目录已加密,不能在线查看。</p> <p>该同步目录已加密,不能在线查看。</p>
{% else %} {% else %}

View File

@ -171,7 +171,7 @@ def repo(request, repo_id):
repo = get_repo(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 = "" token = ""
is_owner = False is_owner = False
@ -205,7 +205,7 @@ def repo(request, repo_id):
return render_to_response('repo.html', { return render_to_response('repo.html', {
"repo": repo, "repo": repo,
"recent_commits": recent_commits, "latest_commit": latest_commit,
"is_owner": is_owner, "is_owner": is_owner,
"repo_ap": repo_ap, "repo_ap": repo_ap,
"repo_size": repo_size, "repo_size": repo_size,