Added statistics button + fixed stats page buttons highlight

This commit is contained in:
Vadim Melnikov
2021-04-16 16:14:37 +03:00
parent afec8e59e4
commit 2ec95dcb00
3 changed files with 17 additions and 10 deletions

View File

@@ -15,21 +15,27 @@
{% else %}
class="btn btn-secondary"
{% endif %}
href="{% url 'profile' %}">Профиль</a>
href="{% url 'profile' %}">Профиль</a>
{% if perms.main.has_control_access %}
<a {% if control_lit %}
class="btn btn-primary"
{% else %}
class="btn btn-secondary"
{% endif %}
href="{% url 'control' %}">Управление</a>
href="{% url 'control' %}">Управление</a>
<a {% if stats_lit %}
class="btn btn-primary"
{% else %}
class="btn btn-secondary"
{% endif %}
href="{% url 'statistic' %}">Статистика</a>
{% else %}
<a {% if work_lit %}
class="btn btn-primary"
{% else %}
class="btn btn-secondary"
{% endif %}
href="{% url 'work' request.user.id %}">Запрос прав</a>
href="{% url 'work' request.user.id %}">Запрос прав</a>
{% endif %}
<a class="btn btn-secondary" href="{% url 'logout' %}">Выйти</a>
</div>
@@ -40,13 +46,13 @@
{% else %}
class="btn btn-secondary"
{% endif %}
href="/accounts/login">Войти</a>
href="/accounts/login">Войти</a>
<a {% if registration_lit %}
class="btn btn-primary"
{% else %}
class="btn btn-secondary"
{% endif %}
href="/accounts/register">Зарегистрироваться</a>
href="/accounts/register">Зарегистрироваться</a>
</div>
{% endif %}
</nav>