Files

36 lines
1.6 KiB
HTML

<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>{% block title %}EDC 工装管理系统{% endblock %}</title>
<link rel="stylesheet" href="{{ url_for('static', filename='css/style.css') }}">
</head>
<body>
<nav class="top-menu">
{% if current_user.is_authenticated and current_user.role != 'analyst' %}
<a href="/" class="{% if request.path == '/' %}active{% endif %}">设备</a>
{% endif %}
<a href="/test-data" class="{% if request.path == '/test-data' %}active{% endif %}">测试信息</a>
{% if current_user.is_authenticated and current_user.role in ('admin', 'manager') %}
<a href="/device-logs" class="{% if request.path == '/device-logs' %}active{% endif %}">设备日志</a>
<a href="/logs/" class="{% if request.path == '/logs/' %}active{% endif %}">操作日志</a>
{% endif %}
{% if current_user.is_authenticated and current_user.role == 'admin' %}
<a href="/users/" class="{% if request.path == '/users/' %}active{% endif %}">用户管理</a>
{% endif %}
<span class="user-info">
{% if current_user.is_authenticated %}
{{ current_user.username }} ({{ current_user.role }})
<a href="/change-password">修改密码</a>
<a href="/logout">退出</a>
{% endif %}
</span>
</nav>
<main class="container">
{% block content %}{% endblock %}
</main>
{% block scripts %}{% endblock %}
</body>
</html>