forked from rDrama/rDrama
Merge branch 'frost' into william
commit
fbe24581ed
|
@ -345,11 +345,20 @@ def reported_comments(v):
|
|||
@app.get("/admin")
|
||||
@admin_level_required(2)
|
||||
def admin_home(v):
|
||||
with open('disablesignups', 'r') as f:
|
||||
x = f.read()
|
||||
if not v or v.oldsite: template = ''
|
||||
else: template = 'CHRISTMAS/'
|
||||
return render_template(f"{template}admin/admin_home.html", v=v, x=x)
|
||||
|
||||
with open('disablesignups', 'r') as f: x = f.read()
|
||||
|
||||
if not v or v.oldsite: return render_template(f"admin/admin_home.html", v=v, x=x)
|
||||
|
||||
page=int(request.args.get("page",1))
|
||||
|
||||
if v and v.admin_level == 6: actions = g.db.query(ModAction).order_by(ModAction.id.desc()).offset(25 * (page - 1)).limit(26).all()
|
||||
else: actions=g.db.query(ModAction).filter(ModAction.kind!="shadowban", ModAction.kind!="unshadowban", ModAction.kind!="club", ModAction.kind!="unclub").order_by(ModAction.id.desc()).offset(25*(page-1)).limit(26).all()
|
||||
|
||||
next_exists=len(actions)==26
|
||||
actions=actions[:25]
|
||||
|
||||
return render_template(f"CHRISTMAS/admin/admin_home.html", actions=actions, v=v, x=x)
|
||||
|
||||
@app.post("/admin/disablesignups")
|
||||
@admin_level_required(2)
|
||||
|
|
|
@ -112,11 +112,11 @@
|
|||
{{single_comment(reply, level=level+1)}}
|
||||
{% endfor %}
|
||||
</div>
|
||||
<div id="morecomment-{{c.id}}" class="d-md-none mt-2 more-comments text-small">
|
||||
<div id="morecomment-{{c.id}}" class="d-md-none mt-2 more-comments">
|
||||
<a href="{{c.shortlink}}">More comments <i class="fas fa-long-arrow-right ml-1"></i></a>
|
||||
</div>
|
||||
{% elif replies %}
|
||||
<div id="morecomment-{{c.id}}" class="mt-2 more-comments text-small">
|
||||
<div id="morecomment-{{c.id}}" class="mt-2 more-comments">
|
||||
<button id="btn-{{c.id}}" class="d-none d-md-block btn btn-primary" onclick="morecomments('{{c.id}}')">More comments</button>
|
||||
<a class="d-md-none" href="{{c.shortlink}}">More comments <i class="fas fa-long-arrow-right ml-1"></i></a>
|
||||
</div>
|
||||
|
@ -545,11 +545,11 @@
|
|||
{{single_comment(reply, level=level+1)}}
|
||||
{% endfor %}
|
||||
</div>
|
||||
<div id="morecomment-{{c.id}}" class="d-md-none mt-2 more-comments text-small">
|
||||
<div id="morecomment-{{c.id}}" class="d-md-none mt-2 more-comments">
|
||||
<a href="{{c.shortlink}}">More comments <i class="fas fa-long-arrow-right ml-1"></i></a>
|
||||
</div>
|
||||
{% elif replies %}
|
||||
<div id="morecomments-{{c.id}}" class="mt-2 more-comments text-small">
|
||||
<div id="morecomments-{{c.id}}" class="mt-2 more-comments">
|
||||
<button id="btn-{{c.id}}" class="d-none d-md-block btn btn-primary" onclick="morecomments('{{c.id}}')">More comments</button>
|
||||
<a class="d-md-none" href="{{c.shortlink}}">More comments <i class="fas fa-long-arrow-right ml-1"></i></a>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue