feat(templates): Add 'Last post by' to the list of threads
This commit is contained in:
parent
09a97d46ea
commit
ee855d8b67
2 changed files with 6 additions and 1 deletions
|
@ -58,6 +58,7 @@ struct IndexThread {
|
||||||
sticky: bool,
|
sticky: bool,
|
||||||
posted: FormattedDate,
|
posted: FormattedDate,
|
||||||
author_name: String,
|
author_name: String,
|
||||||
|
post_author: String,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Handler<IndexPage> for Renderer {
|
impl Handler<IndexPage> for Renderer {
|
||||||
|
@ -72,6 +73,7 @@ impl Handler<IndexPage> for Renderer {
|
||||||
sticky: thread.sticky,
|
sticky: thread.sticky,
|
||||||
posted: thread.posted.into(),
|
posted: thread.posted.into(),
|
||||||
author_name: thread.thread_author,
|
author_name: thread.thread_author,
|
||||||
|
post_author: thread.post_author,
|
||||||
})
|
})
|
||||||
.collect();
|
.collect();
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,10 @@
|
||||||
<h5 class="mb-1">{% if thread.sticky %}<span class="badge badge-light">Sticky</span> {% endif %}{{ thread.title | safe }}</h5>
|
<h5 class="mb-1">{% if thread.sticky %}<span class="badge badge-light">Sticky</span> {% endif %}{{ thread.title | safe }}</h5>
|
||||||
<small class="{% if thread.sticky %}text-white{% else %}text-muted{% endif %}">{{ thread.posted }}</small>
|
<small class="{% if thread.sticky %}text-white{% else %}text-muted{% endif %}">{{ thread.posted }}</small>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="d-flex justify-content-between">
|
||||||
<p class="mb-1">Created by {{ thread.author_name }}</p>
|
<p class="mb-1">Created by {{ thread.author_name }}</p>
|
||||||
|
<small>Last post by {{ thread.post_author }}</small>
|
||||||
|
</div>
|
||||||
</a>
|
</a>
|
||||||
{%- endfor %}
|
{%- endfor %}
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in a new issue