diff --git a/plinth/templates/app.html b/plinth/templates/app.html index 11e65af65..ba9532806 100644 --- a/plinth/templates/app.html +++ b/plinth/templates/app.html @@ -45,19 +45,20 @@
{% endif %} - {% if clients|length == 1 and clients|first|lookup:'platforms'|length == 1 and clients|first|lookup:'platforms'|first|lookup:'type' == 'web' %} - - {% block launch_button %} -- - {% trans "Launch web client" %} -
- {% endblock %} - + {% if clients|length == 1 %} + {% with clients|first|lookup:'platforms' as platforms %} + {% if platforms|length == 1 and platforms|first|lookup:'type' == 'web' %} + {% block launch_button %} ++ + {% trans "Launch web client" %} +
+ {% endblock %} + {% endif %} + {% endwith %} {% else %} - {% include "clients.html" with clients=clients enabled=is_enabled %} - {% endif %} {% block subsubmenu %} diff --git a/plinth/templates/clients.html b/plinth/templates/clients.html index 1192f4027..bd84a01c0 100644 --- a/plinth/templates/clients.html +++ b/plinth/templates/clients.html @@ -31,122 +31,122 @@| {% trans "Web" %} | - {% endif %} - {% for platform in client.platforms %} - {% if platform.type == 'web' %} -{{ client.name }} | -- - {% trans "Launch" %} - - - | + {% with clients|clients_of_type:'web' as web_clients %} + {% for client in web_clients %} +||
|---|---|---|---|---|
| {% trans "Web" %} | {% endif %} - {% endfor %} -||||
| {% trans "Desktop" %} | - {% endif %} -{{ client.name }} | -
{% for platform in client.platforms %}
- {% if platform.type == 'download' %}
-
-
- {% with 'theme/icons/'|add:platform.os|add:'.png' as icon %}
- | {{ client.name }} | ++ + {% trans "Launch" %} + + + | {% endif %} {% endfor %} - -
| {% trans "Mobile" %} | - {% endif %} -{{ client.name }} | -
- {% for platform in client.platforms %}
- {% if platform.type == 'store' and platform.os == 'android' or platform.os == 'ios' %}
-
-
- {% with 'theme/icons/'|add:platform.store_name|add:'.png' as icon %}
- |
- ||
| {% trans "Desktop" %} | + {% endif %} +{{ client.name }} | +
+ {% for platform in client.platforms %}
+ {% if platform.type == 'download' %}
+
+
+ {% with 'theme/icons/'|add:platform.os|add:'.png' as icon %}
+ |
+ ||
| {% trans "Package" %} | - {% endif %} -{{ client.name }} | -
- {% for platform in client.platforms %}
- {% if platform.type == 'package' %}
- {% if platform.format == 'deb' %}
- {% trans "Debian:" %} {{ platform.name }}
+ {% with clients|clients_of_type:'mobile' as mobile_clients %}
+ {% for client in mobile_clients %}
+ | ||
| {% trans "Mobile" %} | + {% endif %} +{{ client.name }} | +
+ {% for platform in client.platforms %}
+ {% if platform.type == 'store' and platform.os == 'android' or platform.os == 'ios' %}
+
+
+ {% with 'theme/icons/'|add:platform.store_name|add:'.png' as icon %}
+ {% trans "Homebrew:" %} {{ platform.name }}
- {% endif %}
- {% if platform.format == 'rpm' %}
- {% trans "RPM:" %} {{ platform.name }} - {% endif %} - {% endif %} - {% endfor %} - |
-
{% trans "RPM:" %} {{ platform.name }}
+ {% endif %} + {% endif %} + {% endfor %} +