Aevann1 2022-12-20 00:08:13 +02:00
parent e386caf581
commit b3d1490418
2 changed files with 14 additions and 1 deletions

View File

@ -36,6 +36,11 @@ class SubmissionOption(Base):
if not v: return False
return v.id in [x.user_id for x in self.votes]
@property
@lazy
def parent(self):
return self.post
class SubmissionOptionVote(Base):
@ -86,6 +91,10 @@ class CommentOption(Base):
if not v: return False
return v.id in [x.user_id for x in self.votes]
@property
@lazy
def parent(self):
return self.comment
class CommentOptionVote(Base):

View File

@ -5,7 +5,11 @@
<h3 class="mt-5">{{thing.body_html | safe}} - {{ups | length}} {% if thing.exclusive == 2 %}bets{% else %}votes{% endif %}</h3>
<p class="mt-4"><b>Total voter truescore: </b>{{total_ts}}</p>
<p><b>Link:</b> <a href="{{thing.permalink}}">{{thing.parent.permalink}}</a></p>
<p><b>Author:</b> <a href="{{thing.parent.url}}">@{{thing.parent.author.username}}</a></p>
<p><b>Author Created At:</b> <span data-time="{{thing.parent.author.created_utc}}"></span></p>
<p><b>Author Truescore:</b> {{"{:,}".format(thing.parent.author.truescore)}}</p>
<p><b>Total voter truescore: </b>{{total_ts}}</p>
{% if total_patrons %}
<p><b>Total patrons: </b>{{total_patrons}}</p>
{% endif %}