Skip to content

Commit b665fcb

Browse files
committed
fix: Relect template block structure of Django 5.2+
1 parent 7aa9b13 commit b665fcb

File tree

2 files changed

+17
-14
lines changed

2 files changed

+17
-14
lines changed

filer/templates/admin/filer/folder/directory_listing.html

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,9 @@
7373
<h2>&nbsp;</h2>
7474
{% endblock %}
7575

76+
{% block object-tools %}
77+
{% endblock %}
78+
7679
{% block content %}
7780
<div class="navigator-top-nav clearfix">
7881
<div class="breadcrumbs-container-wrapper">
@@ -166,7 +169,7 @@ <h2>&nbsp;</h2>
166169
</div>
167170
</div>
168171
<div class="tools-container">
169-
{% block object-tools %}
172+
{% block filer-tools %}
170173
<div class="navigator-tools">
171174
{% if not is_popup %}
172175
<div class="actions-wrapper">
@@ -196,7 +199,7 @@ <h2>&nbsp;</h2>
196199
<li>{% filer_folder_list_type_switcher %}</li>
197200
</ul>
198201
</div>
199-
{% block object-tools-items %}
202+
{% block filer-tools-items %}
200203
<div class="navigator-button-wrapper">
201204
{% if folder.can_have_subfolders and can_make_folder %}
202205
<a href="{% url 'admin:filer-directory_listing-make_root_folder' %}?parent_id={{ folder.pk|safe }}{% if is_popup %}&amp;_popup=1{% endif %}"
@@ -209,28 +212,28 @@ <h2>&nbsp;</h2>
209212

210213
{% if permissions.has_add_children_permission and not folder.is_root %}
211214
<a href="#" id="id_upload_button" title="{% trans 'Upload Files' %}"
212-
class="navigator-button navigator-button-upload js-upload-button"
213-
data-url="{% url 'admin:filer-ajax_upload' folder_id=folder.id %}"
214-
data-max-uploader-connections="{{ uploader_connections }}"
215-
data-max-files="{{ max_files|safe }}"
216-
{% if max_filesize %}data-max-filesize="{{ max_filesize|safe }}"{% endif %}
215+
class="navigator-button navigator-button-upload js-upload-button"
216+
data-url="{% url 'admin:filer-ajax_upload' folder_id=folder.id %}"
217+
data-max-uploader-connections="{{ uploader_connections }}"
218+
data-max-files="{{ max_files|safe }}"
219+
{% if max_filesize %}data-max-filesize="{{ max_filesize|safe }}"{% endif %}
217220
>
218221
{% trans "Upload Files" %}
219222
</a>
220223
{% elif folder.is_unsorted_uploads %}
221224
<a href="#" id="id_upload_button" title="{% trans 'Upload Files' %}"
222-
class="navigator-button navigator-button-upload js-upload-button"
223-
data-url="{% url 'admin:filer-ajax_upload' %}"
224-
data-max-uploader-connections="{{ uploader_connections }}"
225-
data-max-files="{{ max_files|safe }}"
226-
{% if max_filesize %}data-max-filesize="{{ max_filesize|safe }}"{% endif %}
225+
class="navigator-button navigator-button-upload js-upload-button"
226+
data-url="{% url 'admin:filer-ajax_upload' %}"
227+
data-max-uploader-connections="{{ uploader_connections }}"
228+
data-max-files="{{ max_files|safe }}"
229+
{% if max_filesize %}data-max-filesize="{{ max_filesize|safe }}"{% endif %}
227230
>
228231
{% trans "Upload Files" %}
229232
</a>
230233
{% endif %}
231234
{% if folder.is_root and not folder.is_unsorted_uploads %}
232235
<span class="js-upload-button-disabled upload-button-disabled js-filer-tooltip filer-tooltip-wrapper"
233-
title="{% trans 'You have to select a folder first' %}">
236+
title="{% trans 'You have to select a folder first' %}">
234237
<a href="#" class="navigator-button navigator-button-upload" disabled>
235238
{% trans "Upload Files" %}
236239
</a>

filer/templates/admin/filer/folder/directory_table_list.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
<td class="column-icon">
5757
<a href="{{ subfolder.get_admin_directory_listing_url_path }}{% filer_admin_context_url_params %}"
5858
title="{% blocktrans with subfolder.name as item_label %}Change '{{ item_label }}' folder details{% endblocktrans %}">
59-
<img src="{% static 'filer/icons/folder.svg' %}" alt="{% translate 'Folder Icon' %}" width="{% widthratio 7 10 thumbnail_size %}" height="{% widthratio 7 10 thumbnail_size %}" style="height: {{ thumbnail_size }}px;">
59+
<img src="{% static 'filer/icons/folder.svg' %}" alt="{% translate 'Folder Icon' %}" width="{% widthratio 7 10 thumbnail_size %}" height="{% widthratio 7 10 thumbnail_size %}" style="height: {% widthratio 7 10 thumbnail_size %}px;">
6060
</a>
6161
</td>
6262
<td class="column-name">

0 commit comments

Comments
 (0)