30 lines
1.1 KiB
HTML
30 lines
1.1 KiB
HTML
{% extends "base.html" %}
|
|
{% block content %}
|
|
<div class="d-flex justify-content-between align-items-center">
|
|
<h1 class="h3">Admin dashboard</h1>
|
|
</div>
|
|
|
|
<div class="row mt-4">
|
|
<div class="col-md-12">
|
|
<h2 class="h5">Companies</h2>
|
|
<form method="post" action="{{ url_for('admin.create_company') }}" class="card card-body mb-3">
|
|
<div class="input-group">
|
|
<input class="form-control" name="name" placeholder="New company name" required />
|
|
<button class="btn btn-success" type="submit">Add</button>
|
|
</div>
|
|
</form>
|
|
|
|
<div class="list-group">
|
|
{% for c in companies %}
|
|
<a class="list-group-item list-group-item-action" href="{{ url_for('admin.company_detail', company_id=c.id) }}">
|
|
{{ c.name }}
|
|
<span class="text-muted">(users: {{ c.users|length }}, displays: {{ c.displays|length }}, playlists: {{ c.playlists|length }})</span>
|
|
</a>
|
|
{% else %}
|
|
<div class="text-muted">No companies yet.</div>
|
|
{% endfor %}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% endblock %}
|