NobGit
public nobgit read

NobMail

Based on mailcow: dockerized

Languages

Repository composition by tracked source files.

PHP
PHP 49% JavaScript 35% HTML 9% CSS 4% Shell 2% Python 1% Lua 0% Perl 0% Ruby 0% SCSS 0%
Create file Wiki Documentation
Clone
https://nobgit.com/orgs/nobgit/nobmail.git
ssh://[email protected]:2222/orgs/nobgit/nobmail.git

Commit

[Web] show "apps" only if there are any

Signed-off-by: Kristian Feldsam <[email protected]>

7e270868
Kristian Feldsam <[email protected]> 4 years, 9 months ago
data/web/templates/base.twig  | 2 ++
 data/web/templates/index.twig | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)

Diff

diff --git a/data/web/templates/base.twig b/data/web/templates/base.twig
index 4243f6ac..79042d59 100644
--- a/data/web/templates/base.twig
+++ b/data/web/templates/base.twig
@@ -65,6 +65,7 @@
         {% if mailcow_cc_role == 'admin' and not skip_sogo %}
         <li><a href data-toggle="modal" data-container="sogo-mailcow" data-target="#RestartContainer"><i class="bi bi-arrow-repeat"></i> {{ lang.header.restart_sogo }}</a></li>
         {% endif %}
+        {% if mailcow_apps or app_links %}
         <li class="dropdown">
           <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false"><i class="bi bi-link-45deg"></i> {{ ui_texts.apps_name|raw }} <span class="caret"></span></a>
           <ul class="dropdown-menu" role="menu">
@@ -82,6 +83,7 @@
             {% endfor %}
           </ul>
         </li>
+        {% endif %}
         {% if not dual_login and mailcow_cc_username %}
         <li class="logged-in-as"><a href="#" onclick="logout.submit()"><b class="username-lia">{{ mailcow_cc_username }}</b> <i class="bi bi-power"></i></a></li>
         {% elseif dual_login %}
diff --git a/data/web/templates/index.twig b/data/web/templates/index.twig
index 0f2abe12..056421fe 100644
--- a/data/web/templates/index.twig
+++ b/data/web/templates/index.twig
@@ -64,7 +64,7 @@
         <p><div class="alert alert-info">{{ lang.login.delayed|format(login_delay) }}</b></div></p>
         {% endif %}
         <div id="fido2-alerts"></div>
-        {% if not oauth2_request %}
+        {% if not oauth2_request and (mailcow_apps or app_links) %}
         <legend><i class="bi bi-link-45deg"></i> {{ ui_texts.apps_name|raw }}</legend>
         <div class="apps">
           {% for app in mailcow_apps %}