add mod panel view
This commit is contained in:
@@ -49,3 +49,10 @@ def create_reset_pass(user_id):
|
|||||||
})
|
})
|
||||||
|
|
||||||
return redirect(url_for('users.reset_link_login', key=key))
|
return redirect(url_for('users.reset_link_login', key=key))
|
||||||
|
|
||||||
|
|
||||||
|
@bp.get('/panel')
|
||||||
|
@login_required
|
||||||
|
@mod_only('topics.all_topics')
|
||||||
|
def panel():
|
||||||
|
return render_template('mod/panel.html')
|
||||||
|
|||||||
@@ -13,7 +13,6 @@ bp = Blueprint("topics", __name__, url_prefix = "/topics/")
|
|||||||
|
|
||||||
@bp.get("/")
|
@bp.get("/")
|
||||||
def all_topics():
|
def all_topics():
|
||||||
admin = Users.find({"id": 1})
|
|
||||||
return render_template("topics/topics.html", topic_list = Topics.get_list(), active_threads = Topics.get_active_threads())
|
return render_template("topics/topics.html", topic_list = Topics.get_list(), active_threads = Topics.get_active_threads())
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
<li><a href="{{ url_for('users.bookmarks', username=user.username) }}">Bookmarks</a></li>
|
<li><a href="{{ url_for('users.bookmarks', username=user.username) }}">Bookmarks</a></li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if user.is_mod() %}
|
{% if user.is_mod() %}
|
||||||
<li><a href="{{ url_for("mod.user_list") }}">User list</a></li>
|
<li><a href="{{ url_for("mod.panel") }}">Moderation</a></li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</ul>
|
</ul>
|
||||||
{% endwith %}
|
{% endwith %}
|
||||||
|
|||||||
11
app/templates/mod/panel.html
Normal file
11
app/templates/mod/panel.html
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
{% extends "base.html" %}
|
||||||
|
{% block title %}moderation{% endblock %}
|
||||||
|
{% block content %}
|
||||||
|
<div class="darkbg settings-container">
|
||||||
|
<h1>Moderation actions</h1>
|
||||||
|
<ul>
|
||||||
|
<li><a href="{{ url_for('mod.user_list') }}">User list</a></li>
|
||||||
|
<li><a href="{{ url_for('mod.sort_topics') }}">Sort topics</a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
{% endblock %}
|
||||||
Reference in New Issue
Block a user