FreedomBox/plinth/templates/port-forwarding-info.html
Sunil Mohan Adapa 83dcafac55
ui: Make all tables responsive
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2020-12-19 11:26:34 +02:00

57 lines
1.9 KiB
HTML

{% comment %}
# SPDX-License-Identifier: AGPL-3.0-or-later
{% endcomment %}
{% load i18n %}
{% if port_forwarding_info.ports %}
<h3>{% trans "Port Forwarding" %}</h3>
<p>
{% url 'networks:index' as networks_url %}
{% if port_forwarding_info.network_topology_type != "to_router" %}
{% blocktrans trimmed %}
Your FreedomBox is <a href="{{ networks_url }}">not behind a router</a>.
No action is necessary.
{% endblocktrans %}
<span class="fa fa-check" aria-hidden="true"></span>
{% elif port_forwarding_info.router_configuration_type == 'dmz' %}
{% blocktrans trimmed %}
Your FreedomBox is <a href="{{ networks_url }}"> behind a router</a> and
you are using the DMZ feature to forward all ports. No further router
configuration is necessary.
{% endblocktrans %}
<span class="fa fa-check" aria-hidden="true"></span>
{% else %}
{% blocktrans trimmed %}
Your FreedomBox is <a href="{{ networks_url }}">behind a router</a> and
you are not using the DMZ feature. You will need to set up port
forwarding on your router. You should forward the following ports for
{{ service_name }}:
{% endblocktrans %}
<div class="table-responsive">
<table class="table">
<thead>
<tr>
<th>{% trans "Protocol" %}</th>
<th>{% trans "From Router/WAN Ports" %}</th>
<th>{% blocktrans %}To {{box_name}} Ports{% endblocktrans %}</th>
</tr>
</thead>
<tbody>
{% for port in port_forwarding_info.ports %}
<tr>
<td>{{ port.protocol }}</td>
<td>{{ port.ports }}</td>
<td>{{ port.ports }}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
{% endif %}
</p>
{% endif %}