annotate templates/sat_website/menu.html @ 75:085280c48363

update decentralisation schemas after Simona's suggestions
author souliane <souliane@mailoo.org>
date Thu, 28 May 2015 01:48:17 +0200
parents 876ae5e23690
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
27
eda4deefecd1 reorganisation of the menu using submenus
souliane <souliane@mailoo.org>
parents:
diff changeset
1 {% comment %}
eda4deefecd1 reorganisation of the menu using submenus
souliane <souliane@mailoo.org>
parents:
diff changeset
2 SàT website: Salut à Toi's presentation website
eda4deefecd1 reorganisation of the menu using submenus
souliane <souliane@mailoo.org>
parents:
diff changeset
3 Copyright (C) 2012 Jérôme Poisson (goffi@goffi.org)
eda4deefecd1 reorganisation of the menu using submenus
souliane <souliane@mailoo.org>
parents:
diff changeset
4
eda4deefecd1 reorganisation of the menu using submenus
souliane <souliane@mailoo.org>
parents:
diff changeset
5 This file is part of SàT website.
eda4deefecd1 reorganisation of the menu using submenus
souliane <souliane@mailoo.org>
parents:
diff changeset
6
eda4deefecd1 reorganisation of the menu using submenus
souliane <souliane@mailoo.org>
parents:
diff changeset
7 SàT website is free software: you can redistribute it and/or modify
eda4deefecd1 reorganisation of the menu using submenus
souliane <souliane@mailoo.org>
parents:
diff changeset
8 it under the terms of the GNU Affero General Public License as published by
eda4deefecd1 reorganisation of the menu using submenus
souliane <souliane@mailoo.org>
parents:
diff changeset
9 the Free Software Foundation, either version 3 of the License, or
eda4deefecd1 reorganisation of the menu using submenus
souliane <souliane@mailoo.org>
parents:
diff changeset
10 (at your option) any later version.
eda4deefecd1 reorganisation of the menu using submenus
souliane <souliane@mailoo.org>
parents:
diff changeset
11
eda4deefecd1 reorganisation of the menu using submenus
souliane <souliane@mailoo.org>
parents:
diff changeset
12 Foobar is distributed in the hope that it will be useful,
eda4deefecd1 reorganisation of the menu using submenus
souliane <souliane@mailoo.org>
parents:
diff changeset
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
eda4deefecd1 reorganisation of the menu using submenus
souliane <souliane@mailoo.org>
parents:
diff changeset
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
eda4deefecd1 reorganisation of the menu using submenus
souliane <souliane@mailoo.org>
parents:
diff changeset
15 GNU Affero General Public License for more details.
eda4deefecd1 reorganisation of the menu using submenus
souliane <souliane@mailoo.org>
parents:
diff changeset
16
eda4deefecd1 reorganisation of the menu using submenus
souliane <souliane@mailoo.org>
parents:
diff changeset
17 You should have received a copy of the GNU Affero General Public License
eda4deefecd1 reorganisation of the menu using submenus
souliane <souliane@mailoo.org>
parents:
diff changeset
18 along with Foobar. If not, see <http://www.gnu.org/licenses/>.
eda4deefecd1 reorganisation of the menu using submenus
souliane <souliane@mailoo.org>
parents:
diff changeset
19 {% endcomment %}
eda4deefecd1 reorganisation of the menu using submenus
souliane <souliane@mailoo.org>
parents:
diff changeset
20
28
30a1edf90fae move the language selector to the main menu
souliane <souliane@mailoo.org>
parents: 27
diff changeset
21 {% load i18n %}
27
eda4deefecd1 reorganisation of the menu using submenus
souliane <souliane@mailoo.org>
parents:
diff changeset
22 {% load utils %}
eda4deefecd1 reorganisation of the menu using submenus
souliane <souliane@mailoo.org>
parents:
diff changeset
23
eda4deefecd1 reorganisation of the menu using submenus
souliane <souliane@mailoo.org>
parents:
diff changeset
24 <ul class="{{ style }}">
eda4deefecd1 reorganisation of the menu using submenus
souliane <souliane@mailoo.org>
parents:
diff changeset
25 {% for cat_url, item in categories.items %}
eda4deefecd1 reorganisation of the menu using submenus
souliane <souliane@mailoo.org>
parents:
diff changeset
26 {% if item|is_tuple %}
eda4deefecd1 reorganisation of the menu using submenus
souliane <souliane@mailoo.org>
parents:
diff changeset
27 <li class="dropdown">
eda4deefecd1 reorganisation of the menu using submenus
souliane <souliane@mailoo.org>
parents:
diff changeset
28 <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
eda4deefecd1 reorganisation of the menu using submenus
souliane <souliane@mailoo.org>
parents:
diff changeset
29 {{ item.0 }}
eda4deefecd1 reorganisation of the menu using submenus
souliane <souliane@mailoo.org>
parents:
diff changeset
30 <span class="caret"></span>
eda4deefecd1 reorganisation of the menu using submenus
souliane <souliane@mailoo.org>
parents:
diff changeset
31 </a>
eda4deefecd1 reorganisation of the menu using submenus
souliane <souliane@mailoo.org>
parents:
diff changeset
32 <ul class="dropdown-menu" role="menu">
eda4deefecd1 reorganisation of the menu using submenus
souliane <souliane@mailoo.org>
parents:
diff changeset
33 {% for subcat_url, cat_name in item.1.items %}
eda4deefecd1 reorganisation of the menu using submenus
souliane <souliane@mailoo.org>
parents:
diff changeset
34 <li><a href="{{ subcat_url }}.html">{{ cat_name }}</a></li>
eda4deefecd1 reorganisation of the menu using submenus
souliane <souliane@mailoo.org>
parents:
diff changeset
35 {% endfor %}
eda4deefecd1 reorganisation of the menu using submenus
souliane <souliane@mailoo.org>
parents:
diff changeset
36 </ul>
eda4deefecd1 reorganisation of the menu using submenus
souliane <souliane@mailoo.org>
parents:
diff changeset
37 </li>
eda4deefecd1 reorganisation of the menu using submenus
souliane <souliane@mailoo.org>
parents:
diff changeset
38 {% else %}
eda4deefecd1 reorganisation of the menu using submenus
souliane <souliane@mailoo.org>
parents:
diff changeset
39 <li><a href="{{ cat_url }}.html"><strong>{{ item }}</strong></a></li>
eda4deefecd1 reorganisation of the menu using submenus
souliane <souliane@mailoo.org>
parents:
diff changeset
40 {% endif %}
eda4deefecd1 reorganisation of the menu using submenus
souliane <souliane@mailoo.org>
parents:
diff changeset
41 {% endfor %}
28
30a1edf90fae move the language selector to the main menu
souliane <souliane@mailoo.org>
parents: 27
diff changeset
42 {% if language_select %}
30a1edf90fae move the language selector to the main menu
souliane <souliane@mailoo.org>
parents: 27
diff changeset
43 <li>
30a1edf90fae move the language selector to the main menu
souliane <souliane@mailoo.org>
parents: 27
diff changeset
44 <form id="language_form" class="form-inline" action="{% url 'set_language' %}" method="post">
30a1edf90fae move the language selector to the main menu
souliane <souliane@mailoo.org>
parents: 27
diff changeset
45 {% csrf_token %}
30a1edf90fae move the language selector to the main menu
souliane <souliane@mailoo.org>
parents: 27
diff changeset
46 <input name="next" type="hidden" value="{{ redirect_to }}" />
30a1edf90fae move the language selector to the main menu
souliane <souliane@mailoo.org>
parents: 27
diff changeset
47 <select id="language_select" name="language">
30a1edf90fae move the language selector to the main menu
souliane <souliane@mailoo.org>
parents: 27
diff changeset
48 {% get_language_info_list for available_languages as languages %}
30a1edf90fae move the language selector to the main menu
souliane <souliane@mailoo.org>
parents: 27
diff changeset
49 {% for language in languages %}
32
876ae5e23690 language selector doesn't display the language code and put the first letter un uppercase (even in French, normally no upper case but here it's the first word of a word group)
souliane <souliane@mailoo.org>
parents: 28
diff changeset
50 <option value="{{ language.code }}"{% if language.code == LANGUAGE_CODE %} selected="selected"{% endif %}>{{ language.name_local|title }}</option>
28
30a1edf90fae move the language selector to the main menu
souliane <souliane@mailoo.org>
parents: 27
diff changeset
51 {% endfor %}
30a1edf90fae move the language selector to the main menu
souliane <souliane@mailoo.org>
parents: 27
diff changeset
52 </select>
30a1edf90fae move the language selector to the main menu
souliane <souliane@mailoo.org>
parents: 27
diff changeset
53 </form>
30a1edf90fae move the language selector to the main menu
souliane <souliane@mailoo.org>
parents: 27
diff changeset
54 </li>
30a1edf90fae move the language selector to the main menu
souliane <souliane@mailoo.org>
parents: 27
diff changeset
55 {% endif %}
27
eda4deefecd1 reorganisation of the menu using submenus
souliane <souliane@mailoo.org>
parents:
diff changeset
56 </ul>