diff --git a/seahub/templates/file_revisions.html b/seahub/templates/file_revisions.html
index da2012efbc..1771ccbddb 100644
--- a/seahub/templates/file_revisions.html
+++ b/seahub/templates/file_revisions.html
@@ -60,7 +60,7 @@
{{ commit.props.ctime|translate_seahub_time }}
- {% if commit.is_current_version %}
+ {% if commit.is_first_commit %}
{% trans '(current version)' %}
{% endif %}
@@ -80,11 +80,9 @@
| {{ commit.rev_file_size|filesizeformat }} |
- {% if commit.id != repo.head_cmmt_id %}
- {% if can_revert_file %}
+ {% if can_revert_file and not commit.is_first_commit %}
{% trans 'Restore' %}
{% endif %}
- {% endif %}
{% trans 'Download' %}
{% trans 'View' %}
{% if can_compare and not forloop.last %}
diff --git a/seahub/views/__init__.py b/seahub/views/__init__.py
index a6bde3bffa..4acf10d579 100644
--- a/seahub/views/__init__.py
+++ b/seahub/views/__init__.py
@@ -868,6 +868,8 @@ def render_file_revisions (request, repo_id):
(is_locked and not locked_by_me):
can_revert_file = False
+ commits[0].is_first_commit = True
+
# for 'go back'
referer = request.GET.get('referer', '')
|