~netlandish/django-wiki

a7bbf186d41bd2f89d97b22773eae397e8d1f2b1 — tschmidt-dev 11 years ago 5eda878
added Django 1.5 url syntax to macros plugin; added condition to avoid generating empty lists for each child in article_list macro
M wiki/plugins/macros/templates/wiki/plugins/macros/article_list.html => wiki/plugins/macros/templates/wiki/plugins/macros/article_list.html +1 -0
@@ 1,4 1,5 @@
{% load wiki_macro_tags %}

{% if article_children %}
    <div class="well wiki-article-list">
        <h3>Articles</h3>

M wiki/plugins/macros/templates/wiki/plugins/templatetags/article_list.html => wiki/plugins/macros/templates/wiki/plugins/templatetags/article_list.html +14 -10
@@ 1,11 1,15 @@
{% load wiki_macro_tags %}
<p><a href="{% url wiki:get path=urlpath.path %}">{{ urlpath.article }}</a></p>
<div class="wiki-article-sublist"> 
    <ul>
        <li>
            {% for urlpath in urlpath.children.all %}
                {% article_list urlpath %}
            {% endfor %}
        </li>
    </ul>
</div>
{% load url from future %}

<p><a href="{% url 'wiki:get' path=urlpath.path %}">{{ urlpath.article }}</a></p>
{% if urlpath.children.count %}
    <div class="wiki-article-sublist"> 
        <ul>
            <li>
                {% for urlpath in urlpath.children.all %}
                    {% article_list urlpath %}
                {% endfor %}
            </li>
        </ul>
    </div>
{% endif %}