mirror of
https://github.com/ae-utbm/sith.git
synced 2024-11-29 12:34:21 +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
59 lines
1.5 KiB
Django/Jinja
59 lines
1.5 KiB
Django/Jinja
{% extends "core/base.jinja" %}
|
|
{% from 'core/macros.jinja' import user_profile_link %}
|
|
{% from 'forum/macros.jinja' import display_forum, display_search_bar %}
|
|
|
|
{% block title %}
|
|
{% trans %}Forum{% endtrans %}
|
|
{% endblock %}
|
|
|
|
{% block additional_css %}
|
|
<link rel="stylesheet" href="{{ static('forum/css/forum.scss') }}">
|
|
{% endblock %}
|
|
|
|
{% block content %}
|
|
<p>
|
|
<a href="{{ url('forum:main') }}">{% trans %}Forum{% endtrans %}</a> >
|
|
</p>
|
|
<div id="forum">
|
|
<h3>{% trans %}Forum{% endtrans %}</h3>
|
|
<p>
|
|
<a class="ib button" href="{{ url('forum:last_unread') }}">{% trans %}View last unread messages{% endtrans %}</a>
|
|
<a class="ib button" href="{{ url('forum:favorite_topics') }}">{% trans %}Favorite topics{% endtrans %}</a>
|
|
{{ display_search_bar(request) }}
|
|
</p>
|
|
{% if
|
|
user.is_com_admin
|
|
or user.is_in_group(pk=settings.SITH_GROUP_FORUM_ADMIN_ID)
|
|
%}
|
|
<p>
|
|
<a href="{{ url('forum:new_forum') }}">{% trans %}New forum{% endtrans %}</a>
|
|
</p>
|
|
{% endif %}
|
|
<div>
|
|
<div class="ib w_big">
|
|
{% trans %}Title{% endtrans %}
|
|
</div>
|
|
<div class="ib w_small">
|
|
<div class="ib w_medium">
|
|
{% trans %}Topics{% endtrans %}
|
|
</div>
|
|
<div class="ib w_small">
|
|
{% trans %}Last message{% endtrans %}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
{% for f in forum_list %}
|
|
<div>
|
|
{{ display_forum(f, user, True) }}
|
|
{% for c in f.children.all() %}
|
|
{{ display_forum(c, user) }}
|
|
{% endfor %}
|
|
</div>
|
|
{% endfor %}
|
|
</div>
|
|
{% endblock %}
|
|
|
|
|
|
|