NDOJ/templates/organization/home.html
2022-05-30 01:59:53 -05:00

49 lines
1.9 KiB
HTML

{% extends "organization/home-base.html" %}
{% block title_ruler %}{% endblock %}
{% block middle_title %}
<div class="page-title">
<div class="tabs">
<h2>{{title}}</h2>
<span class="spacer"></span>
{% if request.user.is_authenticated %}
{% if is_member or can_edit %}
{% elif organization.is_open or can_edit %}
<form method="post" action="{{ url('join_organization', organization.id, organization.slug) }}">
{% csrf_token %}
<input type="submit" class="unselectable button" value="{{ _('Join') }}" style="margin-right: 1em">
</form>
{% else %}
<a href="{{ url('request_organization', organization.id, organization.slug) }}"
class="unselectable button">{{ _('Request membership') }}</a>
{% endif %}
{% endif %}
</div>
</div>
{% endblock %}
{% block middle_content %}
{% block before_posts %}{% endblock %}
{% if is_member or can_edit %}
{% for post in posts %}
{% include "blog/content.html" %}
{% if posts.paginator.num_pages > 1 %}
<div style="margin-bottom:10px;margin-top:10px">{% include "list-pages.html" %}</div>
{% endif %}
{% endfor %}
{% else %}
<div class="blog-sidebox sidebox">
<h3>{{ _('About') }}<i class="fa fa-info-circle"></i></h3>
<div class="sidebox-content">
<div style="margin: 0.3em;">
{% cache 3600 'organization_html' organization.id MATH_ENGINE %}
{{ organization.about|markdown('organization-about', MATH_ENGINE)|reference|str|safe }}
{% endcache %}
</div>
</div>
</div>
{% endif %}
{% block after_posts %}{% endblock %}
{% endblock %}