mirror of
https://github.com/ae-utbm/sith.git
synced 2025-01-09 00:21:14 +00:00
Sli
655d72a2b1
* Migrate alpine * Migrate jquery and jquery-ui * Migrate shorten * Add babel for javascript * Introduce staticfiles django app * Only bundle -index.js files in static/webpack * Unify scss and webpack generated files * Convert scss calls to static * Add --clear-generated option to collectstatic * Fix docs warnings
53 lines
1.4 KiB
Django/Jinja
53 lines
1.4 KiB
Django/Jinja
{% extends "core/base.jinja" %}
|
|
{% from 'forum/macros.jinja' import display_message, display_search_bar %}
|
|
|
|
{% block title %}
|
|
{% if topic %}
|
|
{% trans %}Reply{% endtrans %}
|
|
{% else %}
|
|
{% trans %}New topic{% endtrans %}
|
|
{% endif %}
|
|
{% endblock %}
|
|
|
|
|
|
{% block additional_css %}
|
|
<link rel="stylesheet" href="{{ static('forum/css/forum.scss') }}">
|
|
{% endblock %}
|
|
|
|
{% block content %}
|
|
{% if topic %}
|
|
{{ display_search_bar(request) }}
|
|
<p>
|
|
<a href="{{ url('forum:main') }}">{% trans %}Forum{% endtrans %}</a>
|
|
{% for f in topic.forum.get_parent_list() %}
|
|
> <a href="{{ f.get_absolute_url() }}">{{ f }}</a>
|
|
{% endfor %}
|
|
> <a href="{{ topic.forum.get_absolute_url() }}">{{ topic.forum }}</a>
|
|
> <a href="{{ topic.get_absolute_url() }}">{{ topic }}</a>
|
|
</p>
|
|
<div id="forum">
|
|
<h3>{{ topic.title }}</h3>
|
|
<h4>{% trans %}Reply{% endtrans %}</h4>
|
|
{% else %}
|
|
<div id="forum">
|
|
<h4>{% trans %}New topic{% endtrans %}</h4>
|
|
{% endif %}
|
|
<form action="" method="post" enctype="multipart/form-data">
|
|
{% csrf_token %}
|
|
{% render_honeypot_field settings.HONEYPOT_FIELD_NAME_FORUM %}
|
|
{{ form.as_p() }}
|
|
<p><input type="submit" value="{% trans %}Save{% endtrans %}" /></p>
|
|
</form>
|
|
<hr>
|
|
|
|
{% if topic %}
|
|
{% for m in topic.messages.select_related('author__avatar_pict').order_by('-id')[:10] %}
|
|
{{ display_message(m, user) }}
|
|
{% endfor %}
|
|
{% endif %}
|
|
|
|
|
|
</div>
|
|
|
|
{% endblock %}
|