/
directory_table_list.html
233 lines (222 loc) · 15.8 KB
/
directory_table_list.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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
{% load i18n l10n admin_list filer_tags filer_admin_tags static thumbnail %}
<div class="drag-hover-border"></div>
<section class="navigator{% if is_popup %} navigator-popup{% endif %}">
<table class="js-filer-dropzone js-filer-dropzone-base navigator-table" id="result_list" data-url="{% if folder.id %}{% url 'admin:filer-ajax_upload' folder_id=folder.id %}{% else %}{% url 'admin:filer-ajax_upload' %}{% endif %}" data-folder-name="{% if folder.is_root %}{% trans 'Unsorted Uploads' %}{% else %}{{ folder.name }}{% endif %}"
data-max-uploader-connections="{{ uploader_connections }}"
data-max-files="{{ max_files|safe }}"
{% if max_filesize %}}data-max-filesize="{{ max_filesize|safe }}"{% endif %}>
<thead>
<tr>
<th class="column-checkbox">
{% if paginator.count and not is_popup %}
<input type="checkbox" id="action-toggle">
{% endif %}
</th>
<th class="column-icon"> </th>
<th class="column-name">{% trans "Name" %}</th>
<th class="column-owner">{% trans "Owner" %}</th>
<th class="column-size">{% trans "Size" %}</th>
<th class="column-action">{% trans "Action" %}</th>
</tr>
</thead>
<tbody>
{% for item in virtual_items %}
<tr class="unfiled">
<td class="column-checkbox"> </td>
<td class="column-icon">
<a href="{{ item.get_admin_directory_listing_url_path }}{% filer_admin_context_url_params %}"
title="{% blocktrans with item.name as item_label %}Change '{{ item_label }}' folder details{% endblocktrans %}">
<img src="{% static 'filer/icons/folder-unfiled.svg' %}" alt="{% trans 'Folder Icon' %}" width="28" height="28">
</a>
</td>
<td class="column-name" colspan="4">
<div>
<a href="{{ item.get_admin_directory_listing_url_path }}{% filer_admin_context_url_params %}"
title="{% blocktrans with item.name as item_label %}Change '{{ item_label }}' folder details{% endblocktrans %}">
{{ item.name }}
</a>
</div>
</td>
</tr>
{% endfor %}
{% for item in paginated_items.object_list %}
{% if item.file_type == "Folder" %}
{% with item as subfolder %}
<tr class="js-filer-dropzone js-filer-dropzone-folder" data-url="{% url 'admin:filer-ajax_upload' folder_id=subfolder.id %}" data-folder-name="{{ subfolder.name }}" data-max-uploader-connections="{{ uploader_connections }}" data-max-files="{{ max_files|safe }}" data-max-filesize="{{ max_filesize|safe }}">
<td class="column-checkbox">
{% if filer_admin_context.pick_folder and item.file_type == 'Folder' %}
<a class="insertlink insertlinkButton"
href="#" onclick="opener.dismissRelatedFolderLookupPopup(window, '{{ subfolder.pk|safe }}', '{{ subfolder.quoted_logical_path }}'); return false;" >
</a>
{% elif action_form and item.pk and not is_popup %}
<input type="checkbox" class="action-select" value="folder-{{ item.pk|safe }}" name="_selected_action">
{% endif %}
</td>
<td class="column-icon">
<a href="{{ subfolder.get_admin_directory_listing_url_path }}{% filer_admin_context_url_params %}"
title="{% blocktrans with subfolder.name as item_label %}Change '{{ item_label }}' folder details{% endblocktrans %}">
<img src="{% static 'filer/icons/folder.svg' %}" alt="{% trans 'Folder Icon' %}" width="28" height="28">
</a>
</td>
<td class="column-name">
<div>
<a href="{{ subfolder.get_admin_directory_listing_url_path }}{% filer_admin_context_url_params %}"
title="{% blocktrans with subfolder.name as item_label %}Change '{{ item_label }}' folder details{% endblocktrans %}">
{{ subfolder.name }}
</a>
</div>
</td>
<td class="column-owner">
{{ subfolder.owner|default:"n/a" }}
</td>
<td class="column-size">
{% if not subfolder.is_root %}
<span class="tiny">
({% blocktrans count subfolder.children_count as counter %}{{ counter }} folder{% plural %}{{ counter }} folders{% endblocktrans %},
{% blocktrans count subfolder.file_count as counter %}{{ counter }} file{% plural %}{{ counter }} files{% endblocktrans %})
</span>
{% endif %}
</td>
<td class="column-action">
{% if subfolder.file_type == "Folder" %}
<a href="{% url 'admin:filer_folder_change' subfolder.id %}{% filer_admin_context_url_params %}" title="{% trans 'Change folder details' %}" class="action-button"><span class="fa fa-pencil"></span></a>
<a href="{{ subfolder.get_admin_delete_url }}{% filer_admin_context_url_params %}" class="action-button" title="{% trans 'Remove folder' %}"><span class="fa fa-trash"></span></a>
{% endif %}
</td>
</tr>
{% endwith %}
{% else %}
{% with item as file %}
{% filer_has_permission item 'edit' as has_change_permission %}
<tr>
<td class="column-checkbox">
{% if is_popup and filer_admin_context.pick_file %}
<a class="insertlink insertlinkButton" href="#" onclick="opener.dismissRelatedImageLookupPopup(window, '{{ file.id|unlocalize }}', '{% file_icon_url file %}', '{{ file.label|escapejs }}', '{{ file.get_admin_change_url }}'); return false;"
title="{% trans 'Select this file' %}"> </a>
{% elif action_form and not is_popup %}
<input type="checkbox" class="action-select" value="file-{{ item.pk|safe }}" name="_selected_action">
{% endif %}
</td>
<td class="column-icon">
{% if is_popup and filer_admin_context.pick_file %}
<a href="#" onclick="opener.dismissRelatedImageLookupPopup(window, {{ file.id|unlocalize }}, '{% file_icon_url file %}', '{{ file.label|escapejs }}', '{{ file.get_admin_change_url }}'); return false;"
title="{% trans 'Select this file' %}">
{% elif has_change_permission %}
<a href="{{ file.get_admin_change_url }}{% filer_admin_context_url_params %}"
title="{% blocktrans with file.label as item_label %}Change '{{ item_label }}' details{% endblocktrans %}">
{% endif %}
{% file_icon file %}
{% if has_change_permission or is_popup and filer_admin_context.pick_file %}
</a>
{% endif %}
</td>
<td class="column-name">
<div>
<strong>
{% if is_popup and filer_admin_context.pick_file %}
<a href="#" onclick="opener.dismissRelatedImageLookupPopup(window, {{ file.id|unlocalize }}, '{% file_icon_url file %}', '{{ file.label|escapejs }}', '{{ file.get_admin_change_url }}'); return false;"
title="{% trans 'Select this file' %}">
{% elif has_change_permission %}
<a href="{{ file.get_admin_change_url }}{% filer_admin_context_url_params %}"
title="{% blocktrans with file.label as item_label %}Change '{{ item_label }}' details{% endblocktrans %}">
{% endif %}
{{ file.label }}
{% if has_change_permission or is_popup and filer_admin_context.pick_file %}
</a>
{% endif %}
</strong>
</div>
{% if enable_permissions %}
<div>{% trans "Permissions" %}: {% if file.is_public %}{% trans "disabled" %}{% else %}{% trans "enabled" %}{% endif %}</div>
{% endif %}
</td>
<td class="column-owner">
{{ file.owner|default:"n/a" }}
</td>
<td class="column-size">
<span class="tiny"> ({{ file.size|filesize:"auto1000long" }}{% if file.file_type == "Image" and file.width > 0.0 and file.height > 0.0 %}, {{ file.width|floatformat }}x{{ file.height|floatformat }} px{% endif %})</span>
</td>
<td class="column-action">
<a href="{{ file.canonical_url }}"
title="{% blocktrans with file.label as item_label %}Canonical url '{{ item_label }}'{% endblocktrans %}" class="action-button" target="_blank"><span class="fa fa-link"></span></a>
<a href="{{ file.url }}" target="_blank"
title="{% blocktrans with file.label as item_label %}Download '{{ item_label }}'{% endblocktrans %}" class="action-button"><span class="fa fa-download"></span></a>
<a href="{{ file.get_admin_change_url }}{% filer_admin_context_url_params %}"
title="{% blocktrans with file.label as item_label %}Change '{{ item_label }}' details{% endblocktrans %}" class="action-button"><span class="fa fa-pencil"></span></a>
<a href="{{ file.get_admin_delete_url }}{% filer_admin_context_url_params %}" title="{% trans 'Remove file' %}" class="action-button"><span class="fa fa-trash"></span></a>
</td>
{% endwith %}
</tr>
{% endif %}
{% empty %}
<tr>
<td colspan="6" class="no-files"><span class="fa fa-arrow-down"></span>{% trans 'Drop files here or use the "Upload Files" button' %}</td>
</tr>
{% endfor %}
</tbody>
</table>
<div class="filer-dropzone-info-message js-filer-dropzone js-filer-dropzone-info-message hidden" data-url="{% if folder.id %}{% url 'admin:filer-ajax_upload' folder_id=folder.id %}{% else %}{% url 'admin:filer-ajax_upload' %}{% endif %}"
data-folder-name="{% if folder.is_root %}{% trans 'Unsorted Uploads' %}{% else %}{{ folder.name }}{% endif %}"
data-max-uploader-connections="{{ uploader_connections }}"
data-max-files="{{ max_files|safe }}"
{% if max_filesize %}}data-max-filesize="{{ max_filesize|safe }}"{% endif %}>
<div class="icon"><span class="fa fa-cloud-upload"></span></div>
<div class="filer-dropzone-upload-welcome js-filer-dropzone-upload-welcome">
<div class="text">{% trans "Drop your file to upload into:" %}</div>
<div class="folder">
<div class="folder-inner">
<img src="{% static 'filer/icons/folder.svg' %}" alt="{% trans 'Folder Icon' %}" width="18" height="18">
<span class="js-filer-dropzone-folder-name"></span>
</div>
</div>
</div>
<div class="js-filer-upload-count filer-dropzone-upload-count hidden">
<span class="js-filer-upload-text hidden">{% trans "Upload" %}</span>
<span class="js-filer-dropzone-upload-number"></span>
</div>
<div class="filer-dropzone-upload-info js-filer-dropzone-upload-info-container">
<div class="js-filer-dropzone-upload-info filer-dropzone-upload-info hidden">
<div class="js-filer-dropzone-file-name filer-dropzone-file-name"></div>
<div class="js-filer-dropzone-progress filer-dropzone-progress"></div>
</div>
</div>
<div class="js-filer-dropzone-cancel filer-dropzone-cancel hidden">
<a href="#">{% trans "cancel" %}</a>
</div>
<div class="js-filer-dropzone-upload-success filer-dropzone-upload-success hidden">
{% trans "Upload success!" %}
</div>
<div class="js-filer-dropzone-upload-canceled filer-dropzone-upload-canceled hidden">
{% trans "Upload canceled!" %}
</div>
</div>
<div class="nav-pages paginator">
{% if paginated_items.has_previous %}
<a href="?page={{ paginated_items.previous_page_number }}{% if q %}&q={{ q }}{% endif %}{% filer_admin_context_url_params '&' %}">
{% trans "previous" %}
</a>
{% endif %}
<span class="nav-pages-current">
{% blocktrans with paginated_items.number as number and paginated_items.paginator.num_pages as num_pages %}Page {{ number }} of {{ num_pages }}.{% endblocktrans %}
</span>
{% if paginated_items.has_next %}
<a href="?page={{ paginated_items.next_page_number }}{% if q %}&q={{ q }}{% endif %}{% filer_admin_context_url_params '&' %}">
{% trans "next" %}
</a>
{% endif %}
<div class="actions">
{% if actions_selection_counter %}
<script>var _actions_icnt="{{ paginated_items.object_list|length|default:"0" }}";</script>
<span class="action-counter" data-actions-icnt="{{ paginated_items.object_list|length|default:'0' }}">{{ selection_note }}</span>
{% if paginator.count != paginated_items.object_list|length %}
<span class="all">{{ selection_note_all }}</span>
<span class="question">
<a href="javascript:void(0);" title="{% trans "Click here to select the objects across all pages" %}">{% blocktrans with paginator.count as total_count %}Select all {{ total_count }}{% endblocktrans %}</a>
</span>
<span class="clear"><a href="javascript:void(0);">{% trans "Clear selection" %}</a></span>
{% endif %}
{% endif %}
</div>
</div>
</section>