Skip to content

Commit

Permalink
Merge pull request #53 from Gray-Advantage/vladimir
Browse files Browse the repository at this point in the history
Изменена форма выбра языка
  • Loading branch information
Gray-Advantage authored Nov 3, 2024
2 parents c134d76 + f10e72e commit 0e8c2bf
Show file tree
Hide file tree
Showing 10 changed files with 42 additions and 36 deletions.
2 changes: 1 addition & 1 deletion datanar/datanar/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

BASE_DIR = Path(__file__).resolve().parent.parent

VERSION = "2.5.1"
VERSION = "2.5.2"
API_VERSION = "1.2.0"

SECRET_KEY = config(
Expand Down
6 changes: 3 additions & 3 deletions datanar/static_dev/css/bootstrap-icons.min.css

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions datanar/static_dev/css/bootstrap.min.css

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion datanar/static_dev/css/bootstrap.min.css.map

This file was deleted.

Binary file modified datanar/static_dev/css/fonts/bootstrap-icons.woff
Binary file not shown.
Binary file modified datanar/static_dev/css/fonts/bootstrap-icons.woff2
Binary file not shown.
6 changes: 3 additions & 3 deletions datanar/static_dev/js/bootstrap.bundle.min.js

Large diffs are not rendered by default.

33 changes: 20 additions & 13 deletions datanar/templates/includes/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,20 +35,27 @@
</li>
</ul>
</nav>
<form action="{% url 'set_language' %}" method="post" class="form-inline d-flex me-2">
{% csrf_token %}
<div class="form-group mt-auto mb-auto">
<select name="language" class="form-select" onchange="this.form.submit()" id="language">
{% get_current_language as LANGUAGE_CODE %}
{% get_available_languages as LANGUAGES %}
{% for lang_code, lang_name in LANGUAGES %}
<option value="{{ lang_code }}" {% if lang_code == LANGUAGE_CODE %}selected{% endif %}>
<nav class="my-auto nav-item dropdown me-2">
<button class="btn border-0 dropdown-toggle d-flex align-items-center" id="language-dropdown" type="button" aria-expanded="false" data-bs-toggle="dropdown" data-bs-display="static" aria-label="Toggle language">
<i class="bi bi-globe me-2"></i>
<span class="d-none d-lg-block" id="language-text">{% get_current_language as LANGUAGE_CODE %}{{ LANGUAGE_CODE|language_name_translated }}</span>
</button>
<ul class="dropdown-menu dropend" aria-labelledby="language-text" data-bs-popper="static">
{% get_available_languages as LANGUAGES %}
{% for lang_code, lang_name in LANGUAGES %}
<li>
<form action="{% url 'set_language' %}" method="post" class="d-inline">
{% csrf_token %}
<input type="hidden" name="language" value="{{ lang_code }}">
<button type="submit" class="dropdown-item d-flex align-items-center {% if lang_code == LANGUAGE_CODE %}active{% endif %}" aria-pressed="{% if lang_code == LANGUAGE_CODE %}true{% else %}false{% endif %}">
<i class="bi bi-globe me-2"></i>
{{ lang_name }}
</option>
{% endfor %}
</select>
</div>
</form>
</button>
</form>
</li>
{% endfor %}
</ul>
</nav>
{% if request.resolver_match.view_name == 'users:profile' or request.resolver_match.app_name != 'users' %}
{% if request.user.is_authenticated %}
{% trans "no_user" as no_user %}
Expand Down
20 changes: 10 additions & 10 deletions requirements/prod.txt
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
celery==5.0.0
Django==4.2.14
django-allauth==0.63.3
django-cleanup==8.1.0
Django==4.2.16
django-allauth==65.1.0
django-cleanup==9.0.0
django-settings-export==1.2.1
django-tz-detect==0.5.0
django-user-agents==0.4.0
djangorestframework==3.15.2
geoip2==4.8.0
gunicorn==22.0.0
gunicorn==23.0.0
link-shorteners>=1.12.0
openpyxl==3.1.3
pillow==10.3.0
psycopg2-binary==2.9.9
openpyxl==3.1.5
pillow==10.4.0
psycopg2-binary==2.9.10
python-decouple==3.8
redis==5.0.6
redis==5.2.0
segno==1.6.1
sorl-thumbnail==12.10.0
sqids==0.4.1
sorl-thumbnail==12.11.0
sqids==0.5.0
Unidecode==1.3.8
4 changes: 2 additions & 2 deletions requirements/test.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
black==24.4.2
django-debug-toolbar==4.4.2
black==24.10.0
django-debug-toolbar==4.4.6
flake8-absolute-import==1.0.0.2
flake8-commas==4.0.0
flake8-comments==0.1.2
Expand Down

0 comments on commit 0e8c2bf

Please sign in to comment.