src/templates/people/modules/mos.html \
src/templates/people/modules/password.html \
src/templates/people/modules/password.js \
- src/templates/people/modules/registrations.html \
- src/templates/people/modules/sip-status.html
+ src/templates/people/modules/registrations.html
templates_people_modulesdir = $(templates_peopledir)/modules
<span class="text-monospace">{{ account.uid }}</span>
</div>
- {% if current_user.is_staff() and account.has_sip() %}
- <h5>
- {{ account.sip_id }}
-
- <small class="ml-2">
- {% module SIPStatus(account) %}
- </small>
- </h5>
- {% end %}
-
<div class="btn-toolbar mb-3">
{% if account.has_shell() %}
<a class="btn btn-light btn-sm btn-block" href="/~{{ account.uid }}/">
+++ /dev/null
-{% if account.sip_channels %}
- {% if account.can_be_managed_by(current_user) %}
- <a class="text-warning" href="/users/{{ account.uid }}/sip">
- {{ _("On The Phone") }}
- </a>
- {% else %}
- <span class="text-warning">{{ _("On The Phone") }}</span>
- {% end %}
-{% elif account.sip_registrations %}
- {% if account.can_be_managed_by(current_user) %}
- <a class="text-success" href="/users/{{ account.uid }}/sip">
- {{ _("Online") }} ({{ len(account.sip_registrations) }})
- </a>
- {% else %}
- <span class="text-success">{{ _("Online") }}</span>
- {% end %}
-{% elif account.uses_sip_forwarding() %}
- {% if account.can_be_managed_by(current_user) %}
- <a class="text-success" href="/users/{{ account.uid }}/sip">
- {{ _("Forwarded") }}
- </a>
- {% else %}
- <span class="text-success">{{ _("Forwarded") }}</span>
- {% end %}
-{% else %}
- {% if account.can_be_managed_by(current_user) %}
- <a class="text-danger" href="/users/{{ account.uid }}/sip">
- {{ _("Offline") }}
- </a>
- {% else %}
- <span class="text-danger">{{ _("Offline") }}</span>
- {% end %}
-{% end %}
<h6>{{ _("Phone Numbers") }}</h6>
<ul class="list-unstyled">
+ {% if account.has_sip() %}
+ <li>
+ {% if account.sip_channels %}
+ <i class="fas fa-phone-volume text-warning fa-fw"></i>
+ {% elif account.sip_registrations %}
+ <i class="fas fa-phone-square text-success fa-fw"></i>
+ {% elif account.uses_sip_forwarding() %}
+ <i class="fas fa-phone-square text-warning fa-fw"></i>
+ {% else %}
+ <i class="fas fa-phone-square text-danger fa-fw"></i>
+ {% end %}
+
+ <a href="sip:{{ account.sip_url }}">{{ account.sip_id }}</a>
+ </li>
+ {% end %}
+
{% if account.phone_number %}
<li>
- <i class="fas fa-phone"></i>
+ <i class="fas fa-phone fa-fw"></i>
<a href="tel:{{ format_phone_number_to_e164(account.phone_number) }}">
{{ format_phone_number(account.phone_number) }}
{% if account.fax_number %}
<li>
- <i class="fas fa-fax"></i>
+ <i class="fas fa-fax fa-fw"></i>
<a href="fax:{{ format_phone_number_to_e164(account.fax_number) }}">
{{ format_phone_number(account.fax_number) }}
{% for number in account.phone_numbers %}
<li>
{% if phonenumbers.number_type(number) == phonenumbers.PhoneNumberType.MOBILE %}
- <i class="fas fa-mobile" title="{{ _("Mobile") }}"></i>
+ <i class="fas fa-mobile fa-fw" title="{{ _("Mobile") }}"></i>
{% else %}
- <i class="fas fa-phone"></i>
+ <i class="fas fa-phone fa-fw"></i>
{% end %}
<a href="tel:{{ format_phone_number_to_e164(number) }}"
"NewAccounts" : people.NewAccountsModule,
"Password" : people.PasswordModule,
"Registrations" : people.RegistrationsModule,
- "SIPStatus" : people.SIPStatusModule,
# Nopaste
"Code" : nopaste.CodeModule,
class RegistrationsModule(ui_modules.UIModule):
def render(self, account):
return self.render_string("people/modules/registrations.html", account=account)
-
-
-class SIPStatusModule(ui_modules.UIModule):
- def render(self, account):
- return self.render_string("people/modules/sip-status.html", account=account)