Better display of the original author and author of the new main post
This commit is contained in:
parent
92a5e4f05a
commit
2801f8c1cd
|
@ -3,6 +3,13 @@
|
|||
align-items: center;
|
||||
width: 265px;
|
||||
}
|
||||
.profile.minimal {
|
||||
width: 176px;
|
||||
}
|
||||
.profile.minimal .profile-avatar {
|
||||
width: 64px;
|
||||
height: 64px;
|
||||
}
|
||||
.profile-avatar {
|
||||
width: 128px;
|
||||
height: 128px;
|
||||
|
|
|
@ -8,6 +8,15 @@
|
|||
width: 265px;
|
||||
}
|
||||
|
||||
.profile.minimal {
|
||||
width: 176px;
|
||||
|
||||
.profile-avatar {
|
||||
width: 64px;
|
||||
height: 64px;
|
||||
}
|
||||
}
|
||||
|
||||
.profile-avatar {
|
||||
width: 128px;
|
||||
height: 128px;
|
||||
|
|
|
@ -20,13 +20,10 @@
|
|||
{% endif %}
|
||||
|
||||
{% if t.thread.top_comment %}
|
||||
{% call widget_thread.thread_leader(t.thread.top_comment) %}
|
||||
{% call widget_thread.thread_leader(t.thread.top_comment, t) %}
|
||||
<div class="info">
|
||||
<div>
|
||||
Créé le {{ t.date_created | dyndate }}
|
||||
{% if t.author_id != t.thread.top_comment.author.id %}
|
||||
par <a href="{{ url_for('user', username=t.author.name) }}">{{ t.author.name }}</a>
|
||||
{% endif %}
|
||||
<!-- We check if the formatted date is not the same, because the date might differ slightly between the two even if it's the same -->
|
||||
{% if t.thread.top_comment.date_created | dyndate != t.date_created | dyndate %}
|
||||
(Posté le {{ t.thread.top_comment.date_created | dyndate }})
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
<section>
|
||||
{% if p.thread.top_comment %}
|
||||
{% call widget_thread.thread_leader(p.thread.top_comment) %}
|
||||
{% call widget_thread.thread_leader(p.thread.top_comment, p) %}
|
||||
<div class="info">
|
||||
{{ widget_thread.post_actions(p) }}
|
||||
</div>
|
||||
|
|
|
@ -98,12 +98,20 @@
|
|||
|
||||
leader: Posts's top comment (actual rendering is delegated to caller) #}
|
||||
|
||||
{% macro thread_leader(leader) %}
|
||||
{% macro thread_leader(leader, thread) %}
|
||||
<table class="thread topcomment">
|
||||
{# Empty line to get normal background (instead of alternate one) #}
|
||||
<tr></tr>
|
||||
<tr id="{{ leader.id }}">
|
||||
<td class="author">{{ widget_user.profile(leader.author) }}</td>
|
||||
<td class="author">
|
||||
{% if thread.author_id != leader.author_id %}
|
||||
<em>Auteur de la page:</em>
|
||||
{{ widget_user.profile(thread.author, minimal = True) }}
|
||||
<hr/>
|
||||
<em>Auteur du post principal:</em>
|
||||
{% endif %}
|
||||
{{ widget_user.profile(leader.author) }}
|
||||
</td>
|
||||
<td class="message">{{ caller() }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
{% macro profile(user) %}
|
||||
{% macro profile(user, minimal = False) %}
|
||||
{% if user.type == "member" %}
|
||||
<div class="profile">
|
||||
<div class="profile{% if minimal %} minimal {% endif %}">
|
||||
<img class="profile-avatar" src="{{ user.avatar_url }}" alt="Avatar de {{ user.name }}">
|
||||
<div>
|
||||
<div class="profile-name"><a href="{{ url_for('user', username=user.name) }}">{{ user.name }}</a></div>
|
||||
{% if minimal == False %}
|
||||
{% if user.title %}
|
||||
<div class="profile-title" style="{{ user.title.css }}">{{ user.title.name }}</div>
|
||||
{% else %}
|
||||
|
@ -16,6 +17,7 @@
|
|||
{% else %}
|
||||
<div class="profile-xp profile-xp-100"><div style='width: {{ user.level[0] - 100 }}%;'></div></div>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% else %}
|
||||
|
|
Loading…
Reference in New Issue