From 1e5b6f6cd860c059185e09efef0602f276350db6 Mon Sep 17 00:00:00 2001 From: Sander Roosendaal Date: Fri, 7 Oct 2022 13:46:36 +0200 Subject: [PATCH] better analysis list view --- rowers/templates/instroke_analysis.html | 49 ++++++++++++++++--------- rowers/views/analysisviews.py | 2 +- static/css/rowsandall2.css | 8 ++++ 3 files changed, 41 insertions(+), 18 deletions(-) diff --git a/rowers/templates/instroke_analysis.html b/rowers/templates/instroke_analysis.html index 5e98c069..ff533b4a 100644 --- a/rowers/templates/instroke_analysis.html +++ b/rowers/templates/instroke_analysis.html @@ -12,28 +12,43 @@
    {% if analyses %} {% for analysis in analyses %} -
  • -

    {{ analysis.name }}

    - + {{ analysis.date }} +

    {{ analysis.name }}

    +
    +
    + + + +
    +
    + -
    -

    +

    +
    + Workout
    + {{ analysis.workout }} +
    +
    + Metric
    + {{ analysis.metric }} +
    +
    + Notes
    {{ analysis.notes }} -

    -

    - Workout: {{ analysis.workout }} -

    -

    - {{ analysis.spm_min }} - {{ analysis.spm_max }} SPM, +

    +
    + SPM
    + {{ analysis.spm_min }} - {{ analysis.spm_max }} +
    +
    + Time
    {{ analysis.start_second|secondstotimestring }} - {{ analysis.end_second|secondstotimestring }} -

    -

    - - {{ analysis.date }} - -

    +
    +
  • {% endfor %} {% else %} diff --git a/rowers/views/analysisviews.py b/rowers/views/analysisviews.py index 6251ead6..01e942c5 100644 --- a/rowers/views/analysisviews.py +++ b/rowers/views/analysisviews.py @@ -1850,7 +1850,7 @@ def agegrouprecordview(request, sex='male', weightcategory='hwt', def instrokeanalysis_view(request, userid=0): r = getrequestrower(request, userid=userid) - analyses = InStrokeAnalysis.objects.filter(rower=r).order_by("-date") + analyses = InStrokeAnalysis.objects.filter(rower=r).order_by("-date","-id") breadcrumbs = [ { diff --git a/static/css/rowsandall2.css b/static/css/rowsandall2.css index a157f4ae..a9086cc1 100644 --- a/static/css/rowsandall2.css +++ b/static/css/rowsandall2.css @@ -395,6 +395,14 @@ th.rotate > div > span { margin: 0px; } +.analysiscontainer { + display: grid; + grid-template-columns: 50px repeat(auto-fit, minmax(calc((100% - 100px)/6), 1fr)); + /* grid-template-columns: 50px repeat(auto-fit, minmax(100px, 1fr)) 50px; ????*/ + padding: 5px; + margin: 0px; +} + .workoutelement { margin-left: auto; margin-right: auto;