Skip to content

Commit 2c998d2

Browse files
author
mominur-helios
committed
fix url route
1 parent 24c1fbf commit 2c998d2

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

templates/includes/subdirectories.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
role="button"
1212
aria-expanded="false"
1313
aria-controls="collapse{{subdirectory.id}}"
14+
onclick="window.location.href = '{% url 'file_manager' subdirectory.path|urlencode %}';"
1415
>
1516
{{ subdirectory.name }}
1617
</a>
@@ -22,7 +23,7 @@
2223
class="ms-{{depth}} collapse show"
2324
>
2425
<i class="fa-solid fa-folder"></i>
25-
<a href="{% url 'file_manager' subdirectory.path %}">{{ subdirectory.name }}</a>
26+
<a href="{% url 'file_manager' subdirectory.path|urlencode %}">{{ subdirectory.name }}</a>
2627
</li>
2728
{% endif %}
2829
{% endfor %}

templates/pages/file-manager.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
role="button"
4545
aria-expanded="false"
4646
aria-controls="collapse{{directory.id}}"
47+
onclick="window.location.href = '{% url 'file_manager' directory.path|urlencode %}';"
4748
>
4849
{{ directory.name }}
4950
</a>
@@ -52,7 +53,7 @@
5253
{% else %}
5354
<li>
5455
<i class="fa-solid fa-folder"></i>
55-
<a href="{% url 'file_manager' directory.path %}">{{ directory.name }}</a>
56+
<a href="{% url 'file_manager' directory.path|urlencode %}">{{ directory.name }}</a>
5657
</li>
5758
{% endif %}
5859
{% endfor %}

0 commit comments

Comments
 (0)