mirror of
https://github.com/ae-utbm/sith.git
synced 2024-11-16 19:23:27 +00:00
Small fix with forum topic titles
Signed-off-by: Skia <skia@libskia.so>
This commit is contained in:
parent
06b67f1d27
commit
32ac6640ab
@ -246,7 +246,7 @@ class ForumMessage(models.Model):
|
|||||||
super(ForumMessage, self).save(*args, **kwargs)
|
super(ForumMessage, self).save(*args, **kwargs)
|
||||||
if self.is_last_in_topic():
|
if self.is_last_in_topic():
|
||||||
self.topic._last_message_id = self.id
|
self.topic._last_message_id = self.id
|
||||||
if self.is_first_in_topic():
|
if self.is_first_in_topic() and self.title:
|
||||||
self.topic._title = self.title
|
self.topic._title = self.title
|
||||||
self.topic._message_number = self.topic.messages.count()
|
self.topic._message_number = self.topic.messages.count()
|
||||||
self.topic.save()
|
self.topic.save()
|
||||||
|
@ -54,7 +54,7 @@
|
|||||||
{% else %}
|
{% else %}
|
||||||
<a class="ib w_big" href="{{ url('forum:view_topic', topic_id=topic.id) }}">
|
<a class="ib w_big" href="{{ url('forum:view_topic', topic_id=topic.id) }}">
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<div class="title">{{ topic.title }}</div>
|
<div class="title">{{ topic.title or topic.messages.first().title }}</div>
|
||||||
<p>{{ topic.description }}</p>
|
<p>{{ topic.description }}</p>
|
||||||
</a>
|
</a>
|
||||||
{% if user.can_edit(topic) %}
|
{% if user.can_edit(topic) %}
|
||||||
|
Loading…
Reference in New Issue
Block a user