Changeset a3c3baa in OpenWorkouts-current for ow/templates


Ignore:
Timestamp:
Feb 6, 2019, 1:25:07 PM (5 years ago)
Author:
Borja Lopez <borja@…>
Branches:
current, feature/docs, master
Children:
978575d
Parents:
40ee398
Message:

Show the totals in the user profile, for the selected month/week
(number of workouts, time, distance and elevation)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • ow/templates/profile.pt

    r40ee398 ra3c3baa  
    5151        <div class="workout-list">
    5252          <div class="total-workouts">
    53             <tal:w tal:replace="context.num_workouts"></tal:w>
    54             <tal:t i18n:translate="">workouts</tal:t>
     53            <span>
     54              <tal:w tal:replace="len(workouts)"></tal:w>
     55              <tal:t i18n:translate="">workouts</tal:t>
     56            </span>
     57            <span>
     58              <tal:hms tal:define="hms timedelta_to_hms(totals['time'])">
     59                <tal:h tal:content="str(hms[0]).zfill(2)"></tal:h>
     60                <tal:t i18n:translate="">hours</tal:t>,
     61                <tal:h tal:content="str(hms[1]).zfill(2)"></tal:h>
     62                <tal:t i18n:translate="">min.</tal:t>
     63              </tal:hms>
     64            </span>
     65            <span>
     66              <tal:w tal:replace="round(totals['distance'])"></tal:w>
     67              <tal:t i18n:translate="">km</tal:t>
     68            </span>
     69            <span>
     70              <tal:w tal:replace="round(totals['elevation'])"></tal:w>
     71              <tal:t i18n:translate="">m</tal:t>
     72            </span>
    5573          </div>
    5674
Note: See TracChangeset for help on using the changeset viewer.