mirror of
https://gitlab.com/allianceauth/allianceauth.git
synced 2025-07-09 04:20:17 +02:00
[CHANGE] Only show theme selection if more than 1 theme is available
This commit is contained in:
parent
a650f0730e
commit
dd42c2b074
@ -50,6 +50,7 @@
|
||||
{% theme_select %}
|
||||
</a>
|
||||
</li>
|
||||
{% theme_select %}
|
||||
|
||||
{% if user.is_superuser %}
|
||||
<li><hr class="dropdown-divider"></li>
|
||||
|
@ -1,13 +1,21 @@
|
||||
{% load i18n %}
|
||||
|
||||
<form action="{% url 'theme' %}?next={{ next|urlencode }}" method="post">
|
||||
{% if themes|length > 1 %}
|
||||
<li><h6 class="dropdown-header">{% translate "Theme" %}</h6></li>
|
||||
|
||||
<li>
|
||||
<form class="dropdown-item" action="{% url 'theme' %}?next={{ next|urlencode }}" method="post">
|
||||
{% csrf_token %}
|
||||
|
||||
<select name="theme" class="form-select" aria-label="" onchange="this.form.submit()">
|
||||
<select name="theme" class="form-select" onchange="this.form.submit()">
|
||||
<option selected>{% translate "Select Theme" %}</option>
|
||||
|
||||
{% for theme in themes %}
|
||||
<option value="{{ theme.get_name }}"{% if selected_theme.name == theme.name %} selected="selected"{% endif %}>{{ theme.name }}</option>
|
||||
<option value="{{ theme.get_name }}"{% if selected_theme.name == theme.name %} selected="selected"{% endif %}>
|
||||
{{ theme.name }}
|
||||
</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</form>
|
||||
</form>
|
||||
</li>
|
||||
{% endif %}
|
||||
|
Loading…
x
Reference in New Issue
Block a user