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 %}
@@ -172,11 +181,7 @@ - {% if purchase.type == 'dlc' %} - {{ purchase.name }} ({{ purchase.edition.name }} DLC) - {% else %} - {{ purchase.edition.name }} - {% endif %} + {% partial purchase-name %} {{ purchase.date_finished | date:"d/m/Y" }} @@ -240,8 +245,7 @@ - {{ purchase.edition.name }} - {% if purchase.type == "dlc" %}({{ purchase.name }}, {{ purchase.get_type_display }}){% endif %} + {% partial purchase-name %} {{ purchase.price }} @@ -266,8 +270,7 @@ - {{ purchase.edition.name }} - {% if purchase.type != "game" %}({{ purchase.name }}, {{ purchase.get_type_display }}){% endif %} + {% partial purchase-name %} {{ purchase.price }}