Files
launchpad/templates/apps_list.html

38 lines
1.3 KiB
HTML
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{% extends "base.html" %}
{% block title %}Apps LaunchPad Admin{% endblock %}
{% block content %}
<div class="header-row">
<h1>Apps</h1>
<a class="btn" href="{{ url_for('app_create') }}">+ Add App</a>
</div>
{% if apps %}
<table class="table">
<thead>
<tr>
<th>ID</th><th>Icon</th><th>Name</th><th>URL</th><th>Enabled</th><th>Created</th><th>Actions</th>
</tr>
</thead>
<tbody>
{% for a in apps %}
<tr>
<td>{{ a.id }}</td>
<td>{% if a.image %}<img src="{{ a.image }}" alt="{{ a.name }}" class="icon"/>{% else %}-{% endif %}</td>
<td>{{ a.name }}</td>
<td><a href="{{ a.url }}" target="_blank" rel="noopener">{{ a.url }}</a></td>
<td>{{ 'Yes' if a.enabled else 'No' }}</td>
<td>{{ a.created_at }}</td>
<td class="actions">
<a class="btn small" href="{{ url_for('app_edit', app_id=a.id) }}">Edit</a>
<form method="post" action="{{ url_for('app_delete', app_id=a.id) }}" onsubmit="return confirm('Delete this app?')" style="display:inline-block">
<button class="btn danger small" type="submit">Delete</button>
</form>
</td>
</tr>
{% endfor %}
</tbody>
</table>
{% else %}
<p>No apps yet. Click “Add App” to create your first one.</p>
{% endif %}
{% endblock %}