2012-09-30 11:40:35 +00:00
|
|
|
{% extends base_template %}
|
|
|
|
|
2012-11-04 05:29:20 +00:00
|
|
|
{% load seahub_tags avatar_tags i18n %}
|
2012-09-30 11:40:35 +00:00
|
|
|
{% load url from future %}
|
|
|
|
|
|
|
|
{% block main_panel %}
|
|
|
|
<div class="w100 ovhd">
|
2012-11-04 05:29:20 +00:00
|
|
|
<h2 class="fleft">{{repo.props.name}} {% trans "'s trash" %}</h2>
|
|
|
|
<button data="{% url 'repo' repo.id %}" class="fright" id="back">{% trans "Back to Library" %}</button>
|
2012-09-30 11:40:35 +00:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="repo-file-list-outer-container">
|
|
|
|
<div class="repo-file-list-inner-container">
|
|
|
|
<div class="repo-file-list-topbar">
|
2013-01-04 03:32:50 +00:00
|
|
|
<span class="path">
|
2012-11-04 05:29:20 +00:00
|
|
|
{% trans "Current path: " %}
|
2013-01-04 03:32:50 +00:00
|
|
|
<a href="{% url 'repo_recycle_view' repo.id %}?days={{days}}">{{repo.props.name}} {% trans "'s trash" %}</a>
|
2012-09-30 11:40:35 +00:00
|
|
|
{% if not show_recycle_root %}
|
|
|
|
{% for name, link in zipped %}
|
|
|
|
{% if not forloop.last %}
|
2013-01-04 03:32:50 +00:00
|
|
|
/ <a href="{% url 'repo_recycle_view' repo.id %}?commit_id={{ commit_id }}&base={{ basedir|urlencode }}&p={{ link|urlencode }}&days={{days}}">{{ name }}</a>
|
2012-09-30 11:40:35 +00:00
|
|
|
{% else %}
|
|
|
|
/ {{ name }}
|
|
|
|
{% endif %}
|
|
|
|
{% endfor %}
|
|
|
|
{% endif %}
|
2013-01-04 03:32:50 +00:00
|
|
|
</span>
|
|
|
|
|
|
|
|
{% if show_recycle_root %}
|
|
|
|
<span class="fright">
|
|
|
|
{% if days != 7 %}
|
|
|
|
<a href="{% url 'repo_recycle_view' repo.id %}?days=7">{% trans "a week" %}</a> /
|
|
|
|
{% else %}
|
|
|
|
{% trans "a week" %} /
|
|
|
|
{% endif %}
|
|
|
|
{% if days != 30 %}
|
|
|
|
<a href="{% url 'repo_recycle_view' repo.id %}?days=30">{% trans "a month" %}</a> /
|
|
|
|
{% else %}
|
|
|
|
{% trans "a month" %} /
|
|
|
|
{% endif %}
|
|
|
|
{% if days != 0 %}
|
|
|
|
<a href="{% url 'repo_recycle_view' repo.id %}?days=0">{% trans "all" %}</a>
|
|
|
|
{% else %}
|
|
|
|
{% trans "all" %}
|
|
|
|
{% endif %}
|
|
|
|
</span>
|
|
|
|
{% endif %}
|
2012-09-30 11:40:35 +00:00
|
|
|
</div>
|
|
|
|
<!-- /.repo-file-list-topbar -->
|
|
|
|
<table class="repo-file-list">
|
|
|
|
<tr>
|
|
|
|
<th width="5%"></th>
|
2012-11-04 05:29:20 +00:00
|
|
|
<th width="60%">{% trans "Name" %}</th>
|
|
|
|
<th width="15%">{% trans "Delete Time" %}</th>
|
|
|
|
<th width="10%">{% trans "Size" %}</th>
|
|
|
|
<th width="10%">{% trans "Operations" %}</th>
|
2012-09-30 11:40:35 +00:00
|
|
|
</tr>
|
|
|
|
|
|
|
|
{% for dirent in dir_list %}
|
|
|
|
<tr>
|
2012-11-04 05:29:20 +00:00
|
|
|
<td class="icon-container"><img src="{{ MEDIA_URL }}img/folder-icon-24.png" alt="{% trans "Directory" %}" /></td>
|
2012-09-30 11:40:35 +00:00
|
|
|
{% if show_recycle_root %}
|
2013-01-04 03:32:50 +00:00
|
|
|
<td><a href="{% url 'repo_recycle_view' repo.id %}?commit_id={{ dirent.commit_id }}&base={{ dirent.basedir|urlencode }}&p=/{{ dirent.obj_name|urlencode }}&days={{days}}">{{ dirent.obj_name }}</a></td>
|
2012-11-05 09:27:57 +00:00
|
|
|
<td>{{ dirent.delete_time|translate_seahub_time }}</td>
|
2012-10-11 06:44:14 +00:00
|
|
|
<td></td>
|
2012-11-04 05:29:20 +00:00
|
|
|
<td><a class="op" href="{% url 'repo_revert_dir' repo.id %}?commit={{ dirent.commit_id }}&p={{ dirent.basedir|urlencode }}{{dirent.obj_name|urlencode}}">{% trans "Restore" %}</a></td>
|
2012-09-30 11:40:35 +00:00
|
|
|
{% else %}
|
2013-01-04 03:32:50 +00:00
|
|
|
<td><a href="{% url 'repo_recycle_view' repo.id %}?commit_id={{ commit_id }}&base={{ basedir|urlencode }}&p={{ path|urlencode }}{{ dirent.obj_name|urlencode }}&days={{days}}">{{ dirent.obj_name }}</a></td>
|
2012-09-30 11:40:35 +00:00
|
|
|
<td></td>
|
|
|
|
<td></td>
|
2012-10-09 06:31:40 +00:00
|
|
|
<td></td>
|
2012-10-11 06:44:14 +00:00
|
|
|
{% endif %}
|
2012-09-30 11:40:35 +00:00
|
|
|
</tr>
|
|
|
|
{% endfor %}
|
|
|
|
|
|
|
|
{% for dirent in file_list %}
|
|
|
|
<tr>
|
2012-11-04 05:29:20 +00:00
|
|
|
<td class="icon-container"><img src="{{ MEDIA_URL }}img/file/{{ dirent.obj_name|file_icon_filter }}" alt="{% trans "File" %}" /></td>
|
2012-09-30 11:40:35 +00:00
|
|
|
{% if show_recycle_root %}
|
2013-03-08 02:20:35 +00:00
|
|
|
<td><a class="op" href="{% url 'view_trash_file' repo.id %}?obj_id={{ dirent.obj_id }}&commit_id={{ dirent.commit_id }}&base={{ dirent.basedir|urlencode }}&p=/{{ dirent.obj_name|urlencode }}&days={{days}}">{{ dirent.obj_name }}</a></td>
|
2012-11-05 09:27:57 +00:00
|
|
|
<td>{{ dirent.delete_time|translate_seahub_time }}</td>
|
2012-10-09 06:31:40 +00:00
|
|
|
<td>{{ dirent.file_size|filesizeformat }}</td>
|
2012-11-04 05:29:20 +00:00
|
|
|
<td><a class="op" href="{% url 'repo_revert_file' repo.id %}?commit={{ dirent.commit_id }}&p={{ dirent.basedir|urlencode }}{{dirent.obj_name|urlencode}}&from=recycle">{% trans "Restore" %}</a></td>
|
2012-09-30 11:40:35 +00:00
|
|
|
{% else %}
|
2013-03-08 02:20:35 +00:00
|
|
|
<td><a class="op" href="{% url 'view_trash_file' repo.id %}?obj_id={{ dirent.obj_id }}&commit_id={{ commit_id }}&base={{ basedir|urlencode }}&p={{ path|urlencode }}{{ dirent.obj_name|urlencode }}&days={{days}}">{{ dirent.props.obj_name }}</a></td>
|
2012-09-30 11:40:35 +00:00
|
|
|
<td></td>
|
|
|
|
<td>{{ dirent.file_size|filesizeformat }}</td>
|
2012-10-09 06:31:40 +00:00
|
|
|
<td></td>
|
|
|
|
{% endif %}
|
2012-09-30 11:40:35 +00:00
|
|
|
</tr>
|
|
|
|
{% endfor %}
|
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
{% block extra_script %}
|
|
|
|
<script type="text/javascript">
|
|
|
|
$('#back').click(function() {
|
|
|
|
location.href = $(this).attr('data');
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
{% endblock %}
|