view default/forum/overview.html @ 122:9d95b58200df

file: files handling first draft: file/overview.html generate a simple files/directories listing
author Goffi <goffi@goffi.org>
date Sun, 11 Mar 2018 19:21:46 +0100
parents b085ede4d9af
children efbf5423d7be
line wrap: on
line source

{% extends 'base/base.html' %}

{% macro generate_forums(forums_data) %}
    <ul class="forum">
    {% for forum in forums_data %}
        <li>
            {% if 'http_url' in forum %}
                <a href="{{forum['http_url']}}" class="forum_actif">
            {% else %}
                <a>
            {% endif %}
                <span class="forum_title">{{ forum.title }}</span>
                {% if 'short-desc' in forum %}
                    <p class="forum_short-desc">{{ forum['short-desc'] }}</p>
                {% endif %}
            </a>

            {% if 'sub-forums' in forum %}
                {{ generate_forums(forum['sub-forums']) }}
            {% endif %}
        </li>
    {% endfor %}
    </ul>
{% endmacro %}

{% block body %}
<div id="forums">
    {{ generate_forums(forums) }}
</div>
{% endblock body %}