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-28 20:00:07 +13:00
|
|
|
{% 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 }}
|
|
|
|
</fieldset>
|
|
|
|
{% if comment %}
|
|
|
|
<fieldset class="coolfieldset mt-4"><legend class="w-auto">Comment you are replying to</legend>
|
|
|
|
{{ comment.body_html | safe}}
|
|
|
|
</fieldset>
|
|
|
|
{% endif %}
|
|
|
|
<div class="position-relative">
|
|
|
|
{{ render_form(form) }}
|
|
|
|
{% 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'],
|
|
|
|
value: {{ form.body.data | tojson | safe }}
|
|
|
|
});
|
|
|
|
setupAutoResize('body');
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
{% endif %}
|
|
|
|
</div>
|
|
|
|
</div>
|
2024-02-05 08:39:08 +13:00
|
|
|
<aside id="side_pane" class="col-12 col-md-4 side_pane" role="complementary">
|
2023-12-28 20:00:07 +13:00
|
|
|
<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) %}
|
2024-01-16 15:38:56 +13:00
|
|
|
<a class="w-100 btn btn-primary" href="/community/{{ post.community.link() }}/unsubscribe" rel="nofollow">{{ _('Unsubscribe') }}</a>
|
2023-12-28 20:00:07 +13:00
|
|
|
{% else %}
|
2024-01-16 15:38:56 +13:00
|
|
|
<a class="w-100 btn btn-primary" href="/community/{{ post.community.link() }}/subscribe" rel="nofollow">{{ _('Subscribe') }}</a>
|
2023-12-28 20:00:07 +13:00
|
|
|
{% endif %}
|
|
|
|
</div>
|
|
|
|
<div class="col-6">
|
|
|
|
<a class="w-100 btn btn-primary" href="/community/{{ post.community.link() }}/submit">{{ _('Create post') }}</a>
|
|
|
|
</div>
|
|
|
|
</div>
|
2024-01-13 22:09:02 +13:00
|
|
|
<!-- <form method="get">
|
2023-12-28 20:00:07 +13:00
|
|
|
<input type="search" name="search" class="form-control mt-2" placeholder="{{ _('Search this community') }}" />
|
2024-01-13 22:09:02 +13:00
|
|
|
</form> -->
|
2023-12-28 20:00:07 +13:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="card mt-3">
|
|
|
|
<div class="card-header">
|
|
|
|
<h2>{{ _('About community') }}</h2>
|
|
|
|
</div>
|
|
|
|
<div class="card-body">
|
|
|
|
<p>{{ post.community.description|safe }}</p>
|
|
|
|
<p>{{ post.community.rules|safe }}</p>
|
|
|
|
{% if len(mods) > 0 and not post.community.private_mods %}
|
|
|
|
<h3>Moderators</h3>
|
|
|
|
<ol>
|
|
|
|
{% for mod in mods %}
|
2024-01-09 20:44:08 +13:00
|
|
|
<li><a href="/u/{{ mod.link() }}">{{ mod.display_name() }}</a></li>
|
2023-12-28 20:00:07 +13:00
|
|
|
{% endfor %}
|
|
|
|
</ol>
|
|
|
|
{% endif %}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{% if is_moderator %}
|
|
|
|
<div class="card mt-3">
|
|
|
|
<div class="card-header">
|
|
|
|
<h2>{{ _('Community Settings') }}</h2>
|
|
|
|
</div>
|
|
|
|
<div class="card-body">
|
2024-03-26 22:18:05 +13:00
|
|
|
{% if is_moderator or is_owner or is_admin %}
|
|
|
|
<p><a href="/community/{{ 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 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 %}
|
2023-12-28 20:00:07 +13:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
2024-01-19 15:08:39 +13:00
|
|
|
{% include "_inoculation_links.html" %}
|
2024-01-28 21:38:04 +13:00
|
|
|
</aside>
|
2023-12-28 20:00:07 +13:00
|
|
|
</div>
|
|
|
|
|
|
|
|
{% endblock %}
|