]> git.parisson.com Git - telemeta.git/commitdiff
auto select language
authorGuillaume Pellerin <guillaume.pellerin@ircam.fr>
Tue, 31 May 2016 15:06:22 +0000 (17:06 +0200)
committerGuillaume Pellerin <guillaume.pellerin@ircam.fr>
Tue, 31 May 2016 15:06:22 +0000 (17:06 +0200)
app/scripts/app.sh
telemeta/locale
telemeta/templates/telemeta/base.html

index 4636b6cbea40c71a9c1a6f99896d9b244f827ff8..46b9b008253c20b786e926ec0133c2b1dc2d0db3 100644 (file)
@@ -39,7 +39,7 @@ if [ $REINDEX = "True" ]; then
 fi
 
 # fix media access rights
-chown -R www-data:www-data $media
+chown www-data:www-data $media
 for dir in $(ls $media); do
     if [ ! $(stat -c %U $media/$dir) = 'www-data' ]; then
         chown www-data:www-data $media/$dir
index e7fd56599e9e22eddf92c1063419fec6ab82e15e..ea6605ad78243d798d88f1ffc46c8f6bc507ce11 160000 (submodule)
@@ -1 +1 @@
-Subproject commit e7fd56599e9e22eddf92c1063419fec6ab82e15e
+Subproject commit ea6605ad78243d798d88f1ffc46c8f6bc507ce11
index c9a557f8e556fd81c94562c7ec7dcdf2945bf945..a27e05c509992d64de9a6cb5c3bde1f348c76019 100644 (file)
                                 </li>
                             {% endif %}
                         </ul>
-                        <form id="formlang" action="/i18n/setlang/" method="post" style="display:inline-block;">
+                        <form id="formlang" action="/i18n/setlang/" method="post" style="display:inline-block;" onchange='this.submit();'>
                             {% 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>
+                                    <option value="{{ lang.0 }}" {% if lang.0|slice:"2" == LANGUAGE_CODE|slice:"2" %}selected="selected"{% endif %}>{{ lang.0 }}</option>
                                 {% endfor %}
                             </select>
-                            <input type="submit" value="Ok"/>
                         </form>
-
                     {% endblock menu %}
                 </div>
             </div>