2012-09-21 06:01:39 +00:00
|
|
|
{% extends base_template %}
|
2012-10-27 12:32:45 +00:00
|
|
|
{% load seahub_tags avatar_tags i18n %}
|
2012-09-21 06:01:39 +00:00
|
|
|
{% load url from future %}
|
|
|
|
|
|
|
|
{% block main_panel %}
|
|
|
|
<div class="w100 ovhd">
|
2013-01-24 03:13:35 +00:00
|
|
|
<h2 class="fleft"><span class="op-target">{{repo.props.name}}</span> {% trans "snapshots"%}</h2>
|
2012-10-27 12:32:45 +00:00
|
|
|
<button data="{{ SITE_ROOT }}repo/history/{{ repo.props.id }}/" class="fright" id="back">{% trans "Back to modification history"%}</button>
|
2012-09-21 06:01:39 +00:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="commit-list-outer-container">
|
|
|
|
<div class="commit-list-inner-container">
|
|
|
|
<table class="commit-list">
|
|
|
|
<tr>
|
2012-10-27 12:32:45 +00:00
|
|
|
<th width="15%" class="time">{% trans "Create Time"%}</th>
|
|
|
|
<th width="15%">{% trans "Last Modifier"%}</th>
|
|
|
|
<th width="55%">{% trans "Detail"%}</th>
|
|
|
|
<th width="15%">{% trans "Operations"%}</th>
|
2012-09-21 06:01:39 +00:00
|
|
|
</tr>
|
|
|
|
|
|
|
|
{% for commit in commits %}
|
|
|
|
<tr>
|
2012-11-05 09:27:57 +00:00
|
|
|
<td class="time">{{ commit.ctime|translate_seahub_time }}</td>
|
2012-09-21 06:01:39 +00:00
|
|
|
<td>
|
|
|
|
{% if commit.creator_name %}
|
2012-10-24 12:46:25 +00:00
|
|
|
{% if not commit.second_parent_id %}
|
|
|
|
<a href="{{ SITE_ROOT }}profile/{{ commit.creator_name }}/">{% avatar commit.creator_name 16 %}</a>
|
|
|
|
<a href="{{ SITE_ROOT }}profile/{{ commit.creator_name }}/">{{ commit.creator_name|email2nickname }}</a>
|
|
|
|
{% else %}
|
2012-10-27 12:32:45 +00:00
|
|
|
{% trans "None"%}
|
2012-10-24 12:46:25 +00:00
|
|
|
{% endif %}
|
2012-09-21 06:01:39 +00:00
|
|
|
{% else %}
|
2012-10-27 12:32:45 +00:00
|
|
|
{% trans "Unknown"%}
|
2012-09-21 06:01:39 +00:00
|
|
|
{% endif %}
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
{{ commit.props.desc|translate_commit_desc }}
|
|
|
|
{% if page_next or not forloop.last %}
|
2013-01-11 08:41:40 +00:00
|
|
|
<a class="lsch" href="#" data-url="{% url 'repo_history_changes' repo.id %}?commit_id={{ commit.id }}" data-time="{{ commit.props.ctime|tsstr_sec }}">{% trans "Details"%}</a>
|
2012-09-21 06:01:39 +00:00
|
|
|
{% endif %}
|
|
|
|
</td>
|
|
|
|
<td>
|
2012-10-27 12:32:45 +00:00
|
|
|
<a href="{% url 'repo_history_view' repo.id %}?commit_id={{ commit.id }}" class="op">{% trans "View"%}</a>
|
2012-11-09 11:16:31 +00:00
|
|
|
<a href="#" data-url="{% url 'seahub.views.repo_history_revert' repo.id %}?commit_id={{ commit.id }}" class="repo-revert op">{% trans "Restore"%}</a>
|
2012-09-21 06:01:39 +00:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
{% endfor %}
|
|
|
|
</table>
|
|
|
|
<div id="paginator">
|
|
|
|
{% if current_page != 1 %}
|
2012-10-27 12:32:45 +00:00
|
|
|
<a href="?page={{ prev_page }}&per_page={{ per_page }}">{% trans "Previous"%}</a> |
|
2012-09-21 06:01:39 +00:00
|
|
|
{% endif %}
|
|
|
|
{% if page_next %}
|
2012-10-27 12:32:45 +00:00
|
|
|
<a href="?page={{ next_page }}&per_page={{ per_page }}">{% trans "Next"%}</a> |
|
2012-09-21 06:01:39 +00:00
|
|
|
{% endif %}
|
2012-10-27 12:32:45 +00:00
|
|
|
<span>{% trans "Per page: "%}</span>
|
2012-09-21 06:01:39 +00:00
|
|
|
{% if per_page == 25 %}
|
|
|
|
<span> 25 </span>
|
|
|
|
{% else %}
|
|
|
|
<a href="?per_page=25" class="per-page">25</a>
|
|
|
|
{% endif %}
|
|
|
|
{% if per_page == 50 %}
|
|
|
|
<span> 50 </span>
|
|
|
|
{% else %}
|
|
|
|
<a href="?per_page=50" class="per-page">50</a>
|
|
|
|
{% endif %}
|
|
|
|
{% if per_page == 100 %}
|
|
|
|
<span> 100 </span>
|
|
|
|
{% else %}
|
|
|
|
<a href="?per_page=100" class="per-page">100</a>
|
|
|
|
{% endif %}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
{% block extra_script %}
|
|
|
|
<script type="text/javascript">
|
|
|
|
{% include 'snippets/list_commit_detail.html' %}
|
2012-09-21 07:32:52 +00:00
|
|
|
$('#back').click(function() {
|
2012-09-21 06:01:39 +00:00
|
|
|
location.href = $(this).attr('data');
|
|
|
|
});
|
2013-03-01 09:31:08 +00:00
|
|
|
addConfirmTo($('.repo-revert'), {
|
|
|
|
'title':'{% trans "Restore Library" %}',
|
|
|
|
'con':'{% trans "Are you sure you want to restore this library?" %}'
|
|
|
|
});
|
2012-09-21 06:01:39 +00:00
|
|
|
</script>
|
|
|
|
{% endblock %}
|