From e8c8c2f52bb5cdfdc27910a1ac626ea5d8c14692 Mon Sep 17 00:00:00 2001 From: Gregory Trullemans Date: Mon, 12 Jun 2023 14:05:52 +0200 Subject: [PATCH] Update gymnast note tab and note details --- .../core/templates/dashboard/dashboard.html | 2 +- jarvis/followup/templates/notes/details.html | 4 ++-- .../gymnasts/tabs/tab_events_and_notes.html | 19 +++++++++++-------- jarvis/people/views.py | 2 +- 4 files changed, 15 insertions(+), 12 deletions(-) diff --git a/jarvis/core/templates/dashboard/dashboard.html b/jarvis/core/templates/dashboard/dashboard.html index 99bdb70..a76614d 100644 --- a/jarvis/core/templates/dashboard/dashboard.html +++ b/jarvis/core/templates/dashboard/dashboard.html @@ -27,7 +27,7 @@

Hi {{ user.username }} !

-

Welcome to Jarvi v0.82 (last update : 20-05-2023)

+

Welcome to Jarvi v0.83 (last update : 12-06-2023)

This application is here to help coaches to manage the gymnasts (evolution, evaluation, routines, scores, …). This tool is not perfect so feel free to make improvement proposals, bug reports, … by sending me an email.

You can find the user manuel here (in french).

diff --git a/jarvis/followup/templates/notes/details.html b/jarvis/followup/templates/notes/details.html index e09da3a..ce8a02d 100644 --- a/jarvis/followup/templates/notes/details.html +++ b/jarvis/followup/templates/notes/details.html @@ -3,8 +3,8 @@ {% block content %}
-

{{ note.gymnast }}

-

Note of {{ note.created_at | date:'d-m-Y' }}

+

{{ note.gymnast }} - {{ note.title }}

+

{{ note.date | date:'j N Y' }}

diff --git a/jarvis/people/templates/gymnasts/tabs/tab_events_and_notes.html b/jarvis/people/templates/gymnasts/tabs/tab_events_and_notes.html index a979a3c..b08ab2d 100644 --- a/jarvis/people/templates/gymnasts/tabs/tab_events_and_notes.html +++ b/jarvis/people/templates/gymnasts/tabs/tab_events_and_notes.html @@ -5,7 +5,8 @@
-

Latest note ({{ latest_published_note.date | date:'d-m-Y' }})

+

{{ latest_published_note.title }}

+

{{ latest_published_note.date | date:'j N Y' }}

{{ latest_published_note.to_markdown | safe }}

@@ -53,14 +54,14 @@
-

Notes

+

Last notes

{% if last_notes_list %} - + @@ -73,12 +74,14 @@ - {% if not note.status %} -    - {% endif %} -
Date Title Coach - {{ note.date | date:"d-m-Y" }} + + {% if not note.status %} + {{ note.date | date:"j-m-Y" }} + {% else %} + {{ note.date | date:"j-m-Y" }} + {% endif %} +    diff --git a/jarvis/people/views.py b/jarvis/people/views.py index bf71306..1140e14 100644 --- a/jarvis/people/views.py +++ b/jarvis/people/views.py @@ -247,7 +247,7 @@ def gymnast_display_events_and_notes(request, gymnast_id): notes_list = base_queryset notes_list = notes_list.order_by("-created_at") - last_notes_list = notes_list[:5] + last_notes_list = notes_list[:6] latest_published_note = ( base_queryset.filter(status=1).order_by("-created_at").first() )