1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-08-31 14:42:10 +00:00

Merge pull request #1011 from haiwen/view-trash-file

update trash file view page
This commit is contained in:
Daniel Pan
2016-01-29 14:33:34 +08:00
2 changed files with 4 additions and 9 deletions

View File

@@ -7,8 +7,5 @@
{% endblock %}
{% block file_path %}
{% trans "Current Path: "%}
{% for name, link in zipped %}
{% if not forloop.last %} <a href="{% url 'repo_recycle_view' repo.id %}?commit_id={{ current_commit.id }}&base={{ basedir|urlencode }}&p={{ link|urlencode }}">{{ name }}</a> / {% else %} {{ name }} {% endif %}
{% endfor %}
{% trans "Current Path: "%}{% trans "Trash" %}
{% endblock %}

View File

@@ -679,12 +679,10 @@ def view_trash_file(request, repo_id):
basedir = request.GET.get('base', '')
if not basedir:
raise Http404
ret_dict['basedir'] = basedir
# generate file path navigator
path = ret_dict['path']
repo = ret_dict['repo']
ret_dict['zipped'] = gen_path_link(path, repo.name)
if basedir != '/':
tmp_path = posixpath.join(basedir.rstrip('/'), ret_dict['path'].lstrip('/'))
ret_dict['path'] = tmp_path
return render_to_response('view_trash_file.html', ret_dict,
context_instance=RequestContext(request), )