]> git.ipfire.org Git - ipfire.org.git/commitdiff
people: Show SIP status in user profile
authorMichael Tremer <michael.tremer@ipfire.org>
Wed, 17 Oct 2018 00:15:06 +0000 (01:15 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Wed, 17 Oct 2018 00:15:06 +0000 (01:15 +0100)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/templates/people/user.html

index e527b7844aa5e68920e0255e2cb815b89269e4fb..12b6405dd3f3f057ff0e047410fd89b1e484b4d7 100644 (file)
                
                                                {% if account.phone_numbers %}
                                                        <div class="col-md-6 mt-5">
+                                                               {% if not account.uses_sip_forwarding() %}
+                                                                       <h6>
+                                                                               <span class="mr-2">{{ _("SIP Status") }}</span>
+
+                                                                               {% if account.sip_registrations %}
+                                                                                       <a class="text-success" href="/users/{{ account.uid }}/registrations">
+                                                                                               {{ _("Online") }} ({{ len(account.sip_registrations) }})
+                                                                                       </a>
+                                                                               {% else %}
+                                                                                       <span class="text-danger">{{ _("Offline") }}</span>
+                                                                               {% end %}
+                                                                       </h6>
+                                                               {% end %}
+
                                                                <h6>{{ _("Phone Numbers") }}</h6>
                        
                                                                <ul class="list-unstyled">