Better integration of wiki pages on clubs

This commit is contained in:
2017-10-01 20:52:29 +02:00
parent 2c1cf2d7af
commit baa7be69e4
13 changed files with 203 additions and 52 deletions

View File

@ -6,10 +6,10 @@
{% if club.logo %}
<div class="club_logo"><img src="{{ club.logo.url }}" alt="{{ club.unix_name }}"></div>
{% endif %}
{% if club.page and club.page.revisions.exists() %}
{{ club.page.revisions.last().content|markdown }}
{% else %}
<h3>{% trans %}Club{% endtrans %}</h3>
{% if page_revision %}
{{ page_revision|markdown }}
{% else %}
<h3>{% trans %}Club{% endtrans %}</h3>
{% endif %}
</div>
{% endblock %}

View File

@ -0,0 +1,13 @@
{% extends "core/base.jinja" %}
{% from 'core/macros_pages.jinja' import page_history %}
{% block content %}
{% if club.page %}
{{ page_history(club.page) }}
{% else %}
{% trans %}No page existing for this club{% endtrans %}
{% endif %}
{% endblock %}

View File

@ -0,0 +1,14 @@
{% extends "core/base.jinja" %}
{% from 'core/macros_pages.jinja' import markdown_preview_script, page_edit_form %}
{% block head %}
{{ super() }}
{{ markdown_preview_script(csrf_token) }}
{% endblock %}
{% block content %}
{{ page_edit_form(page, form, url('club:club_edit_page', club_id=page.club.id), csrf_token) }}
{% endblock %}