parent
3acf73623b
commit
b25ae9e354
@ -414,6 +414,9 @@ class MessagesFilterAdmin(django_filters.FilterSet):
|
||||
model = Message
|
||||
fields = ["closed", "spam", "message_type"]
|
||||
|
||||
def is_contact_messages(self):
|
||||
return "message_type" in self.form.cleaned_data and "contact_form" in self.form.cleaned_data["message_type"]
|
||||
|
||||
|
||||
class SimpleSearchEventFilter(django_filters.FilterSet):
|
||||
q = django_filters.CharFilter(method="custom_filter",
|
||||
@ -478,8 +481,6 @@ class SimpleSearchEventFilter(django_filters.FilterSet):
|
||||
if not kwargs["request"].user.is_authenticated:
|
||||
self.form.fields.pop("status")
|
||||
|
||||
def is_contact_messages(self):
|
||||
return "message_type" in self.form.cleaned_data and "contact_form" in self.form.cleaned_data["message_type"]
|
||||
|
||||
|
||||
class SearchEventFilter(django_filters.FilterSet):
|
||||
|
@ -641,6 +641,16 @@ header .remarque {
|
||||
grid-column: 1/3;
|
||||
}
|
||||
}
|
||||
.form.recent.messages {
|
||||
div:nth-child(2) {
|
||||
grid-column: 1/2;
|
||||
}
|
||||
div:nth-last-child(3) {
|
||||
grid-column: 2/3;
|
||||
grid-row: 1/3;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#search {
|
||||
form {
|
||||
|
@ -65,9 +65,9 @@
|
||||
</article>
|
||||
|
||||
{% if filter.is_contact_messages %}
|
||||
{% include "agenda_culturel/side-nav.html" with current="messages" %}
|
||||
{% include "agenda_culturel/side-nav.html" with current="contact_messages" %}
|
||||
{% else %}
|
||||
{% include "agenda_culturel/side-nav.html" with current="contact_messages" %}
|
||||
{% include "agenda_culturel/side-nav.html" with current="messages" %}
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user