Mercurial > sat_legacy_website
comparison templates/sat_website/base.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 | b45621706d83 |
comparison
equal
deleted
inserted
replaced
27:eda4deefecd1 | 28:30a1edf90fae |
---|---|
48 Salut à Toi | 48 Salut à Toi |
49 </a> | 49 </a> |
50 </div> | 50 </div> |
51 <div id="navbar" class="collapse navbar-collapse"> | 51 <div id="navbar" class="collapse navbar-collapse"> |
52 {% include "sat_website/menu.html" with style="nav navbar-nav" categories=categories %} | 52 {% include "sat_website/menu.html" with style="nav navbar-nav" categories=categories %} |
53 {% include "sat_website/menu.html" with style="nav navbar-nav pull-right" categories=categories_right %} | 53 {% include "sat_website/menu.html" with style="nav navbar-nav pull-right" categories=categories_right language_select=True %} |
54 </div> | 54 </div> |
55 </div> | 55 </div> |
56 </nav> | 56 </nav> |
57 | 57 |
58 {% block content %}{% endblock %} | 58 {% block content %}{% endblock %} |
59 | |
60 <div class="container"> | |
61 <div class="row" id="language"> | |
62 <form class="well form-inline" action="{% url 'set_language' %}" method="post"> | |
63 {% csrf_token %} | |
64 <input name="next" type="hidden" value="{{ redirect_to }}" /> | |
65 <select name="language"> | |
66 {% get_language_info_list for available_languages as languages %} | |
67 {% for language in languages %} | |
68 <option value="{{ language.code }}"{% if language.code == LANGUAGE_CODE %} selected="selected"{% endif %}>{{ language.name_local }} ({{ language.code }})</option> | |
69 {% endfor %} | |
70 </select> | |
71 <input type="submit" value="{% trans "Change language" %}" /> | |
72 </form> | |
73 </div> | |
74 </div> | |
75 <script src="{% static "js/jquery.min.js" %}"></script> | 59 <script src="{% static "js/jquery.min.js" %}"></script> |
76 <script src="{% static "bootstrap/js/bootstrap.min.js" %}"></script> | 60 <script src="{% static "bootstrap/js/bootstrap.min.js" %}"></script> |
61 <script type="text/javascript"> | |
62 $(document).ready(function() { | |
63 $('#language_select').change(function() { | |
64 $('#language_form').submit(); | |
65 }); | |
66 }); | |
67 </script> | |
77 </body> | 68 </body> |
78 </html> | 69 </html> |