Files
classifieds/app/templates/admin/sponsors.html
T
2026-06-17 17:51:03 -04:00

51 lines
1.8 KiB
HTML
Raw 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 %}{{ _('Admin · Sponsors') }}{% endblock %}
{% block content %}
{% include "admin/_nav.html" %}
<div class="card">
<div style="display:flex;justify-content:space-between;align-items:center">
<h2>{{ _('Sponsors') }}</h2>
<a class="btn" href="{{ url_for('admin.admin_sponsor_new') }}">{{ _('+ New sponsor') }}</a>
</div>
{% if not sponsors %}<p class="muted">{{ _('No sponsors yet.') }}</p>{% endif %}
<table class="list">
<thead><tr>
<th>{{ _('Name') }}</th>
<th>{{ _('Tier') }}</th>
<th>{{ _('Category') }}</th>
<th>{{ _('Schedule') }}</th>
<th>{{ _('Status') }}</th>
<th></th>
</tr></thead>
{% for sp in sponsors %}
<tr>
<td><a href="{{ url_for('admin.admin_sponsor_edit', sponsor_id=sp.id) }}">{{ sp.name }}</a></td>
<td><span class="badge cat">{{ sp.tier }}</span></td>
<td class="muted small">{{ sp.category.name if sp.category else '—' }}</td>
<td class="muted small">
{{ sp.starts_at.strftime('%Y-%m-%d') }}
{{ sp.ends_at.strftime('%Y-%m-%d') }}
</td>
<td>
{% if sp.is_running %}
<span class="badge ok">{{ _('Live') }}</span>
{% elif sp.is_active %}
<span class="badge cat">{{ _('Scheduled') }}</span>
{% else %}
<span class="badge warn">{{ _('Off') }}</span>
{% endif %}
</td>
<td>
<form method="post" action="{{ url_for('admin.admin_sponsor_delete', sponsor_id=sp.id) }}"
style="display:inline" onsubmit="return confirm('{{ _('Delete?') }}');">
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
<button class="btn danger tiny" type="submit">{{ _('Del') }}</button>
</form>
</td>
</tr>
{% endfor %}
</table>
</div>
{% endblock %}