]> git.ipfire.org Git - ipfire.org.git/commitdiff
people: Do not show calls button for regular users
authorMichael Tremer <michael.tremer@ipfire.org>
Mon, 28 Oct 2019 18:34:35 +0000 (18:34 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Mon, 28 Oct 2019 18:34:35 +0000 (18:34 +0000)
This does not work anyways.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/templates/people/base.html

index d92de2d6ef5c44f74b678f4db0fe4b7f6ebbad5d..510d2b134f503dd30ab20e0c24a3422e4cadfa2b 100644 (file)
                                                </a>
                                        {% end %}
 
-                                       {% if account.has_sip() %}
-                                               <a class="btn btn-light btn-sm btn-block" href="/users/{{ account.uid }}/calls">
-                                                       <span class="fas fa-phone mr-2"></span> {{ _("Calls") }}
+                                       {% if account.can_be_managed_by(current_user) %}
+                                               {% if account.has_sip() %}
+                                                       <a class="btn btn-light btn-sm btn-block" href="/users/{{ account.uid }}/calls">
+                                                               <span class="fas fa-phone mr-2"></span> {{ _("Calls") }}
 
-                                                       {% if account.sip_channels %}
-                                                               <span class="badge badge-success ml-1">{{ len(account.sip_channels) }}</span>
-                                                       {% end %}
-                                               </a>
-                                       {% end %}
+                                                               {% if account.sip_channels %}
+                                                                       <span class="badge badge-success ml-1">{{ len(account.sip_channels) }}</span>
+                                                               {% end %}
+                                                       </a>
+                                               {% end %}
 
-                                       {% if account.can_be_managed_by(current_user) %}
                                                <a class="btn btn-warning btn-sm btn-block" href="/users/{{ account.uid }}/edit">
                                                        <span class="fas fa-edit mr-2"></span> {{ _("Edit") }}
                                                </a>