From 5e6d6d1cd11606f310b58017e219d7226fd16f29 Mon Sep 17 00:00:00 2001 From: Nektarios Katakis Date: Mon, 17 Feb 2020 10:43:57 +0000 Subject: [PATCH] networks: Refactor connections list template Signed-off-by: Nektarios Katakis [sunil: Use SPDX license identifier] Signed-off-by: Sunil Mohan Adapa Reviewed-by: Sunil Mohan Adapa --- plinth/modules/networks/networks.py | 2 +- .../networks/templates/connections_list.html | 87 ------------------- .../templates/internet_connectivity_main.html | 27 ++++++ .../templates/networks_configuration.html | 48 ++++++++++ .../templates/router_configuration_main.html | 34 ++++++++ 5 files changed, 110 insertions(+), 88 deletions(-) create mode 100644 plinth/modules/networks/templates/internet_connectivity_main.html create mode 100644 plinth/modules/networks/templates/networks_configuration.html create mode 100644 plinth/modules/networks/templates/router_configuration_main.html diff --git a/plinth/modules/networks/networks.py b/plinth/modules/networks/networks.py index 80df3f52d..56d58234e 100644 --- a/plinth/modules/networks/networks.py +++ b/plinth/modules/networks/networks.py @@ -29,7 +29,7 @@ def index(request): connections = network.get_connection_list() return TemplateResponse( - request, 'connections_list.html', { + request, 'networks_configuration.html', { 'app_id': 'networks', 'app_info': networks.app.info, 'title': _('Network Connections'), diff --git a/plinth/modules/networks/templates/connections_list.html b/plinth/modules/networks/templates/connections_list.html index 0e766a7a6..5927f7c09 100644 --- a/plinth/modules/networks/templates/connections_list.html +++ b/plinth/modules/networks/templates/connections_list.html @@ -1,4 +1,3 @@ -{% extends "app.html" %} {% comment %} # SPDX-License-Identifier: AGPL-3.0-or-later {% endcomment %} @@ -6,40 +5,6 @@ {% load bootstrap %} {% load i18n %} -{% block page_head %} - -{% endblock %} - -{% block configuration %}

{% trans "Connections" %}

@@ -102,56 +67,4 @@
{% endfor %} - {% include "connections_diagram.html" %} - -

- {% blocktrans trimmed %} - {{ box_name }} Internet Connectivity - {% endblocktrans %} -

-

- {% blocktrans trimmed %} - The following best describes how your {{ box_name }} is connected in your - network. This information is used only to suggest necessary configuration - actions. - {% endblocktrans %} -

- -

- {% blocktrans trimmed %} - Your {{ box_name }} gets its internet from your Router via WiFi or - Ethernet cable. This is a typical home setup. - {% endblocktrans %} -

- - - -

- {% blocktrans trimmed %} - Your Internet Connection Type - {% endblocktrans %} -

-

- {% blocktrans trimmed %} - The following best describes the type of Internet connection provided - by your ISP. This information is only used to suggest you necessary - configuration actions. - {% endblocktrans %} -

- - - -{% endblock %} diff --git a/plinth/modules/networks/templates/internet_connectivity_main.html b/plinth/modules/networks/templates/internet_connectivity_main.html new file mode 100644 index 000000000..c275e9e9c --- /dev/null +++ b/plinth/modules/networks/templates/internet_connectivity_main.html @@ -0,0 +1,27 @@ +{% comment %} +# SPDX-License-Identifier: AGPL-3.0-or-later +{% endcomment %} + +{% load bootstrap %} +{% load i18n %} + +

+ {% blocktrans trimmed %} + Your Internet Connection Type + {% endblocktrans %} +

+

+ {% blocktrans trimmed %} + The following best describes the type of Internet connection provided + by your ISP. This information is only used to suggest you necessary + configuration actions. + {% endblocktrans %} +

+ + diff --git a/plinth/modules/networks/templates/networks_configuration.html b/plinth/modules/networks/templates/networks_configuration.html new file mode 100644 index 000000000..01d7c7b30 --- /dev/null +++ b/plinth/modules/networks/templates/networks_configuration.html @@ -0,0 +1,48 @@ +{% extends "app.html" %} +{% comment %} +# SPDX-License-Identifier: AGPL-3.0-or-later +{% endcomment %} + +{% load bootstrap %} +{% load i18n %} + +{% block page_head %} + +{% endblock %} + +{% block configuration %} + {% include "connections_list.html" %} + + {% include "router_configuration_main.html" %} + + {% include "internet_connectivity_main.html" %} +{% endblock %} diff --git a/plinth/modules/networks/templates/router_configuration_main.html b/plinth/modules/networks/templates/router_configuration_main.html new file mode 100644 index 000000000..58d9099b8 --- /dev/null +++ b/plinth/modules/networks/templates/router_configuration_main.html @@ -0,0 +1,34 @@ +{% comment %} +# SPDX-License-Identifier: AGPL-3.0-or-later +{% endcomment %} + +{% load bootstrap %} +{% load i18n %} + +

+ {% blocktrans trimmed %} + {{ box_name }} Internet Connectivity + {% endblocktrans %} +

+

+ {% blocktrans trimmed %} + The following best describes how your {{ box_name }} is connected in your + network. This information is used only to suggest necessary configuration + actions. + {% endblocktrans %} +

+ +

+ {% blocktrans trimmed %} + Your {{ box_name }} gets its internet from your Router via WiFi or + Ethernet cable. This is a typical home setup. + {% endblocktrans %} +

+ +