diff --git a/media/css/seahub.css b/media/css/seahub.css index 75d9336880..a12269a167 100644 --- a/media/css/seahub.css +++ b/media/css/seahub.css @@ -1197,6 +1197,7 @@ textarea:-moz-placeholder {/* for FF */ #right-panel .hd, .tabnav, .repo-file-list-topbar, +.commit-list-topbar, #dir-view .repo-op, .wiki-top { padding:9px 10px; @@ -1217,6 +1218,7 @@ textarea:-moz-placeholder {/* for FF */ #organization-repos .hd { position:relative; } +.commit-list-topbar, .repo-file-list-topbar { margin-bottom:0; } @@ -1836,9 +1838,13 @@ textarea:-moz-placeholder {/* for FF */ .repo-file-list-not-show { padding-left:10px; } +.commit-list-inner-container .commit-list-topbar { + padding:8px 10px; +} .repo-file-list-inner-container .repo-file-list-topbar { padding:8px 10px; } +.commit-list-topbar .path, .repo-file-list-topbar .path { font-size:14px; line-height:25px; diff --git a/seahub/templates/file_revisions.html b/seahub/templates/file_revisions.html index 3af06d0fb1..e2d772e8a6 100644 --- a/seahub/templates/file_revisions.html +++ b/seahub/templates/file_revisions.html @@ -7,19 +7,38 @@ {% block main_panel %}
{% trans "Tip:a new version will be generated after each modification, and you can restore the file to a previous version." %}
- --{% trans 'Current Path:' %} -{% for name, link in zipped %} -{% if not forloop.last %} -{{ name }} / -{% else %} -{{ name }} -{% endif %} -{% endfor %} -
{% trans 'Time' %} | diff --git a/seahub/views/__init__.py b/seahub/views/__init__.py index 6646ea0126..0a839a601b 100644 --- a/seahub/views/__init__.py +++ b/seahub/views/__init__.py @@ -1448,6 +1448,13 @@ def validate_filename(request): def render_file_revisions (request, repo_id): """List all history versions of a file.""" + + days_str = request.GET.get('days', '') + try: + days = int(days_str) + except ValueError: + days = 7 + path = request.GET.get('p', '/') if path[-1] == '/': path = path[:-1] @@ -1468,8 +1475,7 @@ def render_file_revisions (request, repo_id): can_compare = False try: - commits = seafserv_threaded_rpc.list_file_revisions(repo_id, path, - -1, -1) + commits = seafile_api.get_file_revisions(repo_id, path, -1, -1, days) except SearpcError, e: logger.error(e.msg) return render_error(request, e.msg) @@ -1512,6 +1518,7 @@ def render_file_revisions (request, repo_id): 'is_owner': is_owner, 'can_compare': can_compare, 'can_revert_file': can_revert_file, + 'days': days, }, context_instance=RequestContext(request)) @login_required
---|