1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-08-30 13:23:14 +00:00
seahub/templates/repo_history_view.html

87 lines
3.6 KiB
HTML
Raw Normal View History

{% extends base_template %}
2012-10-27 12:32:45 +00:00
{% load seahub_tags avatar_tags i18n %}
{% load url from future %}
{% block main_panel %}
2012-09-17 06:30:36 +00:00
<div class="w100 ovhd">
<h2 class="fleft"><span class="op-target">{{repo.props.name}}</span> {% trans "snapshot"%}<span class="commit-time">({{ current_commit.props.ctime|tsstr_sec }})</span></h2>
2012-10-27 12:32:45 +00:00
<button data="{% url 'repo_view_snapshot' repo.id %}" class="fright" id="back">{% trans "Back to snapshots"%}</button>
2012-09-17 06:30:36 +00:00
</div>
{% if path == '/' %}
2012-09-17 06:30:36 +00:00
<div id="repo-latest-commit">
<p class="commit-msg">{{ current_commit.props.desc|translate_commit_desc }}</p>
<p class="meta-info">
<span class="author">
{% if current_commit.props.creator_name %}
{% avatar current_commit.props.creator_name 20 %}
<a class="name" href="{% url 'profile.views.user_profile' current_commit.props.creator_name %}">{{ current_commit.props.creator_name|short_email }}</a>
{% else %}
2012-10-27 12:32:45 +00:00
{% trans "Unknown"%}
2012-09-17 06:30:36 +00:00
{% endif %}
</span>
<span class="time">{{ current_commit.props.ctime|translate_seahub_time }}</span>
</p>
</div>
{% endif %}
2012-09-17 06:30:36 +00:00
<div class="repo-file-list-outer-container">
<div class="repo-file-list-inner-container">
{% if not user_perm %}
2012-09-17 06:30:36 +00:00
<div class="repo-file-list-not-show">
2012-10-27 12:32:45 +00:00
<p class="access-notice">{% trans "Can't view this library"%}</p>
2012-09-17 06:30:36 +00:00
</div>
{% else %}
<div class="repo-file-list-topbar">
<p class="path">
2012-10-27 12:32:45 +00:00
{% trans "Current path: "%}
2012-09-17 06:30:36 +00:00
{% for name, link in zipped %}
{% if not forloop.last %}
<a href="{% url 'repo_history_view' repo.id %}?commit_id={{ current_commit.id }}&p={{ link|urlencode }}">{{ name }}</a> /
2012-09-17 06:30:36 +00:00
{% else %}
{{ name }}
{% endif %}
{% endfor %}
</p>
</div>
<!-- /.repo-file-list-topbar -->
2012-09-17 06:30:36 +00:00
<table class="repo-file-list">
<tr>
<th width="5%"></th>
2012-10-27 12:32:45 +00:00
<th width="65%">{% trans "Name"%}</th>
<th width="30%">{% trans "Size"%}</th>
2012-09-17 06:30:36 +00:00
</tr>
2012-09-17 06:30:36 +00:00
{% for dirent in dir_list %}
<tr>
2012-10-27 12:32:45 +00:00
<td class="icon-container"><img src="{{ MEDIA_URL }}img/folder-icon-24.png" alt="{% trans "Directory"%}" /></td>
2012-09-17 06:30:36 +00:00
<td><a href="{% url 'repo_history_view' repo.id %}?commit_id={{ current_commit.id }}&p={{ path|urlencode }}{{ dirent.obj_name|urlencode }}">{{ dirent.obj_name }}</a></td>
<td></td>
</tr>
{% endfor %}
2012-09-17 06:30:36 +00:00
{% for dirent in file_list %}
<tr>
2012-10-27 12:32:45 +00:00
<td class="icon-container"><img src="{{ MEDIA_URL }}img/file/{{ dirent.obj_name|file_icon_filter }}" alt="{% trans "File"%}" /></td>
<td><a class="op" href="{% url 'view_snapshot_file' repo.props.id %}?obj_id={{ dirent.props.obj_id }}&commit_id={{ current_commit.id }}&p={{ path|urlencode }}{{ dirent.obj_name|urlencode }}">{{ dirent.props.obj_name }}</a></td>
2012-09-17 06:30:36 +00:00
<td>{{ dirent.file_size|filesizeformat }}</td>
<td>
</td>
</tr>
{% endfor %}
</table>
<!-- /.repo-file-list -->
2012-09-17 06:30:36 +00:00
{% endif %}
</div>
</div>
2012-09-17 06:30:36 +00:00
{% endblock %}
{% block extra_script %}
<script type="text/javascript">
$('#back').click(function() {
location.href = $(this).attr('data');
});
</script>
{% endblock %}