Don't show tags list if user doesn't have any.
parent
31fc156dbf
commit
f5bc4c66be
|
@ -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 »</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>
|
||||
|
|
Loading…
Reference in New Issue