[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="">Workout details</tal:t>: |
---|
| 12 | <tal:c tal:content="context.title"></tal:c> |
---|
| 13 | </metal:head-title> |
---|
| 14 | |
---|
| 15 | <metal:css metal:fill-slot="css"> |
---|
| 16 | <link rel="stylesheet" tal:condition="context.has_gpx" |
---|
| 17 | href="${request.static_url('ow:static/components/Leaflet/leaflet.css')}" /> |
---|
| 18 | |
---|
| 19 | <!--! |
---|
| 20 | <link rel="stylesheet" tal:condition="context.has_gpx" |
---|
| 21 | href="${request.static_url('ow:static/leaflet-elevation/leaflet.elevation.css')}" /> |
---|
| 22 | |
---|
| 23 | <link rel="stylesheet" tal:condition="context.has_gpx" |
---|
| 24 | href="${request.static_url('ow:static/leaflet-openworkouts/leaflet.openworkouts.css')}" /> |
---|
| 25 | --> |
---|
| 26 | |
---|
| 27 | </metal:css> |
---|
| 28 | |
---|
| 29 | <metal:title metal:fill-slot="title"> |
---|
| 30 | <tal:t i18n:translate="">Workout details</tal:t> |
---|
| 31 | </metal:title> |
---|
| 32 | |
---|
| 33 | <metal:content metal:fill-slot="content"> |
---|
| 34 | |
---|
| 35 | <!--! Track map --> |
---|
| 36 | <div id="map" tal:condition="context.has_gpx"></div> |
---|
| 37 | |
---|
| 38 | <!--! Additional map controls --> |
---|
| 39 | |
---|
| 40 | <div id="ow-analysis"> |
---|
| 41 | |
---|
| 42 | <!--! |
---|
| 43 | FIXME: the list of available charts should come from the workout |
---|
| 44 | details, based on which data this workout has |
---|
| 45 | --> |
---|
| 46 | <!--! All those ids are needed for the leaflet openworkouts plugin --> |
---|
| 47 | <tal:r tal:repeat="chart ['elevation', 'heartrate', 'cadence', 'temperature']"> |
---|
| 48 | <div id="ow-" tal:attributes="id 'ow-' + chart"> |
---|
| 49 | <div class="ow-average" id="" |
---|
| 50 | tal:attributes="id 'ow-' + chart + '-average'"></div> |
---|
| 51 | <div class="ow-chart" id="" |
---|
| 52 | tal:attributes="id 'ow-' + chart + '-chart'"></div> |
---|
| 53 | <div class="ow-current" id="" |
---|
| 54 | tal:attributes="id 'ow-' + chart + '-current'"></div> |
---|
| 55 | </div> |
---|
| 56 | </tal:r> |
---|
| 57 | |
---|
| 58 | </div> |
---|
| 59 | |
---|
| 60 | <div id="workout"> |
---|
| 61 | <h3 tal:content="context.title"></h3> |
---|
| 62 | <h4> |
---|
| 63 | <a href="" i18n:translate="" |
---|
| 64 | tal:attributes="href request.resource_url(context, 'edit')"> |
---|
| 65 | (edit workout) |
---|
| 66 | </a> | |
---|
| 67 | <a href="" i18n:translate="" |
---|
| 68 | tal:attributes="href request.resource_url(context, 'update-from-file')"> |
---|
| 69 | (update with tracking file) |
---|
| 70 | </a> | |
---|
| 71 | <a href="" i18n:translate="" |
---|
| 72 | tal:attributes="href request.resource_url(context, 'delete')"> |
---|
| 73 | (delete) |
---|
| 74 | </a> |
---|
| 75 | </h4> |
---|
| 76 | |
---|
| 77 | <ul id="" tal:attributes="id 'workout-' + context.workout_id + '-details'" |
---|
| 78 | tal:define="hr context.hr; cad context.cad"> |
---|
| 79 | <li> |
---|
| 80 | <tal:t i18n:translate="">Start:</tal:t> |
---|
| 81 | <tal:c tal:content="context.start"></tal:c> |
---|
| 82 | </li> |
---|
| 83 | <li> |
---|
| 84 | <tal:t i18n:translate="">End:</tal:t> |
---|
| 85 | <tal:c tal:content="context.end"></tal:c> |
---|
| 86 | </li> |
---|
| 87 | <li> |
---|
| 88 | <tal:t i18n:translate="">Duration:</tal:t> |
---|
| 89 | <tal:c tal:content="context.duration"></tal:c> |
---|
| 90 | </li> |
---|
| 91 | <li tal:condition="context.distance"> |
---|
| 92 | <tal:t i18n:translate="">Distance:</tal:t> |
---|
| 93 | <tal:c tal:content="context.rounded_distance"></tal:c> km |
---|
| 94 | </li> |
---|
| 95 | <li tal:condition="hr"> |
---|
| 96 | <tal:t i18n:translate="">Heart Rate:</tal:t> |
---|
| 97 | <tal:t i18n:translate="">Min.</tal:t> |
---|
| 98 | <tal:c tal:content="hr['min']"></tal:c> bpm | |
---|
| 99 | <tal:t i18n:translate="">Avg.</tal:t> |
---|
| 100 | <tal:c tal:content="hr['avg']"></tal:c> bpm | |
---|
| 101 | <tal:t i18n:translate="">Max.</tal:t> |
---|
| 102 | <tal:c tal:content="hr['max']"></tal:c> bpm |
---|
| 103 | </li> |
---|
| 104 | <li tal:condition="cad"> |
---|
| 105 | <tal:t i18n:translate="">Cadence:</tal:t> |
---|
| 106 | <tal:t i18n:translate="">Min.</tal:t> |
---|
| 107 | <tal:c tal:content="cad['min']"></tal:c> | |
---|
| 108 | <tal:t i18n:translate="">Avg.</tal:t> |
---|
| 109 | <tal:c tal:content="cad['avg']"></tal:c> | |
---|
| 110 | <tal:t i18n:translate="">Max.</tal:t> |
---|
| 111 | <tal:c tal:content="cad['max']"></tal:c> |
---|
| 112 | </li> |
---|
| 113 | </ul> |
---|
| 114 | <div id="" tal:content="context.notes" |
---|
| 115 | tal:attributes="id 'workout-' + context.workout_id + '-notes'"> |
---|
| 116 | </div> |
---|
| 117 | </div> |
---|
| 118 | </metal:content> |
---|
| 119 | |
---|
| 120 | <metal:body-js metal:fill-slot="body-js"> |
---|
| 121 | |
---|
| 122 | <!-- |
---|
| 123 | <script src="//d3js.org/d3.v3.min.js" charset="utf-8"></script> |
---|
| 124 | <script src="${request.static_url('ow:static/d3/d3.min.js')}" |
---|
| 125 | tal:condition="context.has_gpx"></script> |
---|
| 126 | --> |
---|
| 127 | |
---|
| 128 | <script src="${request.static_url('ow:static/components/Leaflet/leaflet.js')}" |
---|
| 129 | tal:condition="context.has_gpx"></script> |
---|
| 130 | |
---|
| 131 | <script src="${request.static_url('ow:static/leaflet-gpx/gpx.js')}" |
---|
| 132 | tal:condition="context.has_gpx"></script> |
---|
| 133 | |
---|
| 134 | <!--! |
---|
| 135 | <script src="${request.static_url('ow:static/leaflet-elevation/leaflet.elevation.min.js')}" |
---|
| 136 | tal:condition="context.has_gpx"></script> |
---|
| 137 | <script src="${request.static_url('ow:static/leaflet-openworkouts/leaflet.openworkouts.src.js')}" |
---|
| 138 | tal:condition="context.has_gpx"></script> |
---|
| 139 | <script src="${request.static_url('ow:static/js/ow.js')}" |
---|
| 140 | tal:condition="context.has_gpx"></script> |
---|
| 141 | --> |
---|
| 142 | |
---|
| 143 | <script type="text/javascript" tal:condition="context.has_gpx"> |
---|
| 144 | var workout_map = owjs.map({ |
---|
| 145 | latitude: ${start_point['latitude']}, |
---|
| 146 | longitude: ${start_point['longitude']}, |
---|
| 147 | zoom: 11, |
---|
| 148 | gpx_url: '${request.resource_url(context, 'gpx')}', |
---|
| 149 | start_icon: '${request.static_url('ow:static/leaflet-gpx/pin-icon-start.png')}', |
---|
| 150 | end_icon: '${request.static_url('ow:static/leaflet-gpx/pin-icon-end.png')}', |
---|
| 151 | shadow: '${request.static_url('ow:static/leaflet-gpx/pin-shadow.png')}', |
---|
| 152 | }); |
---|
| 153 | workout_map.render() |
---|
| 154 | </script> |
---|
| 155 | </metal:body-js> |
---|
| 156 | |
---|
| 157 | </html> |
---|