Skip to content

Commit 2e9bcf0

Browse files
authored
[DONE] Fix event info display (#1234)
* Fixup. Format code with Black * Correction de l'affichage des infos d'un évènement + affichage du nombre de vue * Delete 'get_username' call
1 parent c8b4a80 commit 2e9bcf0

File tree

2 files changed

+25
-42
lines changed

2 files changed

+25
-42
lines changed

pod/live/templates/live/event-all-info.html

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,17 @@
11
{% load i18n %}
22
{% load tagging_tags %}
33

4-
<div class="ps-0 pe-0">
5-
<div class="navbar d-flex flex-row-reverse p-0">
6-
<ul class="nav nav-tabs" id="pod-infos-tabs" role="tablist">
7-
{% if event.description %}
8-
<li class="nav-item dropdown">
9-
<a class="nav-link active show" id="summary-tab" data-toggle="tab" href="#summary" role="tab" aria-selected="true" title="{% trans 'Summary' %}">
10-
<i class="bi bi-justify" aria-hidden="true"></i>
11-
</a>
12-
</li>
13-
{% endif %}
14-
15-
{% if event.is_draft == False or event.owner == request.user or request.user in event.additional_owners.all or request.user.is_superuser %}
4+
<div class="video-info_duration-view-share">
5+
<div class="pod-info-video__view">
6+
<i class="bi bi-eye" aria-hidden="true"></i> {% trans 'Number of views' %}
7+
{{ event.max_viewers }}
8+
</div>
9+
<div class="pod-info-video__buttons">
10+
{% if event.is_draft == False or event.owner == request.user or request.user in event.additional_owners.all or request.user.is_superuser %}
1611
<button type="button" class="btn btn-link btn-lg pod-btn-share" data-bs-toggle="modal" data-bs-target="#share">
1712
<i class="bi bi-share" aria-hidden="true"></i><span class="visually-hidden">{% trans 'Embed/Share' %}</span>
1813
</button>
1914
{% endif %}
20-
</ul>
21-
2215
</div>
2316
</div>
2417

pod/live/templates/live/event-info.html

Lines changed: 18 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -4,27 +4,20 @@
44
{% load thumbnail %}
55
{% load event_tags %}
66

7-
<div class="tab-content w-100" id="event-meta">
8-
{% if event.description %}
9-
<div class="tab-pane fade active show" id="summary" role="tabpanel" aria-labelledby="summary-tab">
10-
<h2 class="tab-title"><i class="bi bi-justify" aria-hidden="true"></i>&nbsp;{% trans 'Summary' %}</h2>
11-
<hr>
12-
<p>{{ event.description|safe }}</p>
13-
</div>
14-
{% endif %}
15-
16-
<div id="info"
17-
{% if not event.description %}
18-
class="tab-pane fade active show pod-live-info"
19-
{% else %}
20-
class="tab-pane fade"
21-
{% endif %}
22-
>
7+
{% if event.description%}
8+
<div class="pod-info-video__summary my-3" id="summary">
9+
<div class="pod-video-description">
10+
{{ event.description|safe }}
11+
</div>
12+
</div>
13+
{% endif %}
2314

24-
<!-- <hr> -->
15+
<div id="video-meta">
16+
<div id="info" class="pod-info-video__info">
17+
<h2 class="tab-title visually-hidden"><i class=" bi bi-info-circle"></i>&nbsp;{% trans 'Infos' %}</h2>
2518
<ul class="list-inline d-flex flex-wrap">
2619
<li class="col-6 col-md-4">
27-
<h3 class="meta-title">{% trans 'Broadcasted on:' %}</h3>
20+
<span class="pod-meta-title">{% trans 'Broadcasted on:' %}</span>
2821
<div>
2922
{% if event.start_date__date == event.end_date__date %}
3023
{% blocktrans with start_date=event.start_date|date:"d/m/Y" start_time=event.start_date|time:"H:i" end_time=event.end_date|time:"H:i" %}{{start_date}} from {{start_time}} to {{end_time}}{% endblocktrans %}
@@ -34,29 +27,27 @@ <h3 class="meta-title">{% trans 'Broadcasted on:' %}</h3>
3427
</div>
3528
</li>
3629
<li class="col-6 col-md-4">
37-
<h3 class="meta-title">{% trans 'Location:' %}</h3>
38-
<div>{{ event.broadcaster.building.name }} - {{ event.broadcaster.name }}
39-
</div>
30+
<span class="pod-meta-title">{% trans 'Location:' %}</span>
31+
<div>{{ event.broadcaster.building.name }} - {{ event.broadcaster.name }}</div>
4032
</li>
4133
<li class="col-6 col-md-4">
42-
<h3 class="meta-title">{% trans 'Added by:' %}</h3>
43-
<div>
44-
<a class="btn btn-link btn-sm" href="{% url 'videos:videos' %}?owner={{ event.owner.get_username }}" {% if request.GET.is_iframe %}target="_blank"{% endif %}>
34+
<span class="pod-meta-title">{% trans 'Added by:' %}</span>
35+
<a class="btn btn-link btn-sm px-0" href="{% url 'videos:videos' %}?owner={{ event.owner.get_username}}" {% if request.GET.is_iframe %}target="_blank" {% endif %} title="{% blocktrans with video_user_name=video.owner %}Show video list of user “{{ video_user_name }}”{% endblocktrans %}" data-bs-toggle="tooltip" data-bs-placement="bottom">
4536
{% if event.owner.owner.userpicture.file %}
4637
{% thumbnail event.owner.owner.userpicture.file "x34" as im %}
4738
<img src="{{ im.url }}" width="{{ im.width }}" height="{{ im.height }}" class='userpicture rounded' alt="" loading="lazy">
4839
{% endthumbnail %}
4940
{% endif %}
5041
{{ event.owner }}
5142
</a>
52-
</div>
5343
</li>
5444
<li class="col-6 col-md-4">
55-
<h3 class="meta-title">{% trans 'Type:' %}</h3>
56-
<div><a href="{% url 'videos:videos' %}?type={{ event.type.slug }}" {% if request.GET.is_iframe %}target="_blank"{% endif %}>{{ event.type.title }}</a></div>
45+
<span class="pod-meta-title">{% trans 'Type:' %}</span>
46+
<a class="btn btn-link btn-sm px-0" href="{% url 'videos:videos' %}?type={{ event.type.slug }}" {% if request.GET.is_iframe %}target="_blank"{% endif %}>{{ event.type.title }}</a>
5747
</li>
5848
</ul>
5949
</div>
50+
</div>
6051

6152
{% if event.is_draft == False or event.owner == request.user or request.user in event.additional_owners.all or request.user.is_superuser %}
6253
<!-- Start modal -->
@@ -133,4 +124,3 @@ <h2 class="modal-title h5" id="shareLabel">
133124
</div> <!-- End modal dialog-->
134125
</div> <!-- End modal -->
135126
{% endif %}
136-
</div>

0 commit comments

Comments
 (0)