53 lines
1.8 KiB
HTML
53 lines
1.8 KiB
HTML
{% extends "base.html" %}
|
|
{% block title %}{{ _('Admin · Promoted Keywords') }}{% endblock %}
|
|
{% block content %}
|
|
{% include "admin/_nav.html" %}
|
|
<div class="card">
|
|
<div style="display:flex;justify-content:space-between;align-items:center">
|
|
<h2>{{ _('Promoted keywords') }}</h2>
|
|
<a class="btn" href="{{ url_for('admin.admin_promoted_keyword_new') }}">{{ _('+ Assign keyword') }}</a>
|
|
</div>
|
|
|
|
{% if not pks %}<p class="muted">{{ _('No promoted keywords.') }}</p>{% endif %}
|
|
<table class="list">
|
|
<thead><tr>
|
|
<th>{{ _('Keyword') }}</th>
|
|
<th>{{ _('Listing') }}</th>
|
|
<th>{{ _('Priority') }}</th>
|
|
<th>{{ _('Expires') }}</th>
|
|
<th>{{ _('Status') }}</th>
|
|
<th></th>
|
|
</tr></thead>
|
|
{% for pk in pks %}
|
|
<tr>
|
|
<td><code>{{ pk.keyword }}</code></td>
|
|
<td>
|
|
{% if pk.listing %}
|
|
<a href="{{ url_for('listings.detail', listing_id=pk.listing_id) }}">
|
|
{{ pk.listing.title[:60] }}
|
|
</a>
|
|
{% else %}<span class="muted">—</span>{% endif %}
|
|
</td>
|
|
<td>{{ pk.priority }}</td>
|
|
<td class="muted small">{{ pk.expires_at.strftime('%Y-%m-%d') }}</td>
|
|
<td>
|
|
{% if pk.is_active %}
|
|
<span class="badge ok">{{ _('Active') }}</span>
|
|
{% else %}
|
|
<span class="badge warn">{{ _('Expired') }}</span>
|
|
{% endif %}
|
|
</td>
|
|
<td>
|
|
<form method="post"
|
|
action="{{ url_for('admin.admin_promoted_keyword_delete', pk_id=pk.id) }}"
|
|
style="display:inline" onsubmit="return confirm('{{ _('Remove?') }}');">
|
|
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
|
|
<button class="btn danger tiny" type="submit">{{ _('Remove') }}</button>
|
|
</form>
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</table>
|
|
</div>
|
|
{% endblock %}
|