Skip to content

Commit

Permalink
fix: empty search query param (#592)
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasvinclav authored Jul 18, 2024
1 parent b184b5e commit b7ac75d
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/unfold/templates/admin/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,14 @@

{% block messages %}
<div class="px-4 lg:px-12">
<div class="container mx-auto">
<div class="{% if not cl.model_admin.list_fullwidth %}container{% endif %} mx-auto">
{% include "unfold/helpers/messages.html" %}
</div>
</div>
{% endblock messages %}

<div class="px-4 pb-12 lg:px-12">
<div id="content" class="{% if not cl.model_admin.list_filter_submit %}container{% endif %} mx-auto {% block coltype %}colM{% endblock %}">
<div id="content" class="{% if not cl.model_admin.list_fullwidth %}container{% endif %} mx-auto {% block coltype %}colM{% endblock %}">
{% if cl %}
{% tab_list "changelist" cl.opts %}
{% elif opts %}
Expand Down
2 changes: 1 addition & 1 deletion src/unfold/templates/admin/change_list.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
{% if not is_popup %}
{% block breadcrumbs %}
<div class="px-4 lg:px-12">
<div class="{% if not cl.model_admin.list_filter_submit %}container{% endif %} mb-6 mx-auto -my-3 lg:mb-12">
<div class="{% if not cl.model_admin.list_fullwidth %}container{% endif %} mb-6 mx-auto -my-3 lg:mb-12">
<ul class="flex">
{% url 'admin:index' as link %}
{% trans 'Home' as name %}
Expand Down
4 changes: 4 additions & 0 deletions src/unfold/templates/unfold/change_list_filter.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ <h3 class="border-b flex font-medium mb-6 px-6 py-4 text-gray-700 text-sm dark:t
{% if request.GET.q %}
<input type="hidden" name="q" value="{{ request.GET.q }}">
{% endif %}

{% if request.GET.o %}
<input type="hidden" name="o" value="{{ request.GET.o }}">
{% endif %}
{% endif %}


Expand Down
2 changes: 1 addition & 1 deletion src/unfold/templates/unfold/helpers/header.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{% if not is_popup %}
{% block header %}
<div class="border-b border-gray-200 mb-6 px-4 lg:px-12 dark:border-gray-800">
<div class="{% if not cl.model_admin.list_filter_submit %}container{% endif %} flex items-center h-16 mx-auto py-4">
<div class="{% if not cl.model_admin.list_fullwidth %}container{% endif %} flex items-center h-16 mx-auto py-4">
<div id="header-inner" class="flex items-center w-full">
<div class="flex items-center w-full">
{% block usertools %}
Expand Down

0 comments on commit b7ac75d

Please sign in to comment.