mirror of
https://github.com/ae-utbm/sith.git
synced 2025-11-03 10:33:06 +00:00
Fix naming, fix tooltip and cosmetic changes
This commit is contained in:
@@ -777,7 +777,7 @@ class PosterListView(
|
|||||||
"create_url": reverse_lazy(
|
"create_url": reverse_lazy(
|
||||||
"club:poster_create", kwargs={"club_id": self.club.id}
|
"club:poster_create", kwargs={"club_id": self.club.id}
|
||||||
),
|
),
|
||||||
"edit_url_factory": lambda poster: reverse(
|
"get_edit_url": lambda poster: reverse(
|
||||||
"club:poster_edit",
|
"club:poster_edit",
|
||||||
kwargs={"club_id": self.club.id, "poster_id": poster.id},
|
kwargs={"club_id": self.club.id, "poster_id": poster.id},
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -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 {
|
&.not_moderated {
|
||||||
border: 1px solid red;
|
border: 1px solid red;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -29,6 +29,9 @@
|
|||||||
class="image"
|
class="image"
|
||||||
hover="{% trans %}Click to expand{% endtrans %}"
|
hover="{% trans %}Click to expand{% endtrans %}"
|
||||||
@click="active = $el.firstElementChild"
|
@click="active = $el.firstElementChild"
|
||||||
|
tooltip="{%- for screen in poster.screens.all() -%}
|
||||||
|
{{ screen }}
|
||||||
|
{% endfor %}"
|
||||||
>
|
>
|
||||||
<img src="{{ poster.file.url }}" alt="{{ poster.name }}">
|
<img src="{{ poster.file.url }}" alt="{{ poster.name }}">
|
||||||
</div>
|
</div>
|
||||||
@@ -38,7 +41,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="actions">
|
<div class="actions">
|
||||||
{% if poster.is_editable %}
|
{% if poster.is_editable %}
|
||||||
<a class="btn btn-blue" href="{{ edit_url_factory(poster) }}">
|
<a class="btn btn-blue" href="{{ get_edit_url(poster) }}">
|
||||||
<i class="fa fa-pen-to-square"></i>
|
<i class="fa fa-pen-to-square"></i>
|
||||||
{% trans %}Edit{% endtrans %}
|
{% trans %}Edit{% endtrans %}
|
||||||
</a>
|
</a>
|
||||||
@@ -46,20 +49,13 @@
|
|||||||
{% if not poster.is_moderated and user.has_perm("com.moderate_poster") %}
|
{% if not poster.is_moderated and user.has_perm("com.moderate_poster") %}
|
||||||
<form action="{{ url("com:poster_moderate", object_id=poster.id) }}" method="post">
|
<form action="{{ url("com:poster_moderate", object_id=poster.id) }}" method="post">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
<button type="submit" class="btn btn-blue">
|
<button type="submit" class="btn btn-green">
|
||||||
<i class="fa fa-check"></i>
|
<i class="fa fa-check"></i>
|
||||||
{% trans %}Moderate{% endtrans %}
|
{% trans %}Moderate{% endtrans %}
|
||||||
</button>
|
</button>
|
||||||
</form>
|
</form>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
<div class="tooltip">
|
|
||||||
<ul>
|
|
||||||
{% for screen in poster.screens.all() %}
|
|
||||||
<li>{{ screen }}</li>
|
|
||||||
{% endfor %}
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
{% else %}
|
{% else %}
|
||||||
<div id="no-posters">{% trans %}No posters{% endtrans %}</div>
|
<div id="no-posters">{% trans %}No posters{% endtrans %}</div>
|
||||||
|
|||||||
@@ -650,7 +650,7 @@ class PosterListView(PermissionRequiredMixin, ComTabsMixin, PosterListBaseView):
|
|||||||
current_tab = "posters"
|
current_tab = "posters"
|
||||||
extra_context = {
|
extra_context = {
|
||||||
"create_url": reverse_lazy("com:poster_create"),
|
"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}
|
"com:poster_edit", kwargs={"poster_id": poster.id}
|
||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user