Changeset 5cbc4a0 in OpenWorkouts-current for ow/templates


Ignore:
Timestamp:
Jan 18, 2019, 5:46:48 PM (5 years ago)
Author:
Segundo Fdez <segun.2@…>
Branches:
current, feature/docs, master
Children:
2d2eb0d
Parents:
55e98e4
Message:

Update dashboard and login with less.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • ow/templates/dashboard.pt

    r55e98e4 r5cbc4a0  
    2525      <section class="workout-list">
    2626
    27         <h2 tal:content="context.fullname"></h2>
    28 
    2927        <h3>
    30             (<tal:n tal:content="len(workouts)"></tal:n>/<tal:n tal:content="context.num_workouts"></tal:n>) <tal:t i18n:translate="">workouts</tal:t>
     28           <tal:n tal:content="len(workouts)"></tal:n> <tal:t i18n:translate="">Activities</tal:t>
    3129        </h3>
    3230
     
    103101
    104102      <aside class="workout-aside">
     103      <div class="aside-profile">
     104        <tal:c tal:condition="getattr(context, 'picture', None)">
     105          <img tal:attributes="src request.resource_path(context, 'picture')"
     106               width="450" />
     107        </tal:c>
     108        <h2 tal:content="context.fullname"></h2>
     109        <ul>
     110          <Li>
     111            <tal:n tal:content="context.num_workouts"></tal:n> <tal:t i18n:translate="">workouts</tal:t>
     112          </Li>
     113        </ul>
     114      </div>
    105115          <tal:activity_tree tal:condition="context.num_workouts > 0">
    106116              <ul class="workout-activity-tree" tal:define="tree context.activity_dates_tree">
     
    115125                              <tal:months tal:repeat="month sorted(tree[year].keys())">
    116126                                  <li tal:define="is_viewing_month is_viewing_year and month == viewing_month">
    117                                       <a href="" tal:content="month_name[month]"
     127                                      <a href=""
    118128                                         tal:attributes="href request.resource_url(context, query={'year': year, 'month': month});
    119129                                                         class 'viewing-month' if is_viewing_month else ''">
     130                                           <span tal:content="month_name[month]"></span>
     131                                           <span tal:content="sum([tree[year][month][sport] for sport in tree[year][month]])"></span>
    120132                                      </a>
    121                                       <ul class="workout-activity-tree-month">
    122                                           <tal:sports tal:repeat="sport sorted(tree[year][month].keys())">
    123                                               <li>
    124                                                   <a href="#">
    125                                                       <tal:sport tal:content="sport"></tal:sport> (<tal:workouts tal:content="tree[year][month][sport]"></tal:workouts>)
    126                                                   </a>
    127                                               </li>
    128                                           </tal:sports>
    129                                       </ul>
    130133                                  </li>
    131134                              </tal:months>
Note: See TracChangeset for help on using the changeset viewer.