<ul class="nav navbar-nav">
{% for d in topmenu_items %}
{% if d.dropdown %}
- <li class="dropdown">
+ {% if d.is_active %} <li class='active'> {% else %} <li class='other'> {% endif %}
<a class="dropdown-toggle" data-toggle="dropdown" href="{{ d.href }}">{{ d.label }}<b class="caret"></b></a>
<ul class="dropdown-menu">
{% for dd in d.contents %}
- {% if dd.is_active %}<li class='active'>{% else %}<li class='other'>{% endif %}
- <a class="dropdown-toggle" href="{{ dd.href }}"> {{ dd.label }} </a> </li>
+ <li class='{% if dd.is_active %}active{% else %}other{% endif %}{% if dd.disabled %} disabled{%endif%}'
+ {% if dd.domid %} id='{{dd.domid}}'{% endif %}>
+ <a href="{{ dd.href }}"> {{ dd.label }} </a> </li>
{% endfor %}
</ul>
</li>
{% else %}
- {% if d.is_active %} <li class='active'> {% else %} <li class='other'> {% endif %}
+ <li class='{% if d.is_active %}active{% else %}other{% endif %}{% if d.disabled %} disabled{%endif%}'
+ {% if d.domid %} id='{{d.domid}}'{% endif %}>
<a href="{{ d.href }}"> {{ d.label }} </a> </li>
{% endif %}
{% endfor %}
</ul> {# logout.js will attach a click function on that button, which then retrieves the 'username' attribute #}
<ul class="nav navbar-nav pull-right logged-in">
- <li> {% if username %}
+ <li class='username'> {% if username %}
Logged in as {{ username }}
- <button id='logout' class='btn btn-danger logged-in' username='{{ username }}'>Logout</button> {% else %}
+ <button id='logout' class='btn btn-xs btn-danger logged-in' username='{{ username }}'>Logout</button> {% else %}
Not logged in{% endif %}
</li>
</ul>