45 lines
2.2 KiB
HTML
45 lines
2.2 KiB
HTML
{% extends "base.html" %}
|
|
{% block title %}{{ _('Admin · Listings') }}{% endblock %}
|
|
{% block content %}
|
|
{% include "admin/_nav.html" %}
|
|
<div class="card">
|
|
<p class="muted">
|
|
{{ _('Auto-flag threshold: %(n)s distinct reports · Blocklist: %(k)s keywords', n=flag_threshold, k=keyword_blocklist|length) }}
|
|
· <a href="{{ url_for('admin.settings') }}">{{ _('Edit in Settings') }}</a>
|
|
</p>
|
|
|
|
<h2>{{ _('Flag queue') }}</h2>
|
|
{% if not pagination.items %}<p class="muted">{{ _('No flagged listings.') }}</p>{% endif %}
|
|
<table class="list">
|
|
{% for l in pagination.items %}
|
|
<tr>
|
|
<td><a href="{{ url_for('listings.detail', listing_id=l.id) }}">{{ l.title }}</a></td>
|
|
<td>{{ l.flag_count }} {{ _('flags') }}</td>
|
|
<td><span class="badge {{ 'warn' if l.status.value == 'flagged' else 'ok' }}">{{ l.status.value }}</span></td>
|
|
<td class="muted small">{{ l.created_at.strftime('%Y-%m-%d') }}</td>
|
|
<td>
|
|
<form method="post" action="{{ url_for('admin.approve_listing', listing_id=l.id) }}" style="display:inline">
|
|
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
|
|
<button class="btn tiny" type="submit">{{ _('Approve') }}</button>
|
|
</form>
|
|
<form method="post" action="{{ url_for('admin.hide_listing', listing_id=l.id) }}" style="display:inline">
|
|
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
|
|
<button class="btn ghost tiny" type="submit">{{ _('Hide') }}</button>
|
|
</form>
|
|
<form method="post" action="{{ url_for('admin.remove_listing', listing_id=l.id) }}" style="display:inline"
|
|
onsubmit="return confirm('{{ _('Remove this listing?') }}');">
|
|
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
|
|
<button class="btn danger tiny" type="submit">{{ _('Remove') }}</button>
|
|
</form>
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</table>
|
|
|
|
<div class="pager">
|
|
{% if pagination.has_prev %}<a href="{{ url_for('admin.listings', **merge_query(page=pagination.prev_num)) }}">← {{ _('Prev') }}</a>{% endif %}
|
|
{% if pagination.has_next %}<a href="{{ url_for('admin.listings', **merge_query(page=pagination.next_num)) }}">{{ _('Next') }} →</a>{% endif %}
|
|
</div>
|
|
</div>
|
|
{% endblock %}
|