[5ec3a0b] | 1 | <html xmlns="http://www.w3.org/1999/xhtml" |
---|
| 2 | xml:lang="en" |
---|
| 3 | xmlns:tal="http://xml.zope.org/namespaces/tal" |
---|
| 4 | xmlns:metal="http://xml.zope.org/namespaces/metal" |
---|
| 5 | xmlns:i18n="http://xml.zope.org/namespaces/i18n" |
---|
| 6 | i18n:domain="OpenWorkouts" |
---|
| 7 | metal:use-macro="load: base.pt" |
---|
| 8 | tal:attributes="lang request.locale_name"> |
---|
| 9 | |
---|
| 10 | <metal:head-title metal:fill-slot="head-title"> |
---|
| 11 | <tal:t i18n:translate="">My profile</tal:t> |
---|
| 12 | </metal:head-title> |
---|
| 13 | |
---|
| 14 | <metal:content metal:fill-slot="content"> |
---|
| 15 | |
---|
| 16 | <div class="user-profile"> |
---|
| 17 | <tal:c tal:condition="getattr(context, 'picture', None)"> |
---|
| 18 | <img tal:attributes="src request.resource_path(context, 'picture')" |
---|
| 19 | width="450" /> |
---|
| 20 | </tal:c> |
---|
| 21 | <h2> |
---|
| 22 | <tal:fullname tal:content="context.fullname"></tal:fullname> |
---|
[39b1497] | 23 | (<tal:uid tal:content="context.uid"></tal:uid>) |
---|
[5ec3a0b] | 24 | </h2> |
---|
| 25 | <h3> |
---|
| 26 | <tal:email tal:content="context.email"></tal:email> |
---|
| 27 | </h3> |
---|
| 28 | <h4> |
---|
| 29 | <a href="" |
---|
| 30 | tal:attributes="href request.resource_url(context, 'edit')" |
---|
| 31 | i18n:translate="">edit profile</a> | |
---|
| 32 | <a href="" |
---|
| 33 | tal:attributes="href request.resource_url(context, 'passwd')" |
---|
| 34 | i18n:translate="">change password</a> |
---|
| 35 | </h4> |
---|
| 36 | <div class="profile-info"> |
---|
| 37 | <ul> |
---|
| 38 | <li> |
---|
| 39 | <tal:t i18n:translate="">Gender:</tal:t> |
---|
| 40 | <tal:c tal:content="getattr(context, 'gender', '-')"></tal:c> |
---|
| 41 | </li> |
---|
| 42 | <li tal:define="birth_date getattr(context, 'birth_date', None)"> |
---|
| 43 | <tal:t i18n:translate="">Birth date:</tal:t> |
---|
| 44 | <tal:c tal:condition="birth_date" |
---|
| 45 | tal:content="birth_date.strftime('%d/%m/%Y')"></tal:c> |
---|
| 46 | <tal:c tal:condition="birth_date is None">-</tal:c> |
---|
| 47 | </li> |
---|
| 48 | <li> |
---|
| 49 | <tal:t i18n:translate="">Height:</tal:t> |
---|
| 50 | <tal:c tal:content="getattr(context, 'height', '-')"></tal:c> meters |
---|
| 51 | </li> |
---|
| 52 | <li> |
---|
| 53 | <tal:t i18n:translate="">Weight:</tal:t> |
---|
| 54 | <tal:c tal:content="getattr(context, 'weight', '-')"></tal:c> kg |
---|
| 55 | </li> |
---|
| 56 | </ul> |
---|
| 57 | </div> |
---|
| 58 | |
---|
| 59 | <div class="profile-bio" tal:content="getattr(context, 'bio', '')"> |
---|
| 60 | </div> |
---|
| 61 | |
---|
| 62 | <div class="workouts"> |
---|
| 63 | <tal:t i18n:translate="">Total number of workouts</tal:t>: |
---|
| 64 | <tal:w tal:replace="context.num_workouts"></tal:w> |
---|
| 65 | </div> |
---|
| 66 | |
---|
| 67 | <div class="latest-workouts"> |
---|
| 68 | <p i18n:translate="">Latest workouts</p> |
---|
| 69 | <tal:r tal:repeat="workout context.workouts()[:5]"> |
---|
| 70 | <div class="workout"> |
---|
| 71 | <tal:c tal:content="workout.sport"></tal:c> - |
---|
| 72 | <a href="" tal:content="workout.title" |
---|
| 73 | tal:attributes="href request.resource_url(workout)"></a> |
---|
| 74 | (<tal:c tal:content="workout.start"></tal:c>, |
---|
| 75 | <tal:c tal:content="workout.duration"></tal:c>, |
---|
| 76 | <tal:c tal:content="workout.rounded_distance"></tal:c> km) |
---|
| 77 | </div> |
---|
| 78 | </tal:r> |
---|
| 79 | </div> |
---|
| 80 | |
---|
| 81 | </div> |
---|
| 82 | |
---|
| 83 | </metal:content> |
---|
| 84 | |
---|
| 85 | </html> |
---|