Parent: [ddf08c] (diff)

Download this file

user_index.html    296 lines (271 with data), 10.6 kB

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
{#-
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-#}
{% set hide_left_bar = True %}
{% extends g.theme.master %}
{% block title %}{{user.display_name}} / Profile{% endblock %}
{% block header %}{{ user.display_name|default(user.username) }}{% endblock %}
{% block extra_css %}
<link rel="stylesheet" type="text/css"
href="{{g.app_static('css/user_profile.css')}}"/>
{% endblock %}
{% block head %}
<link rel="alternate" type="application/rss+xml" title="RSS" href="feed.rss">
<link rel="alternate" type="application/atom+xml" title="Atom" href="feed.atom">
{% endblock %}
{% block actions %}
<a href="{{c.app.url}}feed.rss" title="Follow"><b data-icon="{{g.icons['feed'].char}}" class="ico {{g.icons['feed'].css}}"></b></a>
{% endblock %}
{% block content %}
{% if user.preferences.email_address %}
<p>{{lib.gravatar(user)}}</p>
{% endif %}
<div class="project-list grid-18">
<b>Projects</b>
<ul>
{% for p in user.my_projects() %}
{% if h.has_access(p, 'read')() %}
<li>
<a class="project-name" href="{{p.url()}}">{{p.name}}</a>
</li>
{% endif %}
{% endfor %}
</ul>
</div>
<div class="grid-24">
<div class="grid-24" style="margin:0;"><b>Personal data</b></div>
{% if user.get_pref('sex') == 'Male' or user.get_pref('sex') == 'Female' %}
<div class="grid-24" style="margin:0;">
<div class="grid-4">Gender:</div>
<div class="grid-8">{{user.get_pref('sex')}}</div>
</div>
{% endif %}
{% if user.get_pref('birthdate') %}
<div class="grid-24" style="margin:0;">
<div class="grid-4">Birthdate:</div>
<div class="grid-8">
{{ user.get_pref('birthdate').strftime('%d %B %Y')}}
</div>
</div>
{% endif %}
{% if user.get_pref('localization').country or user.get_pref('localization').city %}
<div class="grid-24" style="margin:0;">
<div class="grid-4">Localization:</div>
<div class="grid-8">
{% if user.get_pref('localization').city %}
{{user.get_pref('localization').city}}{{ ',' if user.get_pref('localization').country else '' }}
{% endif %}
{% if user.get_pref('localization').country %}
{{user.get_pref('localization').country}}
{% endif %}
</div>
</div>
{% endif %}
{% if user.get_pref('timezone') %}
<div class="grid-24" style="margin:0;">
<div class="grid-4">Timezone:</div>
<div class="grid-8">
{{user.get_pref('timezone')}}
</div>
</div>
{% endif %}
{% if user.get_pref('socialnetworks')|length > 0 %}
<div class="grid-24" style="margin:0;">
<div class="grid-4">Social networks:</div>
<div class="grid-18">
{{user.get_pref('display_name')}}'s account(s):
<ul>
{% for i in user.get_pref('socialnetworks') %}
<li>{{i.socialnetwork}}: <a href="{{i.accounturl}}">{{i.accounturl}}</a></li>
{% endfor %}
</ul>
</div>
</div>
{% endif %}
{% if user.get_pref('webpages')|length > 0 %}
<div class="grid-24" style="margin:0;">
<div class="grid-4">Websites:</div>
<div class="grid-18">
{{user.get_pref('display_name')}}'s website(s):
<ul>
{% for i in user.get_pref('webpages') %}
<li><a href="{{i}}">{{i}}</a></li>
{% endfor %}
</ul>
</div>
</div>
{% endif %}
{% if user.get_pref('telnumbers')|length > 0 %}
<div class="grid-24" style="margin:0;">
<div class="grid-4">Telephone number(s):</div>
<div class="grid-18">
{{user.get_pref('display_name')}}'s telephone number(s):
<ul>
{% for i in user.get_pref('telnumbers') %}
<li>{{i}}</li>
{% endfor %}
</ul>
</div>
</div>
{% endif %}
{% if user.get_pref('skypeaccount') %}
<div class="grid-24" style="margin:0;">
<div class="grid-4">Skype account:</div>
<div class="grid-8">{{user.get_pref('skypeaccount')}}</div>
</div>
{% endif %}
{% if user.get_pref('timezone') and user.get_availability_timeslots() |length > 0 %}
<div class="grid-24" style="margin:0;">
<div class="grid-4">Availability:</div>
{% if c.user.get_pref('timezone') %}
<div class="grid-18" id="timeslotsconverted" style="visibility: visible; display:none;">
{{user.get_pref('display_name')}}'s availability time-slots.
<div style="float:right;">
See timeslots in:
<a href="JavaScript:void(0);" onclick="changeTimezone('utc')">UTC</a> |
<a href="JavaScript:void(0);" onclick="changeTimezone('local')">
{{user.get_pref('display_name')}}'s local time
</a> |
<b>Your local time</b>
</div>
<ul>
{% for i in user.get_localized_availability(c.user.get_pref('timezone')) %}
<li>{{i.week_day}}: from {{i.start_time.strftime("%H:%M")}} to {{i.end_time.strftime("%H:%M")}} </li>
{% endfor %}
</ul>
</div>
{% endif %}
<div class="grid-18" id="timeslotsutc" style="visibility: visible; display:block;">
{{user.get_pref('display_name')}}'s availability time-slots.
<div style="float:right;">
See timeslots in:
<b>UTC</b> |
<a href="JavaScript:void(0);" onclick="changeTimezone('local')">
{{user.get_pref('display_name')}}'s local time
</a>
{% if c.user.get_pref('timezone') %} |
<a href="JavaScript:void(0);" onclick="changeTimezone('converted')">
Your local time
</a>
{% endif %}
</div>
<ul>
{% for i in user.get_localized_availability('utc') %}
<li>{{i.week_day}}: from {{i.start_time.strftime("%H:%M")}} to {{i.end_time.strftime("%H:%M")}} </li>
{% endfor %}
</ul>
</div>
<div class="grid-18" id="timeslotslocal" style="visibility: visible; display:none;">
{{user.get_pref('display_name')}}'s availability time-slots.
<div style="float:right;">
See timeslots in:
<a href="JavaScript:void(0);" onclick="changeTimezone('utc')">UTC</a> |
<b>
{{user.get_pref('display_name')}}'s local time
</b>
{% if c.user.get_pref('timezone') %} |
<a href="JavaScript:void(0);" onclick="changeTimezone('converted')">
Your local time
</a>
{% endif %}
</div>
<ul>
{% for i in user.get_availability_timeslots() %}
<li>{{i.week_day}}: from {{i.start_time.strftime("%H:%M")}} to {{i.end_time.strftime("%H:%M")}} </li>
{% endfor %}
</ul>
</div>
</div>
</div>
{% endif %}
{% if user.get_inactive_periods(include_past_periods=False)|length > 0 %}
<div class="grid-24">
<div class="grid-4">Inactive periods:</div>
<div class="grid-18">
This user won't be able to work on the forge in the following period(s):
<ul>
{% for p in user.get_inactive_periods(include_past_periods=False) %}
<li>From {{p.start_date.strftime('%d %B %Y')}} to {{p.end_date.strftime('%d %B %Y')}}.</li>
{% endfor %}
</div>
</div>
{% endif %}
</div><!-- end of Personal data section -->
<div class="grid-24">
<b>Current {{user.get_pref('display_name')}}'s skills list</b>
<div class="grid-24">
{% if user.get_skills()|length > 0 %}
<table>
<thead>
<tr>
<th>Skill</th>
<th>Level</th>
<th>Comments</th>
</tr>
</thead>
<tbody>
{% for s in user.get_skills() %}
<tr>
<td>{{s.skill.fullpath}}</td>
<td>{{s.level}}</td>
<td>{{s.comment}}</td>
</tr>
{% endfor %}
</tbody>
</table>
{% else %}
<div class="grid-24">At the moment, {{user.get_pref('display_name')}}'s skills list is empty!</div>
{% endif %}
</div>
</div>
{% if c.user.username == user.username %}
<div class="address-list grid-18">
<b>Email Addresses</b>
<ul>
{% for email in user.email_addresses %}
<li>
{{lib.email_gravatar(email, size=24)}}
{% if email == user.preferences.email_address %}
<span class="prime email-address">{{email}}</span>
{% else %}
<span class="email-address">{{email}}</span>
{% endif %}
</li>
{% endfor %}
</ul>
</div>
<div class="openid-list grid-18">
<b>OpenIDs</b>
<ul>
{% for openid in user.open_ids %}
<li>
<span class="openid">{{openid}}</span>
</li>
{% endfor %}
</ul>
</div>
{% endif %}
{% endblock %}
{% block extra_js %}
<script type="text/javascript">
function changeTimezone(opt){
$("#timeslotslocal").hide();
$("#timeslotsutc").hide();
$("#timeslotsconverted").hide();
$("#timeslots" + opt).show();
}
</script>
{% endblock %}