1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-08-17 06:27:28 +00:00
seahub/templates/repo_history.html

87 lines
3.3 KiB
HTML
Raw Normal View History

2012-07-30 02:25:46 +00:00
{% extends base_template %}
2012-10-27 12:32:45 +00:00
{% load seahub_tags avatar_tags i18n %}
{% load url from future %}
2012-04-24 08:15:29 +00:00
2012-09-15 13:01:06 +00:00
{% block main_panel %}
<div class="w100 ovhd">
<h2 class="fleft"><span class="op-target">{{repo.props.name}}</span> {% trans "modification history" %}</h2>
2012-10-27 12:32:45 +00:00
<button data="{{ SITE_ROOT }}repo/{{ repo.props.id }}/" class="fright" id="back">{% trans "Back to Library"%}</button>
2012-09-15 13:01:06 +00:00
</div>
{% if user_perm == 'rw' %}
<p class="tip">{% trans "Tip: A snapshot will be generated after modification, which records the library state before this modification."%}<a href="{% url 'repo_view_snapshot' repo.props.id %}">{% trans "View Snapshot"%}</a></p>
{% endif %}
2012-09-15 13:01:06 +00:00
<div class="commit-list-outer-container">
<div class="commit-list-inner-container">
<table class="commit-list">
<tr>
<th width="20%" class="time">{% trans "Time" %}</th>
2012-10-27 12:32:45 +00:00
<th width="20%">{% trans "Modifier"%}</th>
<th width="60%">{% trans "Description"%}</th>
2012-09-15 13:01:06 +00:00
</tr>
2012-09-15 13:01:06 +00:00
{% for commit in commits %}
<tr>
<td class="time">{{ commit.ctime|translate_seahub_time }}</td>
2012-09-15 13:01:06 +00:00
<td>
{% if commit.creator_name %}
{% 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 %}
{% trans "None"%}
{% endif %}
2012-09-15 13:01:06 +00:00
{% else %}
{% trans "Unknown"%}
2012-09-15 13:01:06 +00:00
{% endif %}
</td>
2012-09-15 13:01:06 +00:00
<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-15 13:01:06 +00:00
{% endif %}
</td>
</tr>
{% endfor %}
</table>
<div id="paginator">
{% if current_page != 1 %}
2012-10-29 08:33:53 +00:00
<a href="?page={{ prev_page }}&per_page={{ per_page }}">{% trans "Previous"%}</a>
2012-09-15 13:01:06 +00:00
{% endif %}
{% if page_next %}
2012-10-29 08:33:53 +00:00
<a href="?page={{ next_page }}&per_page={{ per_page }}">{% trans "Next"%}</a>
2012-09-15 13:01:06 +00:00
{% endif %}
2012-10-29 08:33:53 +00:00
{% if current_page != 1 or page_next %}
|
{% endif %}
2012-10-27 12:32:45 +00:00
<span>{% trans "Per page: "%}</span>
2012-09-15 13:01:06 +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>
2012-04-24 08:15:29 +00:00
</div>
{% endblock %}
2012-05-29 03:04:03 +00:00
{% block extra_script %}
<script type="text/javascript">
2012-09-15 13:01:06 +00:00
{% include 'snippets/list_commit_detail.html' %}
$('#back').click(function() {
2012-09-15 13:01:06 +00:00
location.href = $(this).attr('data');
2012-05-30 06:11:33 +00:00
});
2012-05-30 11:59:15 +00:00
</script>
2012-05-29 03:04:03 +00:00
{% endblock %}