]> git.parisson.com Git - telemeta.git/commitdiff
Ajout choix de la langue dans la barre de connexion
authorMathieu <mathieu.boye28@gmail.com>
Wed, 30 Mar 2016 21:28:25 +0000 (23:28 +0200)
committerMathieu <mathieu.boye28@gmail.com>
Wed, 30 Mar 2016 21:28:25 +0000 (23:28 +0200)
telemeta/templates/telemeta/base.html

index 69397cc328af495e36687feaea4bfa6e9e015e86..a216cc3eea245632ff346be7119b38490be9350c 100644 (file)
   {{ user.username }}
 {% endif %}
 <a href="{% url "telemeta-flatpage" "help" %}">{% trans "Help" %}</a> |
-<a href="{% url "telemeta-logout" %}">{% trans "Sign out" %}
+<a href="{% url "telemeta-logout" %}">{% trans "Sign out" %} |
 <img src="{{ STATIC_URL }}telemeta/images/logout.png" alt="logout" style="vertical-align:middle" /></a>
 {% else %}
 <a href="{% url "telemeta-flatpage" "help" %}">{% trans "Help" %}</a> |
-<a href="{% url "telemeta-login" %}">{% trans "Sign in" %}</a>
+<a href="{% url "telemeta-login" %}">{% trans "Sign in" %}</a> |
 {% endif %}
+<form action="/i18n/setlang/" method="post" style="display:inline-block;">
+
+    {% csrf_token %}
+
+    <input name="next" type="hidden" value="{% url 'telemeta-home' %}" />
+
+    <select name="language" style="color:#6a0307">
+
+    {% for lang in LANGUAGES %}
+
+        <option value="{{ lang.0 }}">{{ lang.1 }}</option>
+
+    {% endfor %}
+
+    </select>
+
+
+    <input type="submit" value="Ok" />
+
+</form>
+
 </div>
 
 {% block search %}