mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-04 00:20:07 +00:00
Merge pull request #1011 from haiwen/view-trash-file
update trash file view page
This commit is contained in:
@@ -7,8 +7,5 @@
|
|||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block file_path %}
|
{% block file_path %}
|
||||||
{% trans "Current Path: "%}
|
{% trans "Current Path: "%}{% trans "Trash" %}
|
||||||
{% 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 %}
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@@ -679,12 +679,10 @@ def view_trash_file(request, repo_id):
|
|||||||
basedir = request.GET.get('base', '')
|
basedir = request.GET.get('base', '')
|
||||||
if not basedir:
|
if not basedir:
|
||||||
raise Http404
|
raise Http404
|
||||||
ret_dict['basedir'] = basedir
|
|
||||||
|
|
||||||
# generate file path navigator
|
if basedir != '/':
|
||||||
path = ret_dict['path']
|
tmp_path = posixpath.join(basedir.rstrip('/'), ret_dict['path'].lstrip('/'))
|
||||||
repo = ret_dict['repo']
|
ret_dict['path'] = tmp_path
|
||||||
ret_dict['zipped'] = gen_path_link(path, repo.name)
|
|
||||||
|
|
||||||
return render_to_response('view_trash_file.html', ret_dict,
|
return render_to_response('view_trash_file.html', ret_dict,
|
||||||
context_instance=RequestContext(request), )
|
context_instance=RequestContext(request), )
|
||||||
|
Reference in New Issue
Block a user