From: Michael Tremer Date: Wed, 17 Oct 2018 13:22:19 +0000 (+0100) Subject: people: Only show registrations table when registrations exist X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=80e0b73eabef9f45195e8b036a41bc8c86b2dca6;p=ipfire.org.git people: Only show registrations table when registrations exist Signed-off-by: Michael Tremer --- diff --git a/src/templates/people/modules/registrations.html b/src/templates/people/modules/registrations.html index 0143b389..2b3799e0 100644 --- a/src/templates/people/modules/registrations.html +++ b/src/templates/people/modules/registrations.html @@ -1,17 +1,25 @@ - - - {% for reg in account.sip_registrations %} - - - - +
{{ reg.user_agent }}{{ reg.protocol }}/{{ reg.network_ip }}:{{ reg.network_port }} - {% if reg.is_reachable() and reg.latency %} - {{ "%.2f ms" % reg.latency }} - {% else %} - {{ _("N/A") }} +{% if account.sip_registrations %} +
+
+
{{ _("Active Registrations") }}
+ + + + {% for reg in account.sip_registrations %} + + + + + {% end %} - - - {% end %} - -
{{ reg.user_agent }}{{ reg.protocol }}/{{ reg.network_ip }}:{{ reg.network_port }} + {% if reg.is_reachable() and reg.latency %} + {{ "%.2f ms" % reg.latency }} + {% else %} + {{ _("N/A") }} + {% end %} +
+
+ + +{% end %} diff --git a/src/templates/people/sip.html b/src/templates/people/sip.html index 8276ba77..eaf24e50 100644 --- a/src/templates/people/sip.html +++ b/src/templates/people/sip.html @@ -5,15 +5,7 @@ {% block main %} {% module Channels(account) %} -
-
-
- {{ _("Active SIP Registrations") }} -
- - {% module Registrations(account) %} -
-
+ {% module Registrations(account) %}