NDOJ/templates/organization/home.html

50 lines
1.8 KiB
HTML
Raw Normal View History

2022-05-30 06:59:53 +00:00
{% extends "organization/home-base.html" %}
2022-05-28 04:28:22 +00:00
{% block title_ruler %}{% endblock %}
2022-05-30 06:59:53 +00:00
{% block middle_title %}
2021-10-10 22:37:15 +00:00
<div class="page-title">
<div class="tabs">
2022-05-30 06:59:53 +00:00
<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 %}
2022-05-31 04:35:30 +00:00
<input type="submit" class="unselectable button" value="{{ _('Join') }}">
2022-05-30 06:59:53 +00:00
</form>
{% else %}
<a href="{{ url('request_organization', organization.id, organization.slug) }}"
class="unselectable button">{{ _('Request membership') }}</a>
2021-10-10 22:37:15 +00:00
{% endif %}
2022-05-30 06:59:53 +00:00
{% endif %}
</div>
2021-10-10 22:37:15 +00:00
</div>
2022-05-30 06:59:53 +00:00
{% endblock %}
{% block middle_content %}
{% block before_posts %}{% endblock %}
2022-05-28 04:28:22 +00:00
{% 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">
2021-10-10 22:37:15 +00:00
<h3>{{ _('About') }}<i class="fa fa-info-circle"></i></h3>
2020-12-28 05:45:58 +00:00
<div class="sidebox-content">
2022-05-28 04:28:22 +00:00
<div style="margin: 0.3em;">
2020-12-28 05:45:58 +00:00
{% cache 3600 'organization_html' organization.id MATH_ENGINE %}
{{ organization.about|markdown('organization-about', MATH_ENGINE)|reference|str|safe }}
{% endcache %}
</div>
2020-01-21 06:35:58 +00:00
</div>
</div>
2022-05-28 04:28:22 +00:00
{% endif %}
{% block after_posts %}{% endblock %}
{% endblock %}