Wrap iterations in if statements to prevent emptyresultset from being thrown

This commit is contained in:
Paul Osman 2010-12-23 16:45:51 -05:00
Родитель 393de9c5d7
Коммит 0a053f20a8
1 изменённых файлов: 8 добавлений и 0 удалений

Просмотреть файл

@ -18,6 +18,7 @@
{% block body %} {% block body %}
<h1>{{ _('Browse <b>Projects</b>') }}</h1> <h1>{{ _('Browse <b>Projects</b>') }}</h1>
{% if featured %}
<section> <section>
<h1><span>{{_('Featured')}}</span></h1> <h1><span>{{_('Featured')}}</span></h1>
<ul class="project-list"> <ul class="project-list">
@ -26,6 +27,9 @@
{% endfor %} {% endfor %}
</ul> </ul>
</section> </section>
{% endif %}
{% if active %}
<section> <section>
<h1><span>{{ _('Popular Projects') }}</span></h1> <h1><span>{{ _('Popular Projects') }}</span></h1>
<ul class="project-list"> <ul class="project-list">
@ -34,6 +38,9 @@
{% endfor %} {% endfor %}
</ul> </ul>
</section> </section>
{% endif %}
{% if new %}
<section> <section>
<h1><span>{{ _('New Projects') }}</span></h1> <h1><span>{{ _('New Projects') }}</span></h1>
<ul class="project-list"> <ul class="project-list">
@ -42,4 +49,5 @@
{% endfor %} {% endfor %}
</ul> </ul>
</section> </section>
{% endif %}
{% endblock %} {% endblock %}