Change navigation.
This commit is contained in:
32
templates/admin_dashboard.html
Normal file
32
templates/admin_dashboard.html
Normal file
@@ -0,0 +1,32 @@
|
||||
{% extends "layout.html" %}
|
||||
|
||||
{% block content %}
|
||||
<div class="admin-container">
|
||||
<h1>Admin Dashboard</h1>
|
||||
|
||||
{% with messages = get_flashed_messages(with_categories=true) %}
|
||||
{% if messages %}
|
||||
{% for category, message in messages %}
|
||||
<div class="alert alert-{{ category }}">{{ message }}</div>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% endwith %}
|
||||
|
||||
<div class="admin-panel">
|
||||
<div class="admin-card">
|
||||
<h2>User Management</h2>
|
||||
<p>Manage user accounts, permissions, and roles.</p>
|
||||
<a href="{{ url_for('admin_users') }}" class="btn btn-primary">Manage Users</a>
|
||||
</div>
|
||||
|
||||
<!-- You can add more admin cards here in the future -->
|
||||
<!-- For example:
|
||||
<div class="admin-card">
|
||||
<h2>System Settings</h2>
|
||||
<p>Configure application-wide settings.</p>
|
||||
<a href="#" class="btn btn-primary">Configure</a>
|
||||
</div>
|
||||
-->
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -15,20 +15,18 @@
|
||||
<li><a href="{{ url_for('history') }}">History</a></li>
|
||||
<li><a href="{{ url_for('config') }}">Config</a></li>
|
||||
<li><a href="{{ url_for('about') }}">About</a></li>
|
||||
<li><a href="{{ url_for('contact') }}">Contact</a></li>
|
||||
|
||||
<!-- Add Admin dropdown menu here -->
|
||||
<!-- Admin dropdown menu moved to the rightmost position -->
|
||||
{% if g.user.is_admin %}
|
||||
<li class="dropdown">
|
||||
<li class="dropdown admin-dropdown">
|
||||
<a href="#" class="dropdown-toggle">Admin</a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="{{ url_for('admin_users') }}">User Management</a></li>
|
||||
<li><a href="{{ url_for('profile') }}">Profile</a></li>
|
||||
<li><a href="{{ url_for('admin_dashboard') }}">Dashboard</a></li>
|
||||
<li><a href="{{ url_for('logout') }}">Logout</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
{% endif %}
|
||||
|
||||
<li><a href="{{ url_for('profile') }}">Profile</a></li>
|
||||
<li><a href="{{ url_for('logout') }}">Logout</a></li>
|
||||
{% else %}
|
||||
<li><a href="{{ url_for('login') }}">Login</a></li>
|
||||
<li><a href="{{ url_for('register') }}">Register</a></li>
|
||||
|
||||
Reference in New Issue
Block a user