Files
vps_web/templates/admin/providers.html
ddrwode 3a61598b59 哈哈
2026-02-09 14:18:42 +08:00

39 lines
1.9 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>厂商管理 - 后台</title>
<link rel="stylesheet" href="/static/css/style.css">
<link rel="stylesheet" href="/static/css/admin.css">
</head>
<body class="admin-page">
<header class="admin-header">
<h1>厂商管理</h1>
<nav>
<a href="{{ url_for('admin_provider_new') }}">+ 添加厂商</a>
<a href="{{ url_for('admin_dashboard') }}">返回总览</a>
<a href="{{ url_for('index') }}">查看前台</a>
<a href="{{ url_for('admin_logout') }}">退出</a>
</nav>
</header>
<main class="admin-main">
<p class="hint">一个厂商下可添加多条配置(规格)。点击厂商名称进入该厂商,管理其下的配置。</p>
<ul class="provider-list">
{% for p in providers %}
<li class="provider-item">
<a href="{{ url_for('admin_provider_detail', provider_id=p.id) }}" class="provider-name">{{ p.name }}</a>
<span class="provider-meta">配置数:{{ p.plans.count() }}</span>
<a href="{{ url_for('admin_provider_edit', provider_id=p.id) }}">编辑</a>
<form method="post" action="{{ url_for('admin_provider_delete', provider_id=p.id) }}" style="display:inline;" onsubmit="return confirm('确定删除该厂商?其下配置将保留但不再关联厂商。');">
<button type="submit" class="btn-delete">删除</button>
</form>
</li>
{% else %}
<li>暂无厂商,请 <a href="{{ url_for('admin_provider_new') }}">添加厂商</a> 后再 <a href="{{ url_for('admin_plan_new') }}">添加配置</a></li>
{% endfor %}
</ul>
</main>
</body>
</html>