06/16 Phase 6 (continue)
This commit is contained in:
@@ -0,0 +1,50 @@
|
||||
{% 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 %}
|
||||
Reference in New Issue
Block a user