diff --git a/plinth/templates/clients-button.html b/plinth/templates/clients-button.html new file mode 100644 index 000000000..674777dfd --- /dev/null +++ b/plinth/templates/clients-button.html @@ -0,0 +1,29 @@ +{% comment %} +# SPDX-License-Identifier: AGPL-3.0-or-later +{% endcomment %} + +{% load i18n %} +{% load plinth_extras %} + +{% if clients %} + {% with client_platforms=clients|clients_get_platforms %} + {% if client_platforms.web|length == 1 %} + + {% trans "Launch web client" %} + + + {% endif %} + + {% if client_platforms.web|length > 1 or client_platforms.other %} + + + {% trans "Client Apps" %} + + {% endif %} + {% endwith %} +{% endif %} diff --git a/plinth/templates/toolbar.html b/plinth/templates/toolbar.html index a55281b0b..b082e1885 100644 --- a/plinth/templates/toolbar.html +++ b/plinth/templates/toolbar.html @@ -2,38 +2,14 @@ # SPDX-License-Identifier: AGPL-3.0-or-later {% endcomment %} -{% load bootstrap %} {% load i18n %} -{% load plinth_extras %} -{% load static %} {% block toolbar %} - {% if app_info.clients %} - {% with client_platforms=app_info.clients|clients_get_platforms %} - {% if client_platforms.web|length == 1 %} - - {% trans "Launch web client" %} - - - {% endif %} - - {% if client_platforms.web|length > 1 or client_platforms.other %} - - - {% trans "Client Apps" %} - - {% endif %} - {% endwith %} - {% endif %} + {% include "clients-button.html" with clients=app_info.clients enabled=is_enabled %} {% if has_diagnostics %}