catégorie actuelle affichée.

This commit is contained in:
Klafyvel 2018-01-24 12:00:01 +01:00
parent 21c1a5719b
commit 772cf3e5f6

View file

@ -16,11 +16,16 @@
<!-- Collect the nav links, forms, and other content for toggling --> <!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1"> <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav"> <ul class="nav navbar-nav">
<li class="active"><a href="#">Link <span class="sr-only">(current)</span></a></li> {% for c in categories %}
{% for category in categories %} {% if category.id == c.id %}
<li><a href="{% url 'content:category-list' category_id=category.id %}">{{category.name}}</a></li> <li class="active">
{%else%}
<li>
{%endif%}
<a href="{% url 'content:category-list' category_id=c.id %}">{{c.name}}
</a></li>
{% endfor %} {% endfor %}
<li><a href="">Vote</a></li> <li><a href="">Vote</a></li>
<li class="dropdown"> <li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Dropdown <span class="caret"></span></a> <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Dropdown <span class="caret"></span></a>
<ul class="dropdown-menu"> <ul class="dropdown-menu">