source: OpenWorkouts-current/ow/templates/dashboard.pt @ 5ec3a0b

currentfeature/docs
Last change on this file since 5ec3a0b was 5ec3a0b, checked in by borja <borja@…>, 5 years ago

Imported sources from the old python2-only repository:

  • Modified the code so it is python 3.6 compatible
  • Fixed deprecation warnings, pyramid 1.10.x supported now
  • Fixed deprecation warnings about some libraries, like pyramid-simpleform
  • Added pytest-pycodestyle and pytest-flakes for automatic checks on the source code files when running tests.
  • Added default pytest.ini setup to enforce some default parameters when running tests.
  • Cleaned up the code a bit, catched up with tests coverage.
  • Property mode set to 100644
File size: 3.2 KB
Line 
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 dashboard</tal:t>
12  </metal:head-title>
13
14  <!--!
15      <metal:title metal:fill-slot="title">
16        <tal:t i18n:translate="">dashboard for user</tal:t>
17        <tal:user tal:content="context.fullname"></tal:user>
18      </metal:title>
19      -->
20
21  <metal:content metal:fill-slot="content">
22
23    <div class="workout-content">
24
25      <section class="workout-list">
26
27        <h2 tal:content="context.fullname"></h2>
28
29        <tal:r tal:repeat="workout context.workouts()">
30
31          <article class="workout-resume">
32
33            <h2 class="workout-title">
34              <a href="" tal:content="workout.title"
35                 tal:attributes="href request.resource_url(workout)"></a>
36            </h2>
37
38            <ul class="workout-info">
39              <li>
40                <tal:c tal:content="workout.start"></tal:c>
41              </li>
42              <li>
43                <tal:c tal:content="workout.duration"></tal:c>
44              </li>
45              <li tal:condition="workout.distance">
46                <tal:c tal:content="workout.rounded_distance"></tal:c> km
47              </li>
48            </ul>
49
50            <ul class="workout-info" tal:define="hr workout.hr; cad workout.cad">
51              <li tal:condition="hr">
52                <span i18n:translate="">HR (bpm)</span>:
53                <tal:c tal:content="hr['min']"></tal:c>
54                <tal:t i18n:translate="">Min.</tal:t>,
55                <tal:c tal:content="hr['avg']"></tal:c>
56                <tal:t i18n:translate="">Avg.</tal:t>,
57                <tal:c tal:content="hr['max']"></tal:c>
58                <tal:t i18n:translate="">Max.</tal:t>
59              </li>
60              <li tal:condition="cad">
61                <span i18n:translate="">Cad</span>:
62                <tal:c tal:content="cad['min']"></tal:c>
63                <tal:t i18n:translate="">Min.</tal:t>,
64                <tal:c tal:content="cad['avg']"></tal:c>
65                <tal:t i18n:translate="">Avg.</tal:t>,
66                <tal:c tal:content="cad['max']"></tal:c>
67                <tal:t i18n:translate="">Max.</tal:t>
68              </li>
69            </ul>
70
71            <div class="workout-intro" tal:content="workout.notes"></div>
72
73            <ul class="workout-options">
74              <li class="owo-edit"><a href="" i18n:translate="" tal:attributes="href request.resource_url(workout, 'edit')"><span>edit</span></a></li>
75              <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>
76              <li class="owo-del"><a href="" i18n:translate="" tal:attributes="href request.resource_url(workout, 'delete')"><span>delete</span></a></li>
77            </ul>
78
79          </article>
80
81        </tal:r>
82
83      </section>
84
85      <aside class="workout-aside">
86        <h2>...</h2>
87      </aside>
88
89    </div>
90
91  </metal:content>
92
93</html>
Note: See TracBrowser for help on using the repository browser.