networks: Refactor connections list template

Signed-off-by: Nektarios Katakis <iam@nektarioskatakis.xyz>
[sunil: Use SPDX license identifier]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
This commit is contained in:
Nektarios Katakis 2020-02-17 10:43:57 +00:00 committed by Sunil Mohan Adapa
parent a8cd9c0b4a
commit 5e6d6d1cd1
No known key found for this signature in database
GPG Key ID: 43EA1CFF0AA7C5F2
5 changed files with 110 additions and 88 deletions

View File

@ -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'),

View File

@ -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 %}
<style type="text/css">
.connection-status-label {
display: inline-block;
width: 5.5em;
padding: 5px 0px;
text-align: center;
margin-right: 10px;
}
.connection-show-label {
display: inline-block;
width: 40%;
}
.connection-type-label {
display: inline-block;
}
.list-group-item .btn {
margin: -2px 0;
}
.form.pull-right {
margin-right: 20px;
}
.form button {
width: 7em;
}
</style>
{% endblock %}
{% block configuration %}
<h3>{% trans "Connections" %}</h3>
<div class="btn-toolbar">
@ -102,56 +67,4 @@
</div>
{% endfor %}
</div>
{% include "connections_diagram.html" %}
<h3>
{% blocktrans trimmed %}
{{ box_name }} Internet Connectivity
{% endblocktrans %}
</h3>
<p>
{% 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 %}
</p>
<p>
{% blocktrans trimmed %}
Your {{ box_name }} gets its internet from your Router via WiFi or
Ethernet cable. This is a typical home setup.
{% endblocktrans %}
</p>
<div class="btn-toolbar">
<a href="{% url 'networks:router_setup' %}" class="btn btn-default"
role="button" title="{% trans 'Update...' %}">
<span class="fa" aria-hidden="true"></span>
{% trans 'Update...' %}
</a>
</div>
<h3>
{% blocktrans trimmed %}
Your Internet Connection Type
{% endblocktrans %}
</h3>
<p>
{% 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 %}
</p>
<div class="btn-toolbar">
<a href="{% url 'networks:internet_connection_type_setup' %}" class="btn btn-default"
role="button" title="{% trans 'Update...' %}">
<span class="fa" aria-hidden="true"></span>
{% trans 'Update...' %}
</a>
</div>
{% endblock %}

View File

@ -0,0 +1,27 @@
{% comment %}
# SPDX-License-Identifier: AGPL-3.0-or-later
{% endcomment %}
{% load bootstrap %}
{% load i18n %}
<h3>
{% blocktrans trimmed %}
Your Internet Connection Type
{% endblocktrans %}
</h3>
<p>
{% 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 %}
</p>
<div class="btn-toolbar">
<a href="{% url 'networks:internet_connection_type_setup' %}" class="btn btn-default"
role="button" title="{% trans 'Update...' %}">
<span class="fa" aria-hidden="true"></span>
{% trans 'Update...' %}
</a>
</div>

View File

@ -0,0 +1,48 @@
{% extends "app.html" %}
{% comment %}
# SPDX-License-Identifier: AGPL-3.0-or-later
{% endcomment %}
{% load bootstrap %}
{% load i18n %}
{% block page_head %}
<style type="text/css">
.connection-status-label {
display: inline-block;
width: 5.5em;
padding: 5px 0px;
text-align: center;
margin-right: 10px;
}
.connection-show-label {
display: inline-block;
width: 40%;
}
.connection-type-label {
display: inline-block;
}
.list-group-item .btn {
margin: -2px 0;
}
.form.pull-right {
margin-right: 20px;
}
.form button {
width: 7em;
}
</style>
{% endblock %}
{% block configuration %}
{% include "connections_list.html" %}
{% include "router_configuration_main.html" %}
{% include "internet_connectivity_main.html" %}
{% endblock %}

View File

@ -0,0 +1,34 @@
{% comment %}
# SPDX-License-Identifier: AGPL-3.0-or-later
{% endcomment %}
{% load bootstrap %}
{% load i18n %}
<h3>
{% blocktrans trimmed %}
{{ box_name }} Internet Connectivity
{% endblocktrans %}
</h3>
<p>
{% 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 %}
</p>
<p>
{% blocktrans trimmed %}
Your {{ box_name }} gets its internet from your Router via WiFi or
Ethernet cable. This is a typical home setup.
{% endblocktrans %}
</p>
<div class="btn-toolbar">
<a href="{% url 'networks:router_setup' %}" class="btn btn-default"
role="button" title="{% trans 'Update...' %}">
<span class="fa" aria-hidden="true"></span>
{% trans 'Update...' %}
</a>
</div>