]>
Commit | Line | Data |
---|---|---|
401827c2 MT |
1 | {% extends "base.html" %} |
2 | ||
3 | {% block title %}{{ account }}{% end block %} | |
4 | ||
5 | {% block main %} | |
e96e445b MT |
6 | {% import phonenumbers %} |
7 | ||
401827c2 MT |
8 | <div class="row justify-content-center"> |
9 | <div class="col col-md-6 col-lg-4 mb-5"> | |
10 | <img class="img-fluid rounded-circle my-5" src="{{ account.avatar_url(512) }}" alt="{{ account }}" /> | |
11 | ||
12 | <h3 class="text-center mb-0">{{ account }}</h3> | |
13 | ||
14 | {% if account.sip_id %} | |
15 | <h5 class="text-center mb-0">{{ account.sip_id }}</h5> | |
16 | {% end %} | |
17 | </div> | |
18 | </div> | |
19 | ||
20 | <div class="row justify-content-center"> | |
21 | <div class="col col-md-8"> | |
22 | <div class="card p-3"> | |
23 | <div class="card-body"> | |
24 | <div class="row"> | |
25 | <div class="col"> | |
26 | <a class="btn btn-dark btn-block" href="mailto:{{ account.email }}"> | |
27 | {{ _("Email %s") % account.first_name }} | |
28 | </a> | |
29 | </div> | |
30 | </div> | |
31 | ||
32 | <div class="row"> | |
33 | {% if account.address %} | |
34 | <div class="col-md-6 mt-5"> | |
35 | <h6>{{ _("Postal Address") }}</h6> | |
36 | ||
37 | <address> | |
38 | <strong>{{ account.name }}</strong> | |
39 | <br> | |
e96e445b | 40 | {% for line in account.address %} |
401827c2 MT |
41 | {{ line }}<br> |
42 | {% end %} | |
43 | </address> | |
44 | </div> | |
45 | {% end %} | |
46 | ||
e96e445b | 47 | {% if account.phone_numbers %} |
401827c2 | 48 | <div class="col-md-6 mt-5"> |
e96e445b | 49 | <h6>{{ _("Phone Numbers") }}</h6> |
401827c2 MT |
50 | |
51 | <ul class="list-unstyled"> | |
e96e445b | 52 | {% for number in account.phone_numbers %} |
401827c2 | 53 | <li> |
e96e445b MT |
54 | {% if phonenumbers.number_type(number) == phonenumbers.PhoneNumberType.MOBILE %} |
55 | <span class="fa fa-mobile" title="{{ _("Mobile") }}"></span> | |
401827c2 MT |
56 | {% else %} |
57 | <span class="fa fa-phone"></span> | |
58 | {% end %} | |
e96e445b MT |
59 | |
60 | <a href="tel:{{ format_phone_number_to_e164(number) }}" | |
61 | title="{{ format_phone_number_location(number) }}">{{ format_phone_number(number) }}</a> | |
401827c2 MT |
62 | </li> |
63 | {% end %} | |
64 | </ul> | |
65 | </div> | |
66 | {% end %} | |
67 | </div> | |
68 | ||
69 | {% if (current_user == account or current_user.is_admin()) and account.uses_sip_forwarding() %} | |
70 | <p class="text-muted mb-0"> | |
71 | {{ _("All calls are forwarded to") }} | |
e96e445b | 72 | <a href="sip:{{ account.sip_routing_address }}">{{ account.sip_routing_address }}</a> |
401827c2 MT |
73 | </p> |
74 | {% end %} | |
e96e445b MT |
75 | |
76 | <div class="btn-toolbar"> | |
77 | {% if account.can_be_managed_by(current_user) %} | |
78 | <a class="btn btn-warning btn-sm btn-block" href="/users/{{ account.uid }}/edit"> | |
79 | <span class="fas fa-edit mr-2"></span> {{ _("Edit") }} | |
80 | </a> | |
81 | {% end %} | |
82 | </div> | |
401827c2 MT |
83 | </div> |
84 | </div> | |
85 | </div> | |
86 | </div> | |
87 | {% end block %} | |
88 | ||
89 | {% block right %}{% end block %} |