mirror of
https://codeberg.org/rimu/pyfedi
synced 2025-01-24 11:51:27 -08:00
104 lines
5.5 KiB
HTML
104 lines
5.5 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 %}
|
|
|
|
{% block app_content %}
|
|
<script src="/static/js/coolfieldset.js"></script>
|
|
<div class="row">
|
|
<div class="col-12 col-md-8 position-relative add_reply main_pane">
|
|
<fieldset class="coolfieldset mt-4"><legend class="w-auto">Original post</legend>
|
|
<h3>{{ post.title }}</h3>
|
|
{{ post.body_html | safe if post.body_html else '' }}
|
|
</fieldset>
|
|
<fieldset class="coolfieldset mt-4"><legend class="w-auto">Comment you are replying to</legend>
|
|
{{ comment.body_html | safe}}
|
|
</fieldset>
|
|
<div class="position-relative">
|
|
{% if post.community.ap_id and '@beehaw.org' in post.community.ap_id %}
|
|
<p>{{ _('This post is hosted on beehaw.org which has <a href="https://docs.beehaw.org/docs/core-principles/what-is-beehaw/" target="_blank" rel="nofollow">higher standards of behaviour than most places. Be nice</a>.') }}</p>
|
|
{% endif %}
|
|
{{ render_form(form) }}
|
|
{% if not low_bandwidth %}
|
|
{% if markdown_editor %}
|
|
<script nonce="{{ session['nonce'] }}">
|
|
window.addEventListener("load", function () {
|
|
var downarea = new DownArea({
|
|
elem: document.querySelector('#body'),
|
|
resize: DownArea.RESIZE_VERTICAL,
|
|
hide: ['heading', 'bold-italic'],
|
|
});
|
|
setupAutoResize('body');
|
|
});
|
|
</script>
|
|
{% else %}
|
|
<!-- <a href="#" aria-hidden="true" id="post_reply_markdown_editor_enabler" class="markdown_editor_enabler" data-id="body">{{ _('Enable markdown editor') }}</a> -->
|
|
{% endif %}
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
<aside id="side_pane" class="col-12 col-md-4 side_pane" role="complementary">
|
|
<div class="card">
|
|
<div class="card-body">
|
|
<div class="row">
|
|
<div class="col-6">
|
|
{% if current_user.is_authenticated and community_membership(current_user, post.community) %}
|
|
<a class="w-100 btn btn-primary" href="/community/{{ post.community.link() }}/unsubscribe" rel="nofollow">{{ _('Leave') }}</a>
|
|
{% else %}
|
|
<a class="w-100 btn btn-primary" href="/community/{{ post.community.link() }}/subscribe" rel="nofollow">{{ _('Join') }}</a>
|
|
{% endif %}
|
|
</div>
|
|
{% if not community.restricted_to_mods or (community.restricted_to_mods and current_user.is_authenticated and community_membership(current_user, community) in [SUBSCRIPTION_MODERATOR, SUBSCRIPTION_OWNER]) %}
|
|
<div class="col-6">
|
|
<a class="w-100 btn btn-primary" href="/community/{{ post.community.link() }}/submit">{{ _('Create post') }}</a>
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
<form method="get" action="/search">
|
|
<input type="search" name="q" class="form-control mt-2" placeholder="{{ _('Search this community') }}" />
|
|
<input type="hidden" name="community" value="{{ post.community.id }}">
|
|
</form>
|
|
</div>
|
|
</div>
|
|
<div class="card mt-3">
|
|
<div class="card-header">
|
|
<h2>{{ _('About community') }}</h2>
|
|
</div>
|
|
<div class="card-body">
|
|
<p>{{ post.community.description_html|safe if post.community.description_html else '' }}</p>
|
|
<p>{{ post.community.rules_html|safe if post.community.rules_html else '' }}</p>
|
|
{% if len(mods) > 0 and not post.community.private_mods %}
|
|
<h3>Moderators</h3>
|
|
<ul class="moderator_list">
|
|
{% for mod in mods %}
|
|
<li><a href="/u/{{ mod.link() }}">{{ mod.display_name() }}</a></li>
|
|
{% endfor %}
|
|
</ul>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
{% if is_moderator %}
|
|
<div class="card mt-3">
|
|
<div class="card-header">
|
|
<h2>{{ _('Community Settings') }}</h2>
|
|
</div>
|
|
<div class="card-body">
|
|
{% if is_moderator or is_owner or is_admin %}
|
|
<p><a href="/community/{{ post.community.link() }}/moderate" class="btn btn-primary">{{ _('Moderate') }}</a></p>
|
|
{% endif %}
|
|
{% if is_owner or is_admin %}
|
|
<p><a href="{{ url_for('community.community_edit', community_id=community.id) }}" class="btn btn-primary">{{ _('Settings') }}</a></p>
|
|
{% endif %}
|
|
{% if post.community.is_local() and (post.community.is_owner() or current_user.is_admin()) %}
|
|
<p><a class="btn btn-primary btn-warning" href="{{ url_for('community.community_delete', community_id=post.community.id) }}" rel="nofollow">Delete community</a></p>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
{% include "_inoculation_links.html" %}
|
|
</aside>
|
|
</div>
|
|
|
|
{% endblock %}
|