Allow any post to be set as main post #130
This commit is contained in:
parent
f7e91c4793
commit
f9c4d05121
|
@ -261,7 +261,7 @@ class Member(User):
|
|||
if comment.type != "comment":
|
||||
return False
|
||||
post = comment.thread.owner_post
|
||||
return self.can_edit_post(post) and (comment.author == post.author)
|
||||
return self.can_edit_post(post)
|
||||
|
||||
def can_lock_thread(self, post):
|
||||
"""Whether this member can lock the thread associated with the post"""
|
||||
|
|
|
@ -24,6 +24,9 @@
|
|||
<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 }})
|
||||
|
|
Loading…
Reference in New Issue