sdfsfd
This commit is contained in:
parent
0131ea4740
commit
e94937dc69
6 changed files with 41 additions and 10 deletions
|
@ -392,7 +392,15 @@ class Comment(Base):
|
|||
@lazy
|
||||
def ordered_flags(self): return self.flags.order_by(CommentFlag.id).all()
|
||||
|
||||
|
||||
def options_html(self, v):
|
||||
html = ""
|
||||
for o in self.options:
|
||||
html += f'<div class="custom-control"><input type="checkbox" class="custom-control-input" id="{o.id}" name="option"'
|
||||
if o.poll_voted(v): html += " checked"
|
||||
html += f''' onchange="poll_vote('{o.id}', '{self.id}')"><label class="custom-control-label" for="{o.id}">{o.body_html}<span class="presult-{self.id}'''
|
||||
if not self.total_poll_voted(v): html += ' d-none'
|
||||
html += f'"> - <a href="/votes?link=t3_{o.id}"><span id="poll-{o.id}">{o.upvotes}</span> votes</a></span></label></div><pre></pre>'
|
||||
return html
|
||||
|
||||
class Notification(Base):
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue