mirror of
https://github.com/mailcow/mailcow-dockerized.git
synced 2024-12-21 01:49:22 +02:00
[Web] Do not show Apps dropdown, when there is only single item
Signed-off-by: Kristian Feldsam <feldsam@gmail.com>
This commit is contained in:
parent
f9a7712025
commit
22e757ac36
@ -89,24 +89,33 @@
|
||||
</ul>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if mailcow_apps or app_links %}
|
||||
<li class="nav-item dropdown">
|
||||
<a href="#" class="nav-link dropdown-toggle" data-bs-toggle="dropdown" role="button" aria-expanded="false"><i class="bi bi-link-45deg me-2"></i> {{ ui_texts.apps_name|raw }}</a>
|
||||
<ul class="dropdown-menu">
|
||||
{% for app in mailcow_apps %}
|
||||
{% if not skip_sogo or not is_uri('SOGo', app.link) %}
|
||||
<li {% if app.description %}title="{{ app.description }}"{% endif %}>
|
||||
<a href="{{ app.link }}" class="dropdown-item">{{ app.name }}</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% for row in app_links %}
|
||||
{% for key, val in row %}
|
||||
<li><a href="{{ val }}" class="dropdown-item">{{ key }}</a></li>
|
||||
{% if mailcow_apps|length == 1 and not app_links %}
|
||||
{% set app = mailcow_apps[0] %}
|
||||
{% if not skip_sogo or not is_uri('SOGo', app.link) %}
|
||||
<li class="nav-item"{% if app.description %} title="{{ app.description }}"{% endif %}>
|
||||
<a href="{{ app.link }}" class="nav-link">{{ app.name }}</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{% if mailcow_apps or app_links %}
|
||||
<li class="nav-item dropdown">
|
||||
<a href="#" class="nav-link dropdown-toggle" data-bs-toggle="dropdown" role="button" aria-expanded="false"><i class="bi bi-link-45deg me-2"></i> {{ ui_texts.apps_name|raw }}</a>
|
||||
<ul class="dropdown-menu">
|
||||
{% for app in mailcow_apps %}
|
||||
{% if not skip_sogo or not is_uri('SOGo', app.link) %}
|
||||
<li {% if app.description %}title="{{ app.description }}"{% endif %}>
|
||||
<a href="{{ app.link }}" class="dropdown-item">{{ app.name }}</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</li>
|
||||
{% for row in app_links %}
|
||||
{% for key, val in row %}
|
||||
<li><a href="{{ val }}" class="dropdown-item">{{ key }}</a></li>
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% if not dual_login and mailcow_cc_username %}
|
||||
<li class="logged-in-as nav-item"><a href="#" onclick="logout.submit()" class="nav-link"><b class="username-lia">{{ mailcow_cc_username }}</b> <i class="bi bi-power ms-2"></i></a></li>
|
||||
|
Loading…
Reference in New Issue
Block a user