2023-12-31 12:09:20 +13:00
|
|
|
{% extends "base.html" %}
|
|
|
|
{% from 'bootstrap/form.html' import render_form %}
|
|
|
|
|
|
|
|
{% block app_content %}
|
|
|
|
<div class="row">
|
|
|
|
<div class="col">
|
|
|
|
{% include 'admin/_nav.html' %}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="row">
|
|
|
|
<div class="col">
|
|
|
|
<form method="get">
|
|
|
|
<input type="search" name="search"> <input type="submit" name="submit" value="Search">
|
|
|
|
</form>
|
|
|
|
<table class="table table-striped">
|
|
|
|
<tr>
|
|
|
|
<th>Name</th>
|
|
|
|
<th>Title</th>
|
2024-01-04 16:00:19 +13:00
|
|
|
<th>Topic</th>
|
2023-12-31 12:09:20 +13:00
|
|
|
<th># Posts</th>
|
|
|
|
<th>Home</th>
|
|
|
|
<th>Popular</th>
|
|
|
|
<th>All</th>
|
|
|
|
<th>Actions</th>
|
|
|
|
</tr>
|
|
|
|
{% for community in communities %}
|
|
|
|
<tr>
|
|
|
|
<td>{{ community.name }}</td>
|
|
|
|
<td><img src="{{ community.icon_image('tiny') }}" class="community_icon rounded-circle" loading="lazy" />
|
|
|
|
{{ community.display_name() }}</td>
|
2024-01-04 16:00:19 +13:00
|
|
|
<td>{{ community.topic.name }}</td>
|
2023-12-31 12:09:20 +13:00
|
|
|
<td>{{ community.post_count }}</td>
|
|
|
|
<th>{{ '✓'|safe if community.show_home else '✗'|safe }}</th>
|
|
|
|
<th>{{ '✓'|safe if community.show_popular else '✗'|safe }}</th>
|
|
|
|
<th>{{ '✓'|safe if community.show_all else '✗'|safe }}</th>
|
|
|
|
<td><a href="/c/{{ community.link() }}">View</a> |
|
|
|
|
<a href="{{ url_for('admin.admin_community_edit', community_id=community.id) }}">Edit</a> |
|
|
|
|
<a href="{{ url_for('admin.admin_community_delete', community_id=community.id) }}" class="confirm_first">Delete</a>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
{% endfor %}
|
|
|
|
</table>
|
2024-01-23 19:17:05 +13:00
|
|
|
<nav aria-label="Pagination" class="mt-4" role="navigation">
|
2023-12-31 12:09:20 +13:00
|
|
|
{% if prev_url %}
|
|
|
|
<a href="{{ prev_url }}" class="btn btn-primary">
|
|
|
|
<span aria-hidden="true">←</span> {{ _('Previous page') }}
|
|
|
|
</a>
|
|
|
|
{% endif %}
|
|
|
|
{% if next_url %}
|
|
|
|
<a href="{{ next_url }}" class="btn btn-primary">
|
|
|
|
{{ _('Next page') }} <span aria-hidden="true">→</span>
|
|
|
|
</a>
|
|
|
|
{% endif %}
|
|
|
|
</nav>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{% endblock %}
|