forked from rDrama/rDrama
master
parent
53ca3ad7f8
commit
6ae624f46e
|
@ -33,14 +33,16 @@ def notifications(v):
|
|||
cids = cids[:25]
|
||||
comments = get_comments(cids, v=v)
|
||||
elif posts:
|
||||
notifications = v.notifications.join(Notification.comment).filter(Comment.author_id == AUTOJANNY_ACCOUNT).order_by(Notification.id.desc()).offset(25 * (page - 1)).limit(101)
|
||||
notifications = v.notifications.join(Notification.comment).filter(Comment.author_id == AUTOJANNY_ACCOUNT).order_by(Notification.id.desc()).offset(25 * (page - 1)).all()
|
||||
|
||||
comments = []
|
||||
for x in notifications:
|
||||
for index, x in enumerate(notifications):
|
||||
c = x.comment
|
||||
if not x.read: c.unread = True
|
||||
x.read = True
|
||||
g.db.add(x)
|
||||
if x.read and index > 101: break
|
||||
elif not x.read:
|
||||
c.unread = True
|
||||
x.read = True
|
||||
g.db.add(x)
|
||||
comments.append(c)
|
||||
next_exists = (len(comments) > 100)
|
||||
listing = comments[:100]
|
||||
|
|
|
@ -62,6 +62,7 @@ def participation_stats(v):
|
|||
return render_template("admin/content_stats.html", v=v, title="Content Statistics", data=data)
|
||||
|
||||
@app.get("/paypigs")
|
||||
@app.get("/patrons")
|
||||
@auth_desired
|
||||
def patrons(v):
|
||||
query = g.db.query(
|
||||
|
|
|
@ -61,7 +61,7 @@
|
|||
<tr>
|
||||
<th style="font-weight:bold;">#</th>
|
||||
<th style="font-weight:bold;">Name</th>
|
||||
<th style="font-weight:bold; text-align:right;">Post count</th>
|
||||
<th style="font-weight:bold; text-align:right;">Posts</th>
|
||||
</tr>
|
||||
</thead>
|
||||
{% for user in users3 %}
|
||||
|
@ -86,7 +86,7 @@
|
|||
<tr>
|
||||
<th style="font-weight:bold;">#</th>
|
||||
<th style="font-weight:bold;">Name</th>
|
||||
<th style="font-weight:bold; text-align:right;">Comment count</th>
|
||||
<th style="font-weight:bold; text-align:right;">Comments</th>
|
||||
</tr>
|
||||
</thead>
|
||||
{% for user in users4 %}
|
||||
|
@ -113,7 +113,7 @@
|
|||
<tr>
|
||||
<th style="font-weight:bold;">#</th>
|
||||
<th style="font-weight:bold;">Name</th>
|
||||
<th style="font-weight:bold; text-align:right;">Received awards</th>
|
||||
<th style="font-weight:bold; text-align:right;">Awards</th>
|
||||
</tr>
|
||||
</thead>
|
||||
{% for user in users5 %}
|
||||
|
|
|
@ -153,7 +153,7 @@
|
|||
{% endblock %}
|
||||
|
||||
<!-- Settings content -->
|
||||
<div class="{% if request.path == '/banned' or request.path == '/blocks' %}container-fluid{% else %}container{% endif %} mt-3 {% if request.path in ['/leaderboard', '/paypigs'] %}px-0{% endif %}">
|
||||
<div class="{% if request.path == '/banned' or request.path == '/blocks' %}container-fluid{% else %}container{% endif %} mt-3 {% if request.path in ['/leaderboard', '/paypigs', '/patrons'] %}px-0{% endif %}">
|
||||
|
||||
{% block content %}
|
||||
{% endblock %}
|
||||
|
|
Loading…
Reference in New Issue