Initial commit
This commit is contained in:
28
templates/admin/displays.html
Normal file
28
templates/admin/displays.html
Normal file
@@ -0,0 +1,28 @@
|
||||
{% extends 'admin/base.html' %}
|
||||
{% block content %}
|
||||
<div class="d-flex justify-content-between align-items-center mb-3">
|
||||
<h4 class="m-0">Displays</h4>
|
||||
<a class="btn btn-success" href="{{ url_for('admin.display_new') }}">New Display</a>
|
||||
</div>
|
||||
<table class="table table-striped table-sm">
|
||||
<thead><tr><th>ID</th><th>Name</th><th>Public ID</th><th>URL</th><th>Online</th><th>Last seen</th><th></th></tr></thead>
|
||||
<tbody>
|
||||
{% for d in displays %}
|
||||
<tr>
|
||||
<td>{{ d.id }}</td>
|
||||
<td>{{ d.name }}</td>
|
||||
<td><code>{{ d.public_id }}</code></td>
|
||||
<td><a href="{{ url_for('main.display_page', public_id=d.public_id) }}" target="_blank">/display/{{ d.public_id }}</a></td>
|
||||
<td>{{ 'yes' if d.is_online else 'no' }}</td>
|
||||
<td>{{ d.last_seen or '' }}</td>
|
||||
<td class="text-end">
|
||||
<a class="btn btn-outline-primary btn-sm" href="{{ url_for('admin.display_edit', display_id=d.id) }}">Edit</a>
|
||||
<form method="post" action="{{ url_for('admin.display_delete', display_id=d.id) }}" style="display:inline" onsubmit="return confirm('Delete display?');">
|
||||
<button class="btn btn-outline-danger btn-sm" type="submit">Delete</button>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user