<h4>
{% if account.uses_sip_forwarding() %}
<span class="glyphicon glyphicon-earphone" title="{{ _("calls forwarded") }}"></span>
+ <a href="/call/{{ account.sip_id }}">{{ account.sip_id }}</a>
{% elif account.sip_is_online() %}
<span class="glyphicon glyphicon-earphone text-success" title="{{ _("online") }}"></span>
<a href="/call/{{ account.sip_id }}">{{ account.sip_id }}</a>
<ul class="list-unstyled">
{% for number in account.telephone_numbers %}
<li>
+ {% if number in account.mobile_telephone_numbers %}
+ <span class="fa fa-mobile" title="{{ _("Mobile phone") }}"></span>
+ {% elif number in account.home_telephone_numbers %}
+ <span class="fa fa-home" title="{{ _("Home telephone") }}"></span>
+ {% else %}
+ <span class="fa fa-phone"></span>
+ {% end %}
<a href="tel:{{ number }}">{{ number }}</a>
</li>
{% end %}
@property
def telephone_numbers(self):
- return self.attributes.get("telephoneNumber")
+ return self._telephone_numbers + self.mobile_telephone_numbers \
+ + self.home_telephone_numbers
+
+ @property
+ def _telephone_numbers(self):
+ return self.attributes.get("telephoneNumber") or []
+
+ @property
+ def home_telephone_numbers(self):
+ return self.attributes.get("homePhone") or []
+
+ @property
+ def mobile_telephone_numbers(self):
+ return self.attributes.get("mobile") or []
def avatar_url(self, size=None):
if self.backend.debug: