Don't show tags list if user doesn't have any.

master
Nick Sergeant 2013-02-04 22:01:29 -05:00
parent 31fc156dbf
commit f5bc4c66be
1 changed files with 10 additions and 8 deletions

View File

@ -2,12 +2,14 @@
{% if request.user == user %}
<a href="/{{ user }}/favorites/" class="favorited-snipts {% if 'favorites' in request.path %}active{% endif %}"><span>View favorited snipts &raquo;</span></a>
{% endif %}
<h1>{{ user.username }}'s tags</h1>
<ul>
{% for t in tags %}
<li>
<a {% if tag.name == t.name %}class="active"{% endif %} href="/{{ user.username }}/tag/{{ t.slug }}/"><span>{{ t.name }}</span></a>
</li>
{% endfor %}
</ul>
{% if tags %}
<h1>{{ user.username }}'s tags</h1>
<ul>
{% for t in tags %}
<li>
<a {% if tag.name == t.name %}class="active"{% endif %} href="/{{ user.username }}/tag/{{ t.slug }}/"><span>{{ t.name }}</span></a>
</li>
{% endfor %}
</ul>
{% endif %}
</section>