mirror of
https://codeberg.org/rimu/pyfedi
synced 2025-01-23 19:36:56 -08:00
72 lines
3.3 KiB
HTML
72 lines
3.3 KiB
HTML
{% if theme() and file_exists('app/templates/themes/' + theme() + '/base.html') %}
|
|
{% extends 'themes/' + theme() + '/base.html' %}
|
|
{% else %}
|
|
{% extends "base.html" %}
|
|
{% endif %} %}
|
|
{% from 'bootstrap/form.html' import render_form %}
|
|
{% set active_child = 'admin_communities' %}
|
|
|
|
{% block app_content %}
|
|
<div class="row">
|
|
<div class="col">
|
|
<h1>{{ title }}</h1>
|
|
<form method="get">
|
|
<input type="search" name="search"> <input type="submit" name="submit" value="Search">
|
|
</form>
|
|
Result Filter:
|
|
<a href="{{ url_for('admin.admin_communities') }}">All</a> |
|
|
<a href="{{ url_for('admin.admin_communities_no_topic') }}">No topic</a>
|
|
<table class="table table-striped">
|
|
<tr>
|
|
<th>Name</th>
|
|
<th>Title</th>
|
|
<th>Topic</th>
|
|
<th># Posts</th>
|
|
<th>Retention</th>
|
|
<th>Layout</th>
|
|
<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>
|
|
<th>Actions</th>
|
|
</tr>
|
|
{% for community in communities.items %}
|
|
<tr>
|
|
<td><a href="/c/{{ community.link() }}">{{ community.name }}</a></td>
|
|
<td>{{ render_communityname(community) }}{% if community.banned %} (banned){% endif %}</td>
|
|
<td>{{ community.topic.name }}</td>
|
|
<td>{{ community.post_count }}</td>
|
|
<td>{{ community.content_retention if community.content_retention != -1 }}</td>
|
|
<td>{{ community.default_layout if community.default_layout }}</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>
|
|
<th>{{ '⚠'|safe if community.nsfw or community.nsfl or community.content_warning else ''|safe }}</th>
|
|
<td><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>
|
|
<nav aria-label="Pagination" class="mt-4" role="navigation">
|
|
{% 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>
|
|
<hr />
|
|
<div class="row">
|
|
<div class="col">
|
|
{% include 'admin/_nav.html' %}
|
|
</div>
|
|
</div>
|
|
<hr />
|
|
{% endblock %}
|