forked from rDrama/rDrama
small change to /admin/app
parent
062e2523b5
commit
f41b09cc07
|
@ -33,7 +33,7 @@ class OauthApp(Base):
|
||||||
@property
|
@property
|
||||||
@lazy
|
@lazy
|
||||||
def permalink(self):
|
def permalink(self):
|
||||||
return f"{SITE_FULL}/admin/app/{self.id}"
|
return f"{SITE_FULL}/admin/app/{self.id}/posts"
|
||||||
|
|
||||||
@lazy
|
@lazy
|
||||||
def idlist(self, page=1):
|
def idlist(self, page=1):
|
||||||
|
|
|
@ -226,9 +226,9 @@ def admin_app_reject(v, aid):
|
||||||
return {"message": f"'{app.app_name}' rejected!"}
|
return {"message": f"'{app.app_name}' rejected!"}
|
||||||
|
|
||||||
|
|
||||||
@app.get("/admin/app/<aid>")
|
@app.get("/admin/app/<aid>/posts")
|
||||||
@admin_level_required(PERMS['APPS_MODERATION'])
|
@admin_level_required(PERMS['APPS_MODERATION'])
|
||||||
def admin_app_id(v, aid):
|
def admin_app_id_posts(v, aid):
|
||||||
aid=aid
|
aid=aid
|
||||||
oauth = g.db.get(OauthApp, aid)
|
oauth = g.db.get(OauthApp, aid)
|
||||||
if not oauth: abort(404)
|
if not oauth: abort(404)
|
||||||
|
|
|
@ -47,6 +47,19 @@
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<ul class="nav post-nav py-2">
|
||||||
|
<li class="nav-item">
|
||||||
|
<a class="nav-link {% if request.path.endswith('/posts') %} active{% endif %}" href="{{request.path.replace('/posts','/comments')}}">
|
||||||
|
<div>Posts</div>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-item">
|
||||||
|
<a class="nav-link {% if request.path.endswith('/comments') %} active{% endif %}" href="{{request.path.replace('/posts','/comments')}}">
|
||||||
|
<div>Comments</div>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
{% if listing %}
|
{% if listing %}
|
||||||
{% include "submission_listing.html" %}
|
{% include "submission_listing.html" %}
|
||||||
{% elif comments %}
|
{% elif comments %}
|
||||||
|
|
|
@ -13,10 +13,11 @@
|
||||||
{% for app in apps %}
|
{% for app in apps %}
|
||||||
<div class="settings-section rounded">
|
<div class="settings-section rounded">
|
||||||
<div class="d-lg-flex">
|
<div class="d-lg-flex">
|
||||||
<div class="title w-lg-25">
|
<div class="title w-lg-25">
|
||||||
<label for="over18"><a href="{{app.permalink}}" {% if v and v.newtab and not g.webview %}target="_blank"{% endif %}>{{app.app_name}}</a></label>
|
<label for="over18"><a href="{{app.permalink}}" {% if v and v.newtab and not g.webview %}target="_blank"{% endif %}>{{app.app_name}}</a></label>
|
||||||
</div>
|
</div>
|
||||||
<div class="body w-lg-100">
|
|
||||||
|
<div class="body w-lg-100">
|
||||||
<label for="edit-{{app.id}}-author" class="mb-0 w-lg-25">User</label>
|
<label for="edit-{{app.id}}-author" class="mb-0 w-lg-25">User</label>
|
||||||
<input autocomplete="off" id="edit-{{app.id}}-author" class="form-control" type="text" name="name" value="{{app.author.username}}" readonly=readonly>
|
<input autocomplete="off" id="edit-{{app.id}}-author" class="form-control" type="text" name="name" value="{{app.author.username}}" readonly=readonly>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue