From 917a2b50cc3dd696289a17239121d0cfb2c57e42 Mon Sep 17 00:00:00 2001 From: Sli Date: Fri, 31 Oct 2025 21:51:12 +0100 Subject: [PATCH] Fix naming, fix tooltip and cosmetic changes --- club/views.py | 2 +- com/static/com/css/posters.scss | 22 ---------------------- com/templates/com/poster_list.jinja | 14 +++++--------- com/views.py | 2 +- 4 files changed, 7 insertions(+), 33 deletions(-) diff --git a/club/views.py b/club/views.py index 2c67a56a..02e87ba7 100644 --- a/club/views.py +++ b/club/views.py @@ -777,7 +777,7 @@ class PosterListView( "create_url": reverse_lazy( "club:poster_create", kwargs={"club_id": self.club.id} ), - "edit_url_factory": lambda poster: reverse( + "get_edit_url": lambda poster: reverse( "club:poster_edit", kwargs={"club_id": self.club.id, "poster_id": poster.id}, ), diff --git a/com/static/com/css/posters.scss b/com/static/com/css/posters.scss index 072f1d6d..757d151f 100644 --- a/com/static/com/css/posters.scss +++ b/com/static/com/css/posters.scss @@ -130,28 +130,6 @@ } } - .tooltip { - visibility: hidden; - width: 120px; - background-color: hsl(210, 20%, 98%); - color: hsl(0, 0%, 0%); - text-align: center; - padding: 5px 0; - border-radius: 6px; - position: absolute; - z-index: 10; - - ul { - margin-left: 0; - display: inline-block; - - li { - display: list-item; - list-style-type: none; - } - } - } - &.not_moderated { border: 1px solid red; } diff --git a/com/templates/com/poster_list.jinja b/com/templates/com/poster_list.jinja index a7ce4f5a..5460f54e 100644 --- a/com/templates/com/poster_list.jinja +++ b/com/templates/com/poster_list.jinja @@ -29,6 +29,9 @@ class="image" hover="{% trans %}Click to expand{% endtrans %}" @click="active = $el.firstElementChild" + tooltip="{%- for screen in poster.screens.all() -%} + {{ screen }} + {% endfor %}" > {{ poster.name }} @@ -38,7 +41,7 @@
{% if poster.is_editable %} - + {% trans %}Edit{% endtrans %} @@ -46,20 +49,13 @@ {% if not poster.is_moderated and user.has_perm("com.moderate_poster") %}
{% csrf_token %} -
{% endif %}
-
- -
{% else %}
{% trans %}No posters{% endtrans %}
diff --git a/com/views.py b/com/views.py index 04da8564..eae9bf6a 100644 --- a/com/views.py +++ b/com/views.py @@ -650,7 +650,7 @@ class PosterListView(PermissionRequiredMixin, ComTabsMixin, PosterListBaseView): current_tab = "posters" extra_context = { "create_url": reverse_lazy("com:poster_create"), - "edit_url_factory": lambda poster: reverse( + "get_edit_url": lambda poster: reverse( "com:poster_edit", kwargs={"poster_id": poster.id} ), }