diff --git a/media/css/seahub.css b/media/css/seahub.css index 2592f9e09a..e583cc0867 100644 --- a/media/css/seahub.css +++ b/media/css/seahub.css @@ -757,18 +757,25 @@ ul.with-bg li { padding:0 5px 0 27px; background-image: url('../img/sync-20.png'); } -.latest-commit { +#repo-latest-commit, +#file-commit-info { word-wrap:break-word; border: 1px solid #C5D5DD; border-radius: 4px; margin-top:10px; } -.latest-commit .commit-msg, -.latest-commit .meta-info { +#file-commit-info { + margin-top:16px; +} +#repo-latest-commit .commit-msg, +#repo-latest-commit .meta-info, +#file-commit-info .latest-commit, +#file-commit-info .contributors { padding:4px 10px; margin:0; } -.latest-commit .commit-msg { +#repo-latest-commit .commit-msg, +#file-commit-info .latest-commit { width:928px; padding:8px 10px; background: #E6F1F6; @@ -776,18 +783,28 @@ ul.with-bg li { border-top-left-radius:3px; border-top-right-radius:3px; } -.latest-commit .commit-msg .more { +#repo-latest-commit .commit-msg .more { margin-left:10px; } -.latest-commit .author .avatar { +#file-commit-info .contributors { + color:#666; +} +#file-commit-info .contributors .avatar { + margin-right:5px; +} +#repo-latest-commit .author .avatar, +#file-commit-info .avatar { border-radius:3px; } -.latest-commit .author .avatar, -.latest-commit .author .name, -.latest-commit .time { +#repo-latest-commit .author .avatar, +#repo-latest-commit .author .name, +#repo-latest-commit .time, +#file-commit-info .name, +#file-commit-info .avatar, +#file-commit-info span { vertical-align:middle; } -.latest-commit .time { +#repo-latest-commit .time { color:#666; margin-left:5px; } @@ -1055,7 +1072,7 @@ ul.with-bg li { background:#dedede; border-radius:3px; -moz-border-radius:3px; - margin-top:23px; + margin-top:12px; } #file-op { padding:8px 10px; diff --git a/templates/repo.html b/templates/repo.html index 193d157520..141b86dcc6 100644 --- a/templates/repo.html +++ b/templates/repo.html @@ -29,7 +29,7 @@ {% if not repo.props.encrypted or password_set %} {% if can_access %} -
+

{{ current_commit.props.desc|translate_commit_desc }} diff --git a/templates/repo_view_file.html b/templates/repo_view_file.html index 870c690521..4870278025 100644 --- a/templates/repo_view_file.html +++ b/templates/repo_view_file.html @@ -15,40 +15,42 @@ {% endif %}

-

- 当前路径: - {% for name, link in zipped %} - {% if not forloop.last %} - {% if view_history %} - {{ name }} / {% else %} - {{ name }} / - {% endif %} - {% else %} - {{ name }} - {% endif %} - {% endfor %} -

- -
- {% if not view_history %} - - - - +

+ 当前路径: + {% for name, link in zipped %} + {% if not forloop.last %} + {% if view_history %} + {{ name }} / {% else %} + {{ name }} / {% endif %} + {% else %} + {{ name }} + {% endif %} + {% endfor %} +

+ +
+ {% if not view_history %} + + + + + {% endif %} +
+ +
+

{% avatar latest_contributor 20 %} {{ latest_contributor|email2nickname }} 做了最新修改

+

+ {{ contributors|length }} 个贡献者 + {% for user in contributors %} + {% avatar user 20 %} + {% endfor %} +

- +
-
- {{ contributors|length }} 个贡献者 - {% for user in contributors %} - - {{ user|email2nickname}}{% avatar user 24 %} - - {% endfor %} -
{% if filetype == 'Text' or filetype == 'Image' or filetype == 'SVG' or filetype == 'Markdown' %} diff --git a/views.py b/views.py index 9f80cd50c6..63cfe9d923 100644 --- a/views.py +++ b/views.py @@ -1094,6 +1094,7 @@ def repo_view_file(request, repo_id): comments = comments_plus_one[:per_page] contributors = get_file_contributors(repo_id, path.encode('utf-8'), file_path_hash, obj_id) + latest_contributor = contributors[0] return render_to_response('repo_view_file.html', { 'repo': repo, @@ -1126,6 +1127,7 @@ def repo_view_file(request, repo_id): 'document_swf_exists': document_swf_exists, 'DOCUMENT_CONVERTOR_ROOT': DOCUMENT_CONVERTOR_ROOT, 'contributors': contributors, + 'latest_contributor': latest_contributor, }, context_instance=RequestContext(request)) def repo_file_get(raw_path):