pyfedi/app/templates/admin/communities.html

81 lines
3.8 KiB
HTML
Raw Normal View History

{% if theme() and file_exists('app/templates/themes/' + theme() + '/base.html') %}
{% extends 'themes/' + theme() + '/base.html' %}
{% else %}
{% extends "base.html" %}
2024-12-10 12:16:52 +01:00
{% 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>
<div class="row">
<div class="col">
<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>
</div>
<div class="col-auto">
<div class="btn-group">
<a href="{{ url_for('community.add_local') }}" class="btn btn-outline-secondary" aria-label="{{ _('Create local community') }}">{{ _('Create local community') }}</a>
<a href="{{ url_for('community.add_remote') }}" class="btn btn-outline-secondary" aria-label="{{ _('Add community from another instance') }}">{{ _('Add remote community') }}</a>
</div>
</div>
</div>
2023-12-31 12:09:20 +13:00
<table class="table table-striped">
<tr>
<th>Name</th>
<th>Topic</th>
<th>#&nbsp;Posts</th>
<th>Retention</th>
2024-09-08 17:03:51 +12:00
<th>Layout</th>
2024-06-27 14:34:32 +02:00
<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>
{% for community in communities.items %}
2023-12-31 12:09:20 +13:00
<tr>
<td>{{ render_communityname(community, add_domain=False) }}{% if community.banned %} (banned){% endif %}<br />
!<a href="/c/{{ community.link() }}">{{ community.name }}</a><wbr />@<a href="{{ community.ap_profile_id }}">{{ community.ap_domain }}</a></td>
<td>{{ community.topic.name }}</td>
2023-12-31 12:09:20 +13:00
<td>{{ community.post_count }}</td>
<td>{{ community.content_retention if community.content_retention != -1 }}</td>
2024-09-08 17:03:51 +12:00
<td>{{ community.default_layout if community.default_layout }}</td>
2023-12-31 12:09:20 +13:00
<th>{{ '&check;'|safe if community.show_popular else '&cross;'|safe }}</th>
<th>{{ '&check;'|safe if community.show_all else '&cross;'|safe }}</th>
<th>{{ '&#x26A0;'|safe if community.nsfw or community.nsfl or community.content_warning else ''|safe }}</th>
2024-06-29 19:43:09 +02:00
<td><a href="{{ url_for('admin.admin_community_edit', community_id=community.id) }}">Edit</a> |
2023-12-31 12:09:20 +13:00
<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">&larr;</span> {{ _('Previous page') }}
</a>
{% endif %}
{% if next_url %}
<a href="{{ next_url }}" class="btn btn-primary">
{{ _('Next page') }} <span aria-hidden="true">&rarr;</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 />
{% endblock %}