]>
Commit | Line | Data |
---|---|---|
ab8b7218 | 1 | {% extends "base.html" %} |
401827c2 MT |
2 | |
3 | {% block main %} | |
e96e445b MT |
4 | {% import phonenumbers %} |
5 | ||
d8b04c72 | 6 | <div class="card mb-3"> |
d09d554b | 7 | <div class="card-body"> |
1c4522dc MT |
8 | {% if account.description %} |
9 | <div class="row"> | |
10 | <div class="col"> | |
11 | {% module Markdown(account.description) %} | |
12 | </div> | |
13 | </div> | |
14 | {% end %} | |
15 | ||
d09d554b MT |
16 | <div class="row"> |
17 | <div class="col"> | |
18 | <a class="btn btn-dark btn-block" href="mailto:{{ account.email }}"> | |
19 | {{ _("Email %s") % account.first_name }} | |
20 | </a> | |
21 | </div> | |
22 | </div> | |
401827c2 | 23 | |
a8b6ff20 MT |
24 | {% if current_user == account or current_user.is_staff() %} |
25 | <div class="row"> | |
26 | {% if account.address %} | |
27 | <div class="col-md-6 mt-5"> | |
28 | <h6>{{ _("Postal Address") }}</h6> | |
d09d554b | 29 | |
a8b6ff20 MT |
30 | <address> |
31 | <strong>{{ account.name }}</strong> | |
32 | <br> | |
33 | {% for line in account.address %} | |
34 | {{ line }}<br> | |
35 | {% end %} | |
36 | </address> | |
37 | </div> | |
38 | {% end %} | |
d09d554b | 39 | |
a8b6ff20 MT |
40 | <div class="col-md-6 mt-5"> |
41 | {% if account.phone_number or account.fax_number %} | |
42 | <h6 class="mb-2">{{ _("Phone Numbers") }}</h6> | |
d3208ac7 | 43 | |
a8b6ff20 MT |
44 | <ul class="list-unstyled"> |
45 | {% if account.phone_number %} | |
46 | <li> | |
47 | <span class="fas fa-phone"></span> | |
d3208ac7 | 48 | |
a8b6ff20 MT |
49 | <a href="tel:{{ format_phone_number_to_e164(account.phone_number) }}"> |
50 | {{ format_phone_number(account.phone_number) }} | |
51 | </a> | |
52 | </li> | |
53 | {% end %} | |
d3208ac7 | 54 | |
a8b6ff20 MT |
55 | {% if account.fax_number %} |
56 | <li> | |
57 | <span class="fas fa-fax"></span> | |
d3208ac7 | 58 | |
a8b6ff20 MT |
59 | <a href="fax:{{ format_phone_number_to_e164(account.fax_number) }}"> |
60 | {{ format_phone_number(account.fax_number) }} | |
61 | </a> | |
62 | </li> | |
63 | {% end %} | |
64 | </ul> | |
65 | {% end %} | |
d3208ac7 | 66 | |
a8b6ff20 MT |
67 | {% if account.phone_numbers %} |
68 | <h6 class="mb-2">{{ _("External Phone Numbers") }}</h6> | |
d09d554b | 69 | |
a8b6ff20 MT |
70 | <ul class="list-unstyled"> |
71 | {% for number in account.phone_numbers %} | |
72 | <li> | |
73 | {% if phonenumbers.number_type(number) == phonenumbers.PhoneNumberType.MOBILE %} | |
74 | <span class="fas fa-mobile" title="{{ _("Mobile") }}"></span> | |
75 | {% else %} | |
76 | <span class="fas fa-phone"></span> | |
77 | {% end %} | |
2a22de6f | 78 | |
a8b6ff20 MT |
79 | <a href="tel:{{ format_phone_number_to_e164(number) }}" |
80 | title="{{ format_phone_number_location(number) }}">{{ format_phone_number(number) }}</a> | |
81 | </li> | |
82 | {% end %} | |
83 | </ul> | |
84 | {% end %} | |
85 | </div> | |
d3208ac7 | 86 | </div> |
a8b6ff20 | 87 | {% end %} |
401827c2 | 88 | </div> |
d8b04c72 | 89 | |
849d6656 | 90 | {% if current_user.is_staff() and account.groups %} |
d8b04c72 MT |
91 | <div class="card-body"> |
92 | <div class="row"> | |
93 | <div class="col"> | |
94 | <h6 class="mb-0">{{ _("Groups") }}</h6> | |
95 | </div> | |
96 | </div> | |
97 | </div> | |
98 | ||
ffa6ce9e | 99 | <div class="list-group list-group-flush"> |
d8b04c72 | 100 | {% for g in account.groups %} |
849d6656 | 101 | <a class="list-group-item list-group-item-active" href="/groups/{{ g.gid }}"> |
ffa6ce9e MT |
102 | <i class="fas fa-users mr-2"></i> {{ g }} |
103 | </a> | |
d8b04c72 | 104 | {% end %} |
ffa6ce9e | 105 | </div> |
d8b04c72 | 106 | {% end %} |
401827c2 | 107 | </div> |
f105f4cf | 108 | |
cc47e04e MT |
109 | <ul class="list-unstyled small text-muted"> |
110 | <li> | |
111 | {{ _("Joined %s") % locale.format_date(account.created_at, shorter=True) }} | |
112 | </li> | |
113 | ||
114 | {% if current_user.is_admin() %} | |
ddfa1d3d MT |
115 | <li> |
116 | {{ _("Last Modified %s") % locale.format_date(account.modified_at) }} | |
117 | </li> | |
118 | ||
119 | {% if account.last_successful_authentication %} | |
120 | <li> | |
121 | {{ _("Last successful authentication: %s") % locale.format_date(account.last_successful_authentication) }} | |
122 | </li> | |
123 | {% end %} | |
124 | ||
125 | {% if account.failed_login_count %} | |
126 | <li class="text-warning"> | |
127 | {{ _("One unsuccessful authentication attempt.", "%(num)s unsuccessful authentication attempts.", account.failed_login_count) % { "num" : account.failed_login_count } }} | |
128 | ||
129 | {% if account.last_failed_authentication %} | |
130 | {{ _("Last attempt: %s") % locale.format_date(account.last_failed_authentication) }} | |
131 | {% end %} | |
132 | </li> | |
133 | {% end %} | |
cc47e04e MT |
134 | {% end %} |
135 | </ul> | |
401827c2 | 136 | {% end block %} |