dfs
parent
3e5a03a3f4
commit
c23b8b8a55
|
@ -38,8 +38,10 @@ def post_pid_comment_cid(cid, pid=None, anything=None, v=None):
|
|||
comment = get_comment(cid, v=v)
|
||||
|
||||
if v and request.values.get("read"):
|
||||
print(1)
|
||||
notif = g.db.query(Notification).options(lazyload('*')).filter_by(comment_id=cid, user_id=v.id, read=False).first()
|
||||
if notif:
|
||||
print(2)
|
||||
notif.read = True
|
||||
g.db.add(notif)
|
||||
g.db.commit()
|
||||
|
|
|
@ -174,7 +174,7 @@
|
|||
<div id="comment-{{c.id}}-only">
|
||||
|
||||
<div class="user-info">
|
||||
<span class="comment-collapse d-md-none" onclick="collapse_comment('{{c.id}}')"></span>
|
||||
<span class="comment-collapse-icon" onclick="collapse_comment('{{c.id}}')"></span>
|
||||
{% if standalone and c.over_18 %}<span class="badge badge-danger">+18</span> {% endif %}
|
||||
{% if c.is_banned %}removed by @{{c.ban_reason}}{% elif c.deleted_utc > 0 %}Deleted by author{% elif c.is_blocking %}You are blocking @{{c.author.username}}{% endif %}
|
||||
</div>
|
||||
|
@ -255,7 +255,7 @@
|
|||
<div id="{% if comment_info and comment_info.id == c.id %}context{%else%}comment-{{c.id}}-only{% endif %}" class="comment-anchor {% if comment_info and comment_info.id == c.id %}context{%endif%}{% if c.is_banned %} banned{% endif %}{% if c.deleted_utc %} deleted{% endif %}">
|
||||
|
||||
<div class="user-info">
|
||||
<span class="comment-collapse d-md-none" onclick="collapse_comment('{{c.id}}')"></span>
|
||||
<span class="comment-collapse-icon" onclick="collapse_comment('{{c.id}}')"></span>
|
||||
|
||||
<span id="reddot-{{c.id}}"></span>
|
||||
|
||||
|
|
|
@ -102,6 +102,17 @@
|
|||
{% set voted=-2 %}
|
||||
{% endif %}
|
||||
|
||||
{% if p.active_flags %}
|
||||
<div id="flaggers-{{p.id}}" class="flaggers d-none">
|
||||
<strong><i class="far fa-fw fa-flag"></i> Reported by:</strong>
|
||||
<pre></pre>
|
||||
<ul style="padding-left:20px; margin-bottom: 0;">
|
||||
{% for f in p.ordered_flags %}
|
||||
<li><a style="font-weight:bold" href="{{f.user.url}}">{{f.user.username}}</a>{% if f.reason %}: {{f.reason | safe}}{% endif %} {% if v.admin_level==6 %}<a href="javascript:void(0)" onclick="post_toast('/del_report/p{{ f.id }}')">[remove]</a>{% endif %}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<div id="post-{{p.id}}" class="card{% if p.is_banned %} banned{% endif %}{% if p.deleted_utc %} deleted{% endif %}{% if p.stickied %} stickied{% endif %}{% if voted==1 %} upvoted{% elif voted==-1 %} downvoted{% endif %}{% if p.over_18 %} nsfw{% endif %}">
|
||||
|
||||
|
@ -468,18 +479,6 @@
|
|||
|
||||
</div>
|
||||
|
||||
{% if p.active_flags %}
|
||||
<div id="flaggers-{{p.id}}" class="flaggers d-none">
|
||||
<strong><i class="far fa-fw fa-flag"></i> Reported by:</strong>
|
||||
<pre></pre>
|
||||
<ul style="padding-left:20px; margin-bottom: 0;">
|
||||
{% for f in p.ordered_flags %}
|
||||
<li><a style="font-weight:bold" href="{{f.user.url}}">{{f.user.username}}</a>{% if f.reason %}: {{f.reason | safe}}{% endif %} {% if v.admin_level==6 %}<a href="javascript:void(0)" onclick="post_toast('/del_report/p{{ f.id }}')">[remove]</a>{% endif %}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if not p.club or v and v.paid_dues %}
|
||||
{% if p.realbody(v) %}
|
||||
<div class="d-none card rounded border pb-0 pt-3 my-2" id="post-text-{{p.id}}">
|
||||
|
|
Loading…
Reference in New Issue