messing stuff up
This commit is contained in:
11
plugins/admin/routes.py
Normal file
11
plugins/admin/routes.py
Normal file
@ -0,0 +1,11 @@
|
||||
from flask import Blueprint, render_template
|
||||
from flask_login import login_required, current_user
|
||||
|
||||
bp = Blueprint('admin', __name__, template_folder='templates')
|
||||
|
||||
@bp.route('/admin')
|
||||
@login_required
|
||||
def admin_dashboard():
|
||||
if current_user.role != 'admin':
|
||||
return "Access denied", 403
|
||||
return render_template('admin/admin_dashboard.html')
|
11
plugins/admin/templates/admin/admin_dashboard.html
Normal file
11
plugins/admin/templates/admin/admin_dashboard.html
Normal file
@ -0,0 +1,11 @@
|
||||
{% extends 'core_ui/base.html' %}
|
||||
{% block title %}Admin Dashboard | Nature In Pots{% endblock %}
|
||||
{% block content %}
|
||||
<h1 class="mb-4 text-danger">Admin Dashboard</h1>
|
||||
<p class="lead">Manage submissions, users, and plugin controls here.</p>
|
||||
<ul>
|
||||
<li><a href="#">View Unapproved Submissions</a></li>
|
||||
<li><a href="#">Manage Users</a></li>
|
||||
<li><a href="#">Export Data</a></li>
|
||||
</ul>
|
||||
{% endblock %}
|
Reference in New Issue
Block a user