diff --git a/app/routes/mod.py b/app/routes/mod.py index 02dd46d..af1117a 100644 --- a/app/routes/mod.py +++ b/app/routes/mod.py @@ -49,3 +49,10 @@ def create_reset_pass(user_id): }) 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') diff --git a/app/routes/topics.py b/app/routes/topics.py index d1cd0c0..100fd08 100644 --- a/app/routes/topics.py +++ b/app/routes/topics.py @@ -13,7 +13,6 @@ bp = Blueprint("topics", __name__, url_prefix = "/topics/") @bp.get("/") 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()) diff --git a/app/templates/common/topnav.html b/app/templates/common/topnav.html index 89defd4..ce4d21c 100644 --- a/app/templates/common/topnav.html +++ b/app/templates/common/topnav.html @@ -22,7 +22,7 @@
  • Bookmarks
  • {% endif %} {% if user.is_mod() %} -
  • User list
  • +
  • Moderation
  • {% endif %} {% endwith %} diff --git a/app/templates/mod/panel.html b/app/templates/mod/panel.html new file mode 100644 index 0000000..f39c4dd --- /dev/null +++ b/app/templates/mod/panel.html @@ -0,0 +1,11 @@ +{% extends "base.html" %} +{% block title %}moderation{% endblock %} +{% block content %} +
    +

    Moderation actions

    + +
    +{% endblock %}