Compare commits

...
3 Commits
Author SHA1 Message Date
klmp200 35a55ff95a Fix animation bug on club list
Also, due to some weird jinja bug, css block is applied even if supposedly
in a conditional statement
2026-09-08 23:17:35 +02:00
klmp200 00cae33a33 Fix moderation view 2026-09-07 17:36:53 +02:00
klmp200 4bfcb6a267 Fix club-list pagination 2026-09-07 17:36:50 +02:00
4 changed files with 16 additions and 10 deletions
+11 -6
View File
@@ -15,9 +15,6 @@
{% endblock %}
{% else %}
{% extends "core/base.jinja" %}
{% block additional_css %}
<link rel="stylesheet" href="{{ static("club/list.scss") }}">
{% endblock %}
{% block description -%}
{% trans %}The list of all clubs existing at UTBM.{% endtrans %}
{%- endblock %}
@@ -26,6 +23,12 @@
{%- endblock %}
{% endif %}
{% block additional_css %}
{% if not is_fragment %}
<link rel="stylesheet" href="{{ static("club/list.scss") }}">
{% endif %}
{% endblock %}
{% from "core/macros.jinja" import paginate_htmx %}
{% block content %}
@@ -33,15 +36,17 @@
<h3>{% trans %}Filters{% endtrans %}</h3>
<form
id="club-list-filters"
hx-get="{{ url("club:club_list") }}"
method="GET"
hx-action="{{ url("club:club_list") }}"
hx-target="#content"
hx-swap="outerHtml"
hx-swap="innerHTML"
hx-push-url="true"
hx-disable="find input, find button"
>
<div class="row gap-4x">
{{ form }}
</div>
<button type="submit" class="btn btn-blue margin-bottom">
<button class="btn btn-blue margin-bottom">
<i class="fa fa-magnifying-glass"></i>{% trans %}Search{% endtrans %}
</button>
</form>
+1
View File
@@ -62,6 +62,7 @@ document.body.addEventListener(
},
);
htmx.config.transitions = true;
Object.assign(window, { htmx });
/**
@@ -31,7 +31,7 @@
{% if is_fragment %}
hx-post="{{ action }}"
hx-target="#content"
hx-swap="outerHtml"
hx-swap="innerHTML"
{% endif %}
>{% trans %}Confirm{% endtrans %}</button>
@@ -39,7 +39,7 @@
{% if is_fragment %}
hx-get="{{ previous }}"
hx-target="#content"
hx-swap="outerHtml"
hx-swap="innerHTML"
{% else %}
action="window.history.back()"
{% endif %}
+2 -2
View File
@@ -39,13 +39,13 @@
<p><button
hx-get="{{ url('core:file_moderate', file_id=f.id) }}"
hx-target="#content"
hx-swap="outerHtml"
hx-swap="innerHTML"
>{% trans %}Moderate{% endtrans %}</button> -
{% set current_page = url('core:file_moderation') + "?page=" + page_obj.number | string %}
<button
hx-get="{{ url('core:file_delete', file_id=f.id) }}?next={{ current_page | urlencode }}&previous={{ current_page | urlencode }}"
hx-target="#file-{{ loop.index }}"
hx-swap="outerHtml"
hx-swap="innerHTML"
>{% trans %}Delete{% endtrans %}</button></p>
</div>
{% endfor %}