2024-07-09 05:24:43 -07:00
< aside id = "side_pane" class = "col-12 col-md-4 side_pane" role = "complementary" >
{% if community %}
{% block community_actions %}
< div class = "card" >
< div class = "card-body" >
< div class = "row" >
< div class = "col-6" >
{% if current_user.is_authenticated and community_membership(current_user, community) in [SUBSCRIPTION_MEMBER, SUBSCRIPTION_MODERATOR, SUBSCRIPTION_OWNER] -%}
< a class = "w-100 btn btn-primary" href = "/community/{{ community.link() }}/unsubscribe" rel = "nofollow" > {{ _('Leave') }}< / a >
{% elif current_user.is_authenticated and community_membership(current_user, community) == SUBSCRIPTION_PENDING -%}
< a class = "w-100 btn btn-outline-secondary" href = "/community/{{ community.link() }}/unsubscribe" rel = "nofollow" > {{ _('Pending') }}< / a >
{% else -%}
< a class = "w-100 btn btn-primary" href = "/community/{{ 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/{{ community.link() }}/submit" > {{ _('Create post') }}< / a >
< / div >
{% endif -%}
< / div >
< form method = "get" action = "/search" >
2024-12-31 15:01:51 -08:00
< input type = "search" id = "search_community" name = "q" class = "form-control mt-2" placeholder = "{{ _('Search this community') }}" / >
2024-07-09 05:24:43 -07:00
< input type = "hidden" name = "community" value = "{{ community.id }}" >
< / form >
< / div >
< / div >
{% endblock %}
{% block about_community %}
2024-12-31 15:01:51 -08:00
< div class = "card mt-3" id = "about_community" >
2024-07-09 05:24:43 -07:00
< div class = "card-header" >
< h2 > {{ community.title }}< / h2 >
< / div >
< div class = "card-body" >
2024-12-07 13:04:07 -08:00
< p > {{ community.description_html|community_links|safe if community.description_html else '' }}< / p >
2024-07-09 05:24:43 -07:00
< p > {{ community.rules_html|safe if community.rules_html else '' }}< / p >
2024-12-23 15:52:01 -08:00
< p > {{ _('Members') if community.is_local() else _('Local members') }}: {{ community.subscriptions_count }}< br >
2024-12-23 15:47:34 -08:00
{{ _('Posts') }}: {{ community.post_count }}< br >
{{ _('Comments') }}: {{ community.post_reply_count }}
< / p >
2024-07-09 05:24:43 -07:00
{% if len(mods) > 0 and not community.private_mods -%}
< h3 > Moderators< / h3 >
< ul class = "moderator_list" >
{% for mod in mods -%}
< li > {{ render_username(mod) }}< / li >
{% endfor -%}
< / ul >
2024-08-17 18:44:19 -07:00
{% if un_moderated -%}
< p class = "red small" > {{ _('Moderators have not been active recently.') }}< / p >
{% endif -%}
2024-07-09 05:24:43 -07:00
{% endif -%}
2024-11-01 20:10:35 -07:00
{% if rss_feed and not community.is_local() -%}
2024-07-09 05:24:43 -07:00
< ul >
< li > < p > < a href = "{{ community.public_url() }}" > {{ _('View community on original server') }}< / a > < / p > < / li >
2025-01-19 07:04:32 -08:00
< li > < p > < a href = "{{ url_for('search.retrieve_remote_post') }}" > {{ _('Retrieve a post from the original server') }}< / a > < / p > < / li >
2024-07-09 05:24:43 -07:00
< / ul >
{% endif -%}
{% if community.local_only -%}
2024-07-10 06:40:06 -07:00
< p > {{ _('Only people on %(instance_domain)s can post or reply in this community.', instance_domain=instance_domain) }}< / p >
2024-07-09 05:24:43 -07:00
{% endif -%}
{% if rss_feed -%}
< p class = "mt-4" >
< a class = "no-underline" href = "{{ rss_feed }}" rel = "nofollow" > < span class = "fe fe-rss" > < / span > RSS feed< / a >
< / p >
{% endif -%}
< / div >
< / div >
{% if related_communities -%}
< div class = "card mt-3" >
< div class = "card-header" >
< h2 > {{ _('Related communities') }}< / h2 >
< / div >
< div class = "card-body" >
< ul class = "list-group list-group-flush" >
{% for community in related_communities -%}
< li class = "list-group-item" >
{{ render_communityname(community) }}
< / li >
{% endfor -%}
< / ul >
2024-09-03 14:32:15 -07:00
< p class = "mt-4" > < a class = "btn btn-primary" href = "/communities" > {{ _('More communities') }}< / a > < / p >
2024-07-09 05:24:43 -07:00
< / div >
< / div >
{% endif -%}
{% endblock %}
{% block community_settings %}
{% if is_moderator or is_admin -%}
< 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/{{ 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 -%}
< / div >
< / div >
{% endif -%}
{% endblock %}
{% endif %}
{% include "_inoculation_links.html" %}
< / aside >