2024-03-13 16:40:20 +13:00
|
|
|
{% 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_field %}
|
|
|
|
|
|
|
|
{% block app_content %}
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-12 col-md-8 position-relative main_pane">
|
|
|
|
<nav aria-label="breadcrumb" id="breadcrumb_nav" title="Navigation">
|
|
|
|
<ol class="breadcrumb">
|
|
|
|
<li class="breadcrumb-item"><a href="/">{{ _('Home') }}</a></li>
|
|
|
|
<li class="breadcrumb-item"><a href="{{ url_for('activitypub.community_profile', actor=community.ap_id if community.ap_id is not none else community.name) }}">{{ (community.title + '@' + community.ap_domain)|shorten }}</a></li>
|
|
|
|
<li class="breadcrumb-item active">{{ _('Settings') }}</li>
|
|
|
|
</ol>
|
|
|
|
</nav>
|
2024-03-26 23:17:10 +01:00
|
|
|
{% if community %}
|
|
|
|
{% include "community/_community_moderation_nav.html" %}
|
|
|
|
{% endif %}
|
2024-03-13 16:40:20 +13:00
|
|
|
<h1 class="mt-2">
|
|
|
|
{% if community %}
|
2024-03-26 23:17:10 +01:00
|
|
|
{{ _('Edit %(community)s', community=community.display_name()) }}
|
2024-03-13 16:40:20 +13:00
|
|
|
{% else %}
|
|
|
|
{{ _('Create community') }}
|
|
|
|
{% endif %}
|
|
|
|
</h1>
|
2024-03-26 23:17:10 +01:00
|
|
|
<p>{{ _('Edit and configure this community') }}</p>
|
2024-03-13 16:40:20 +13:00
|
|
|
<form method="post" enctype="multipart/form-data" id="add_local_community_form" role="form">
|
|
|
|
{{ form.csrf_token() }}
|
|
|
|
{{ render_field(form.title) }}
|
|
|
|
{{ render_field(form.description) }}
|
|
|
|
{% if community.icon_id %}
|
|
|
|
<img class="community_icon_big rounded-circle" src="{{ community.icon_image() }}" />
|
|
|
|
{% endif %}
|
|
|
|
{{ render_field(form.icon_file) }}
|
|
|
|
<small class="field_hint">Provide a square image that looks good when small.</small>
|
|
|
|
{% if community.image_id %}
|
|
|
|
<a href="{{ community.header_image() }}"><img class="community_icon_big" src="{{ community.header_image() }}" /></a>
|
|
|
|
{% endif %}
|
|
|
|
{{ render_field(form.banner_file) }}
|
|
|
|
<small class="field_hint">Provide a wide image - letterbox orientation.</small>
|
|
|
|
{{ render_field(form.rules) }}
|
|
|
|
{{ render_field(form.nsfw) }}
|
|
|
|
{{ render_field(form.restricted_to_mods) }}
|
|
|
|
{{ render_field(form.local_only) }}
|
|
|
|
{{ render_field(form.new_mods_wanted) }}
|
|
|
|
{{ render_field(form.topic) }}
|
|
|
|
{{ render_field(form.default_layout) }}
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-auto">
|
|
|
|
{{ render_field(form.submit) }}
|
|
|
|
</div>
|
|
|
|
<div class="col-auto">
|
2024-03-26 23:17:10 +01:00
|
|
|
{% if community.is_local() and (community.is_owner() or current_user.is_admin()) %}
|
|
|
|
<p><a class="btn btn-primary btn-warning" href="{{ url_for('community.community_delete', community_id=community.id) }}" rel="nofollow">Delete community</a></p>
|
|
|
|
{% endif %}
|
2024-03-13 16:40:20 +13:00
|
|
|
</div>
|
|
|
|
|
2024-03-26 23:17:10 +01:00
|
|
|
|
2024-03-13 16:40:20 +13:00
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{% endblock %}
|