-
Notifications
You must be signed in to change notification settings - Fork 574
/
choose_copy_destination.html
45 lines (42 loc) · 2.01 KB
/
choose_copy_destination.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
{% extends "admin/base_site.html" %}
{% load i18n staticfiles %}
{% block breadcrumbs %}
{% include "admin/filer/breadcrumbs.html" %}
{% endblock %}
{% block extrastyle %}{{ block.super }}<link rel="stylesheet" type="text/css" href="{% static 'admin/css/forms.css' %}" />{% endblock %}
{% block content %}
{% if perms_lacking %}
<p>{% blocktrans %}Your account doesn't have permissions to copy all of the selected files and/or folders.{% endblocktrans %}</p>
{% else %}
{% if not destination_folders %}
<p>{% blocktrans %}There are no destination folders available.{% endblocktrans %}</p>
{% else %}
{% if not to_copy %}
<p>{% blocktrans %}There are no files and/or folders available to copy.{% endblocktrans %}</p>
{% else %}
<p>{% blocktrans %}The following files and/or folders will be copied to a destination folder (retaining their tree structure):{% endblocktrans %}</p>
<ul>{{ to_copy|unordered_list }}</ul>
<form action="" method="post">{% csrf_token %}
<div>
{% for f in files_queryset %}
<input type="hidden" name="{{ action_checkbox_name }}" value="file-{{ f.pk }}" />
{% endfor %}
{% for f in folders_queryset %}
<input type="hidden" name="{{ action_checkbox_name }}" value="folder-{{ f.pk }}" />
{% endfor %}
<input type="hidden" name="action" value="copy_files_and_folders" />
<input type="hidden" name="post" value="yes" />
<p><label for="destination">{% blocktrans %}Destination folder:{% endblocktrans %}</label>
<select name="destination" id="destination">
{% for folder, name_and_enabled in destination_folders %}
<option value="{{ folder.pk }}"{% if not name_and_enabled.1 %} disabled="disabled"{% endif %}{% if selected_destination_folder and folder.pk == selected_destination_folder %} selected="selected"{% endif %}>{{ name_and_enabled.0 }}</option>
{% endfor %}
</select></p>
{{ copy_form.as_p_with_help }}
<p><input type="submit" value="{% trans "Copy" %}" /></p>
</div>
</form>
{% endif %}
{% endif %}
{% endif %}
{% endblock %}