comparison templates/sat_website/menu.html @ 27:eda4deefecd1

reorganisation of the menu using submenus
author souliane <souliane@mailoo.org>
date Wed, 21 Jan 2015 20:07:20 +0100
parents
children 30a1edf90fae
comparison
equal deleted inserted replaced
26:3df49721008c 27:eda4deefecd1
1 {% comment %}
2 SàT website: Salut à Toi's presentation website
3 Copyright (C) 2012 Jérôme Poisson (goffi@goffi.org)
4
5 This file is part of SàT website.
6
7 SàT website is free software: you can redistribute it and/or modify
8 it under the terms of the GNU Affero General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
11
12 Foobar is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU Affero General Public License for more details.
16
17 You should have received a copy of the GNU Affero General Public License
18 along with Foobar. If not, see <http://www.gnu.org/licenses/>.
19 {% endcomment %}
20
21 {% load utils %}
22
23 <ul class="{{ style }}">
24 {% for cat_url, item in categories.items %}
25 {% if item|is_tuple %}
26 <li class="dropdown">
27 <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
28 {{ item.0 }}
29 <span class="caret"></span>
30 </a>
31 <ul class="dropdown-menu" role="menu">
32 {% for subcat_url, cat_name in item.1.items %}
33 <li><a href="{{ subcat_url }}.html">{{ cat_name }}</a></li>
34 {% endfor %}
35 </ul>
36 </li>
37 {% else %}
38 <li><a href="{{ cat_url }}.html"><strong>{{ item }}</strong></a></li>
39 {% endif %}
40 {% endfor %}
41 </ul>