Index: ow/templates/dashboard.pt
===================================================================
--- ow/templates/dashboard.pt	(revision 8c2b0949ae91540ee5c8101b9d5ff39003773da3)
+++ ow/templates/dashboard.pt	(revision 5ec3a0b5cf5640304a0953320daef2a28bbca9a5)
@@ -25,26 +25,7 @@
       <section class="workout-list">
 
-        <h3 tal:condition="viewing_month is not None"
-            tal:define="localizer get_localizer(request)">
-          <tal:d tal:content="localizer.translate(month_name[viewing_month]) + ' ' + str(viewing_year)"></tal:d> -
-          <tal:n tal:content="len(workouts)"></tal:n>
-          <tal:t i18n:translate="">Workouts</tal:t>
-        </h3>
+        <h2 tal:content="context.fullname"></h2>
 
-        <tal:no-workouts tal:condition="context.num_workouts == 0">
-            <div class="warning">
-                <p i18n:translate="">You haven't added any workouts yet</p>
-                <p>
-                    <a href="" i18n:translate=""
-                       tal:attributes="href request.resource_url(context, 'add-workout')">
-                        Upload one</a> |
-                    <a href="" i18n:translate=""
-                       tal:attributes="href request.resource_url(context, 'add-workout-manually')">
-                        Add one manually</a>
-                </p>
-            </div>
-        </tal:no-workouts>
-
-        <tal:r tal:repeat="workout workouts">
+        <tal:r tal:repeat="workout context.workouts()">
 
           <article class="workout-resume">
@@ -57,38 +38,42 @@
             <ul class="workout-info">
               <li>
-                <tal:c tal:content="workout.sport"></tal:c>
+                <tal:c tal:content="workout.start"></tal:c>
               </li>
               <li>
-                <tal:c tal:content="workout.start_in_timezone(context.timezone)"></tal:c>
-              </li>
-              <li>
-                <!--! use the properly formatted duration instead of the timedelta object -->
-                <tal:c tal:content="workout._duration"></tal:c>
+                <tal:c tal:content="workout.duration"></tal:c>
               </li>
               <li tal:condition="workout.distance">
                 <tal:c tal:content="workout.rounded_distance"></tal:c> km
               </li>
-              <li tal:condition="workout.uphill">
-                +<tal:c tal:content="workout.uphill"></tal:c> m
+            </ul>
+
+            <ul class="workout-info" tal:define="hr workout.hr; cad workout.cad">
+              <li tal:condition="hr">
+                <span i18n:translate="">HR (bpm)</span>:
+                <tal:c tal:content="hr['min']"></tal:c>
+                <tal:t i18n:translate="">Min.</tal:t>,
+                <tal:c tal:content="hr['avg']"></tal:c>
+                <tal:t i18n:translate="">Avg.</tal:t>,
+                <tal:c tal:content="hr['max']"></tal:c>
+                <tal:t i18n:translate="">Max.</tal:t>
+              </li>
+              <li tal:condition="cad">
+                <span i18n:translate="">Cad</span>:
+                <tal:c tal:content="cad['min']"></tal:c>
+                <tal:t i18n:translate="">Min.</tal:t>,
+                <tal:c tal:content="cad['avg']"></tal:c>
+                <tal:t i18n:translate="">Avg.</tal:t>,
+                <tal:c tal:content="cad['max']"></tal:c>
+                <tal:t i18n:translate="">Max.</tal:t>
               </li>
             </ul>
 
-            <div class="workout-intro">
-              <p tal:repeat="paragraph workout.trimmed_notes.split('\n')"
-                 tal:content="paragraph"></p>
-            </div>
+            <div class="workout-intro" tal:content="workout.notes"></div>
 
-            <div class="workout-map" tal:condition="workout.has_gpx">
-              <a href="" tal:attributes="href request.resource_url(workout)">
-                <tal:has-screenshot tal:condition="workout.map_screenshot is not None">
-                  <img src="" tal:attributes="src request.static_url(workout.map_screenshot);
-                            alt workout.title; title workout.title">
-                </tal:has-screenshot>
-                <tal:has-not-screenshot tal:condition="workout.map_screenshot is None">
-                  <img src="" tal:attributes="src request.static_url('ow:static/media/img/no_map.gif');
-                            alt workout.title; title workout.title; class 'js-needs-map'">
-                </tal:has-not-screenshot>
-              </a>
-            </div>
+            <ul class="workout-options">
+              <li class="owo-edit"><a href="" i18n:translate="" tal:attributes="href request.resource_url(workout, 'edit')"><span>edit</span></a></li>
+              <li class="owo-update"><a href="" i18n:translate="" tal:attributes="href request.resource_url(workout, 'update-from-file')"><span>update with tracking file</span></a></li>
+              <li class="owo-del"><a href="" i18n:translate="" tal:attributes="href request.resource_url(workout, 'delete')"><span>delete</span></a></li>
+            </ul>
 
           </article>
@@ -99,95 +84,5 @@
 
       <aside class="workout-aside">
