Mercurial > sat_legacy_website
comparison templates/sat_website/menu.html @ 28:30a1edf90fae
move the language selector to the main menu
author | souliane <souliane@mailoo.org> |
---|---|
date | Wed, 21 Jan 2015 20:08:26 +0100 |
parents | eda4deefecd1 |
children | 876ae5e23690 |
comparison
equal
deleted
inserted
replaced
27:eda4deefecd1 | 28:30a1edf90fae |
---|---|
16 | 16 |
17 You should have received a copy of the GNU Affero General Public License | 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/>. | 18 along with Foobar. If not, see <http://www.gnu.org/licenses/>. |
19 {% endcomment %} | 19 {% endcomment %} |
20 | 20 |
21 {% load i18n %} | |
21 {% load utils %} | 22 {% load utils %} |
22 | 23 |
23 <ul class="{{ style }}"> | 24 <ul class="{{ style }}"> |
24 {% for cat_url, item in categories.items %} | 25 {% for cat_url, item in categories.items %} |
25 {% if item|is_tuple %} | 26 {% if item|is_tuple %} |
36 </li> | 37 </li> |
37 {% else %} | 38 {% else %} |
38 <li><a href="{{ cat_url }}.html"><strong>{{ item }}</strong></a></li> | 39 <li><a href="{{ cat_url }}.html"><strong>{{ item }}</strong></a></li> |
39 {% endif %} | 40 {% endif %} |
40 {% endfor %} | 41 {% endfor %} |
42 {% if language_select %} | |
43 <li> | |
44 <form id="language_form" class="form-inline" action="{% url 'set_language' %}" method="post"> | |
45 {% csrf_token %} | |
46 <input name="next" type="hidden" value="{{ redirect_to }}" /> | |
47 <select id="language_select" name="language"> | |
48 {% get_language_info_list for available_languages as languages %} | |
49 {% for language in languages %} | |
50 <option value="{{ language.code }}"{% if language.code == LANGUAGE_CODE %} selected="selected"{% endif %}>{{ language.name_local }} ({{ language.code }})</option> | |
51 {% endfor %} | |
52 </select> | |
53 </form> | |
54 </li> | |
55 {% endif %} | |
41 </ul> | 56 </ul> |