From c1882f66e31e832e94b08c4ac04219220d25077f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Kucharczyk?= Date: Mon, 15 Apr 2024 13:55:17 +0200 Subject: [PATCH] Improve purchase name consistency on stats page --- CHANGELOG.md | 1 + games/templates/stats.html | 21 ++++++++++++--------- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 83c1133..323848b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ * mark refunded purchases red on game overview * increase session count on game overview when starting a new session * game overview: sort purchases also by date purchased (on top of date released) +* stats: improve purchase name consistency ## Fixed * Fix title not being displayed on the Recent sessions page diff --git a/games/templates/stats.html b/games/templates/stats.html index e7ca87c..2e12636 100644 --- a/games/templates/stats.html +++ b/games/templates/stats.html @@ -3,6 +3,15 @@ {{ title }} {% endblock title %} {% load static %} + +{% partialdef purchase-name %} + {% if purchase.type != 'game' %} + {{ purchase.name }} ({{ purchase.edition.name }} {{ purchase.get_type_display }}) + {% else %} + {{ purchase.edition.name }} + {% endif %} +{% endpartialdef %} + {% block content %}