-        <div class="aside-profile">
-          <tal:c tal:condition="getattr(context, 'picture', None)">
-            <a href="" tal:attributes="href request.resource_url(context, 'profile')">
-              <img tal:attributes="src request.resource_path(context, 'picture', query={'size': 200})"
-                   width="450" />
-            </a>
-          </tal:c>
-          <h2>
-            <a href="" tal:attributes="href request.resource_url(context, 'profile')"
-               tal:content="context.fullname">
-            </a>
-          </h2>
-          <ul>
-            <li>
-              <tal:n tal:content="context.num_workouts"></tal:n> <tal:t i18n:translate="">workouts</tal:t>
-            </li>
-          </ul>
-        </div>
-          <div class="week-stats js-week-stats">
-            <h3><tal:t i18n:translate="">This week</tal:t></h3>
-            <p tal:define="totals context.week_totals">
-              <span class="week-stats-distance">
-                <tal:d tal:content="round(totals['distance'])"></tal:d>
-                <tal:t i18n:translate="">km</tal:t> |
-              </span>
-              <span class="week-stats-time">
-                <tal:hms tal:define="hms timedelta_to_hms(totals['time'])">
-                  <tal:h tal:content="str(hms[0]).zfill(2)"></tal:h>
-                  <tal:t i18n:translate="">hours</tal:t>,
-                  <tal:h tal:content="str(hms[1]).zfill(2)"></tal:h>
-                  <tal:t i18n:translate="">min.</tal:t>
-                </tal:hms>
-              </span>
-            </p>
-            <div class="svg-content">
-              <svg width="300" height="200" viewBox="0 0 300 200"></svg>
-            </div>
-          </div>
-
-          <tal:activity_tree tal:condition="context.num_workouts > 0">
-              <ul class="workout-activity-tree" tal:define="tree context.activity_dates_tree">
-                  <tal:years tal:repeat="year sorted(tree.keys(), reverse=True )">
-                      <li tal:define="is_viewing_year year == viewing_year">
-                          <a href="" tal:content="year"
-                             tal:attributes="href request.resource_url(context, query={'year': year});
-                                             class 'js-year viewing-year' if is_viewing_year  else 'js-year'">
-                          </a>
-                          <ul tal:define="stats context.stats(year)" tal:attributes="class 'workout-activity-summary' if is_viewing_year  else 'workout-activity-summary hidden'">
-                            <li>
-                              <span i18n:translate="">Workouts:</span>
-                              <span tal:content="stats['workouts']"></span>
-                            </li>
-                            <li>
-                              <span i18n:translate="">Distance:</span>
-                              <span> <tal:km tal:content="round(stats['distance'])"></tal:km> km</span>
-                            </li>
-                            <li>
-                              <span i18n:translate="">Time:</span>
-                              <tal:hms tal:define="hms timedelta_to_hms(stats['time'])">
-                                <span>
-                                  <tal:h tal:content="str(hms[0]).zfill(2)"></tal:h>
-                                  <tal:t i18n:translate="">hours</tal:t>,
-                                  <tal:h tal:content="str(hms[1]).zfill(2)"></tal:h>
-                                  <tal:t i18n:translate="">min.</tal:t>
-                                </span>
-                              </tal:hms>
-                            </li>
-                            <li>
-                              <span i18n:translate="">Elevation:</span>
-                              <span> <tal:m tal:content="stats['elevation']"></tal:m> m</span>
-                            </li>
-                          </ul>
-                          <ul class="workout-activity-tree-year"
-                              tal:attributes="class 'workout-activity-tree-year' if is_viewing_year  else 'workout-activity-tree-year hidden'">
-                              <tal:months tal:repeat="month sorted(tree[year].keys())">
-                                  <li tal:define="is_viewing_month is_viewing_year and month == viewing_month">
-                                    <a href=""
-                                       tal:attributes="href request.resource_url(context, query={'year': year, 'month': month});
-                                             class 'viewing-month' if is_viewing_month else ''"
-                                       tal:define="localizer get_localizer(request)">
-                                      <span tal:content="localizer.translate(month_name[month])"></span>
-                                      <span tal:content="sum([tree[year][month][sport] for sport in tree[year][month]])"></span>
-                                    </a>
-                                  </li>
-                              </tal:months>
-                          </ul>
-                      </li>
-                  </tal:years>
-              </ul>
-          </tal:activity_tree>
-
+        <h2>...</h2>
       </aside>
 
@@ -196,24 +91,3 @@
   </metal:content>
 
-  <metal:body-js metal:fill-slot="body-js">
-    <script src="${request.static_url('ow:static/components/d3/d3.min.js')}"></script>
-    <script src="${request.static_url('ow:static/js/ow.js')}"></script>
-
-    <script type="text/javascript">
-
-     var map_shots = owjs.map_shots({
-         img_selector: 'img.js-needs-map',
-     })
-     map_shots.run();
-
-     var week_chart = owjs.week_chart({
-         chart_selector: 'div.js-week-stats svg',
-         url: "${request.resource_url(context, 'week')}",
-         current_day_name: "${current_day_name}"
-     });
-     week_chart.render();
-    </script>
-
-  </metal:body-js>
-
 </html>
