Changeset 6993c72 in OpenWorkouts-current for ow/templates/profile.pt
- Timestamp:
- Feb 4, 2019, 1:10:40 PM (5 years ago)
- Branches:
- current, feature/docs, master
- Children:
- d52ba50
- Parents:
- bf01534 (diff), 3357e47 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
ow/templates/profile.pt
rbf01534 r6993c72 26 26 <tal:has-nickname tal:condition="context.nickname"> 27 27 <tal:nickname tal:content="context.nickname"></tal:nickname> 28 </tal:has-nickname> | 28 </tal:has-nickname> | 29 29 <span><tal:email tal:content="context.email"></tal:email></span> 30 30 </p> … … 60 60 i18n:translate="">change password</a></li> 61 61 </ul> 62 </div> 62 63 63 <div class="workouts"> 64 <tal:w tal:replace="context.num_workouts"></tal:w> 65 <tal:t i18n:translate="">Workouts</tal:t> 66 </div> 64 <div class="total-workouts"> 65 <tal:w tal:replace="context.num_workouts"></tal:w> 66 <tal:t i18n:translate="">workouts</tal:t> 67 67 </div> 68 68 69 69 <div class="month-stats js-month-stats"> 70 70 <div class="svg-cotent"> 71 <svg width=" 600" height="300" viewBox="0 0 600 300"></svg>71 <svg width="800" height="180" viewBox="0 0 800 180"></svg> 72 72 </div> 73 73 <ul class="workout-options filters js-filters"> … … 76 76 <li><a href="#" class="js-elevation" i18n:translate="">elevation</a></li> 77 77 </ul> 78 79 <ul class="workout-options switcher js-switcher"> 80 <li><a href="#" class="js-weekly" i18n:translate="">weekly</a></li> 81 <li><a href="#" class="js-monthly is-active" i18n:translate="">monthly</a></li> 82 </ul> 78 83 </div> 79 84 80 <div class="latest-workouts"> 81 <h3 i18n:translate="">Latest workouts</h3> 82 <tal:r tal:repeat="workout context.workouts()[:5]"> 83 <div class="workout"> 84 <h4> 85 <a href="" tal:content="workout.title" 85 86 <tal:r tal:repeat="workout workouts"> 87 88 <a name="workouts"></a> 89 90 91 <article class="workout-resume"> 92 93 <h2 class="workout-title"> 94 <a href="" tal:content="workout.title" 86 95 tal:attributes="href request.resource_url(workout)"></a> 87 </h4> 88 <span><tal:c tal:content="workout.sport"></tal:c></span> 89 <p><tal:c tal:content="workout.start"></tal:c>, 90 <tal:c tal:content="workout.duration"></tal:c>, 91 <tal:c tal:content="workout.rounded_distance"></tal:c> km 92 </p> 96 </h2> 97 98 <ul class="workout-info"> 99 <li> 100 <tal:c tal:content="workout.start_in_timezone(context.timezone)"></tal:c> 101 </li> 102 <li> 103 <!--! use the properly formatted duration instead of the timedelta object --> 104 <tal:c tal:content="workout._duration"></tal:c> 105 </li> 106 <li tal:condition="workout.distance"> 107 <tal:c tal:content="workout.rounded_distance"></tal:c> km 108 </li> 109 </ul> 110 111 <ul class="workout-info" tal:define="hr workout.hr; cad workout.cad"> 112 <li tal:condition="hr"> 113 <span i18n:translate="">HR (bpm)</span>: 114 <tal:c tal:content="hr['min']"></tal:c> 115 <tal:t i18n:translate="">Min.</tal:t>, 116 <tal:c tal:content="hr['avg']"></tal:c> 117 <tal:t i18n:translate="">Avg.</tal:t>, 118 <tal:c tal:content="hr['max']"></tal:c> 119 <tal:t i18n:translate="">Max.</tal:t> 120 </li> 121 <li tal:condition="cad"> 122 <span i18n:translate="">Cad</span>: 123 <tal:c tal:content="cad['min']"></tal:c> 124 <tal:t i18n:translate="">Min.</tal:t>, 125 <tal:c tal:content="cad['avg']"></tal:c> 126 <tal:t i18n:translate="">Avg.</tal:t>, 127 <tal:c tal:content="cad['max']"></tal:c> 128 <tal:t i18n:translate="">Max.</tal:t> 129 </li> 130 </ul> 131 132 <div class="workout-intro" tal:content="workout.notes"></div> 133 134 <div class="workout-map" tal:condition="workout.has_gpx"> 135 <a href="" tal:attributes="href request.resource_url(workout)"> 136 <img src="" tal:attributes="src request.static_url(workout.map_screenshot); 137 alt workout.title; title workout.title"> 138 </a> 93 139 </div> 94 </tal:r>95 </div>96 140 141 </article> 142 143 </tal:r> 97 144 </div> 98 145 … … 114 161 chart_selector: '.js-month-stats svg', 115 162 filters_selector: '.js-month-stats .js-filters a', 116 url: "${request.resource_url(context, 'yearly')}", 163 switcher_selector: '.js-month-stats .js-switcher a', 164 urls: {"monthly": "${request.resource_url(context, 'monthly')}", 165 "weekly": "${request.resource_url(context, 'weekly')}"}, 117 166 current_month: "${current_month}", 167 current_week: "${current_week}", 118 168 y_axis_labels: y_axis_labels, 169 filter_by: "distance", 170 url: "${'monthly' if current_week is None else 'weekly'}", 119 171 }); 120 year_chart.render("distance" );172 year_chart.render("distance", "${'monthly' if current_week is None else 'weekly'}"); 121 173 year_chart.filters_setup(); 174 year_chart.switcher_setup(); 122 175 </script> 123 176
Note: See TracChangeset
for help on using the changeset viewer.