You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
228 lines
16 KiB
228 lines
16 KiB
{% load i18n l10n admin_list filer_tags filer_admin_tags static %}
|
|
<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 %}/en/admin/filer/folder/{{ folder.id }}/upload/{% else %}/en/admin/filer/folder/upload/{% endif %}" data-folder-name="{% if folder.is_root %}{% trans 'Unsorted Uploads' %}{% else %}{{ folder.name }}{% endif %}" data-max-uploader-connections="{{ uploader_connections }}" data-max-file-size="20">
|
|
<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/unfiled_folder_48x48.png' %}" alt="{% trans 'Folder Icon' %}" width="40" height="auto">
|
|
</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="/en/admin/filer/folder/{{ subfolder.id }}/upload/" data-folder-name="{{ subfolder.name }}" data-max-uploader-connections="{{ uploader_connections }}" data-max-file-size="20">
|
|
<td class="column-checkbox">
|
|
{% if filer_admin_context.pick_folder and item.file_type == 'Folder' %}
|
|
<a class="insertlink insertlinkButton"
|
|
href="#" onclick="window.{% if request.GET.child %}{% for child in "x"|rjust:request.GET.child %}parent.{% endfor %}{% else %}parent.{% endif %}dismissRelatedFolderLookupPopup( {{ subfolder.id }}, '{{ 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 }}" 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/plainfolder_48x48.png' %}" alt="{% trans 'Folder Icon' %}" width="40" height="auto">
|
|
</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 mr-1 text-black-50 legitRipple"><span class="fa fa-pencil"></span></a>
|
|
<a href="{{ subfolder.get_admin_delete_url }}{% filer_admin_context_url_params %}" class="action-button mr-1 text-black-50 legitRipple" 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" href="#" onclick="window.{% if request.GET.child %}{% for child in "x"|rjust:request.GET.child %}parent.{% endfor %}{% else %}parent.{% endif %}dismissRelatedImageLookupPopup( {{ file.id|unlocalize }}, '{{ file.icons.48|escapejs }}', '{{ file.label|escapejs }}'); 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 }}" name="_selected_action">
|
|
{% endif %}
|
|
</td>
|
|
<td class="column-icon">
|
|
{% if is_popup and filer_admin_context.pick_file %}
|
|
<a href="#" onclick="window.{% if request.GET.child %}{% for child in "x"|rjust:request.GET.child %}parent.{% endfor %}{% else %}parent.{% endif %}dismissRelatedImageLookupPopup( {{ file.id|unlocalize }}, '{{ file.icons.48|escapejs }}', '{{ file.label|escapejs }}'); return false;"
|
|
{# <a href="#" onclick="window.dismissRelatedImageLookupPopup( {{ file.id|unlocalize }}, '{{ file.icons.48|escapejs }}', '{{ file.label|escapejs }}'); 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 %}
|
|
<img class="filer_img_class" src="{% if file.icons.48 %}{{ file.icons.48 }}{% else %}{% static 'filer/icons/missingfile_48x48.png' %}{% endif %}" alt="{{ file.default_alt_text }}" width="50" height="auto">
|
|
{% 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="window.{% if request.GET.child %}{% for child in "x"|rjust:request.GET.child %}parent.{% endfor %}{% else %}parent.parent.{% endif %}dismissRelatedImageLookupPopup( {{ file.id|unlocalize }}, '{{ file.icons.48|escapejs }}', '{{ file.label|escapejs }}'); 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" %}, {{ file.width }}x{{ file.height }} 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 mr-1 text-black-50 legitRipple" 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 mr-1 text-black-50 legitRipple"><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 mr-1 text-black-50 legitRipple"><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 mr-1 text-black-50 legitRipple"><span class="fa fa-trash"></span></a>
|
|
</td>
|
|
</tr>
|
|
{% endwith %}
|
|
{% 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 %}/en/admin/filer/folder/{{ folder.id }}/upload/{% else %}/en/admin/filer/folder/upload/{% endif %}" data-folder-name="{% if folder.is_root %}{% trans 'Unsorted Uploads' %}{% else %}{{ folder.name }}{% endif %}" data-max-uploader-connections="{{ uploader_connections }}" data-max-file-size="20">
|
|
<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/plainfolder_48x48.png' %}" alt="{% trans 'Folder Icon' %}" width="40" height="auto">
|
|
<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">{{ 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>
|