2024-02-07 17:31:12 +13:00
|
|
|
{% if theme() and file_exists('app/templates/themes/' + theme() + '/base.html') %}
|
|
|
|
{% extends 'themes/' + theme() + '/base.html' %}
|
|
|
|
{% else %}
|
|
|
|
{% extends "base.html" %}
|
|
|
|
{% endif %} %}
|
2023-12-31 12:09:20 +13:00
|
|
|
{% from 'bootstrap/form.html' import render_form %}
|
2024-04-14 20:05:40 +12:00
|
|
|
{% set active_child = 'admin_communities' %}
|
2023-12-31 12:09:20 +13:00
|
|
|
|
|
|
|
{% block app_content %}
|
|
|
|
<div class="row">
|
|
|
|
<div class="col">
|
2024-05-19 11:41:02 +12:00
|
|
|
<h1>{{ title }}</h1>
|
2023-12-31 12:09:20 +13:00
|
|
|
<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>
|
2024-06-26 22:38:02 +02:00
|
|
|
<th># Posts</th>
|
2024-06-27 14:34:32 +02:00
|
|
|
<th title="{{ _('Posts show on home page.') }}">Home</th>
|
|
|
|
<th title="{{ _('Posts can be popular.') }}">Popular</th>
|
|
|
|
<th title="{{ _('Posts show in the All feed.') }}">All</th>
|
|
|
|
<th title="{{ _('Content warning, NSFW or NSFL set for community.') }}">Warning</th>
|
2023-12-31 12:09:20 +13:00
|
|
|
<th>Actions</th>
|
|
|
|
</tr>
|
2024-02-06 17:40:03 +13:00
|
|
|
{% for community in communities.items %}
|
2023-12-31 12:09:20 +13:00
|
|
|
<tr>
|
|
|
|
<td>{{ community.name }}</td>
|
|
|
|
<td><img src="{{ community.icon_image('tiny') }}" class="community_icon rounded-circle" loading="lazy" />
|
2024-03-13 16:40:20 +13:00
|
|
|
{{ community.display_name() }}{% if community.banned %} (banned){% endif %}</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>
|
2024-06-26 22:38:02 +02:00
|
|
|
<th>{{ '⚠'|safe if community.nsfw or community.nsfl or community.content_warning else ''|safe }}</th>
|
2023-12-31 12:09:20 +13:00
|
|
|
<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>
|
2024-04-14 20:05:40 +12:00
|
|
|
<hr />
|
|
|
|
<div class="row">
|
|
|
|
<div class="col">
|
|
|
|
{% include 'admin/_nav.html' %}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<hr />
|
2023-12-31 12:09:20 +13:00
|
|
|
{% endblock %}
|