forked from rDrama/rDrama
fix voting on profile wall
parent
1fead79a86
commit
c0169d0dab
|
@ -757,7 +757,7 @@ def u_username_wall(username, v=None):
|
|||
if (v and v.client) or request.path.endswith(".json"):
|
||||
return {"data": [c.json(g.db) for c in comments]}
|
||||
|
||||
return render_template("userpage/wall.html", u=u, v=v, listing=comments, page=page, next_exists=next_exists, is_following=is_following, standalone=True, render_replies=True)
|
||||
return render_template("userpage/wall.html", u=u, v=v, listing=comments, page=page, next_exists=next_exists, is_following=is_following, standalone=True, render_replies=True, wall=True)
|
||||
|
||||
|
||||
@app.get("/@<username>/wall/comment/<cid>")
|
||||
|
@ -803,7 +803,7 @@ def u_username_wall_comment(username, cid, v=None):
|
|||
|
||||
if v and v.client: return top_comment.json(db=g.db)
|
||||
|
||||
return render_template("userpage/wall.html", u=u, v=v, listing=[top_comment], page=1, is_following=is_following, standalone=True, render_replies=True, comment_info=comment_info)
|
||||
return render_template("userpage/wall.html", u=u, v=v, listing=[top_comment], page=1, is_following=is_following, standalone=True, render_replies=True, wall=True, comment_info=comment_info)
|
||||
|
||||
|
||||
@app.get("/@<username>/posts")
|
||||
|
|
|
@ -325,7 +325,7 @@
|
|||
</button>
|
||||
</li>
|
||||
|
||||
{% if v and request.path.startswith('/@') and v.admin_level < PERMS['VIEW_VOTE_BUTTONS_ON_USER_PAGE'] %}
|
||||
{% if v and (request.path.startswith('/@') and not wall) and v.admin_level < PERMS['VIEW_VOTE_BUTTONS_ON_USER_PAGE'] %}
|
||||
<li id="voting-{{c.id}}-mobile" class="voting list-inline-item d-md-none">
|
||||
{% if voted==1 %}
|
||||
<span class="mr-2 arrow-up comment-{{c.id}}-up active"></span>
|
||||
|
@ -376,7 +376,7 @@
|
|||
|
||||
|
||||
<ul class="d-none d-md-flex list-inline text-right text-md-left"><li>
|
||||
{% if v and request.path.startswith('/@') and v.admin_level < PERMS['VIEW_VOTE_BUTTONS_ON_USER_PAGE'] %}
|
||||
{% if v and (request.path.startswith('/@') and not wall) and v.admin_level < PERMS['VIEW_VOTE_BUTTONS_ON_USER_PAGE'] %}
|
||||
{% if voted==1 %}
|
||||
<button type="button" class="btn caction py-0 m-0 px-3 nobackground arrow-up mx-0 comment-{{c.id}}-up active"></button>
|
||||
{% endif %}
|
||||
|
@ -393,7 +393,7 @@
|
|||
<span data-bs-toggle="tooltip" data-bs-placement="top" title="+{{ups}} | -{{downs}}" class="comment-score-{{c.id}} score comment-score-{{c.id}} {% if voted==1 %}score-up{% elif voted==-1%}score-down{% endif %}{% if c.controversial %} controversial{% endif %}">{{score}}</span>
|
||||
</span>
|
||||
|
||||
{% if v and request.path.startswith('/@') and v.admin_level < PERMS['VIEW_VOTE_BUTTONS_ON_USER_PAGE'] %}
|
||||
{% if v and (request.path.startswith('/@') and not wall) and v.admin_level < PERMS['VIEW_VOTE_BUTTONS_ON_USER_PAGE'] %}
|
||||
{% if voted==-1 %}
|
||||
<li class=" arrow-down py-0 m-0 px-3 comment-{{c.id}}-down active"></li>
|
||||
{% endif %}
|
||||
|
|
Loading…
Reference in New Issue