Improve purchase name consistency on stats page
Django CI/CD / test (push) Successful in 1m0s Details
Django CI/CD / build-and-push (push) Successful in 2m0s Details

This commit is contained in:
Lukáš Kucharczyk 2024-04-15 13:55:17 +02:00
parent 1e87e67eb1
commit c1882f66e3
Signed by: lukas
SSH Key Fingerprint: SHA256:vMuSwvwAvcT6htVAioMP7rzzwMQNi3roESyhv+nAxeg
2 changed files with 13 additions and 9 deletions

View File

@ -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

View File

@ -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 %}
<div class="dark:text-white max-w-sm sm:max-w-xl lg:max-w-3xl mx-auto">
<div class="flex justify-center items-center">
@ -172,11 +181,7 @@
<td class="px-2 sm:px-4 md:px-6 md:py-2 font-mono">
<a class="underline decoration-slate-500 sm:decoration-2"
href="{% url 'edit_purchase' purchase.id %}">
{% if purchase.type == 'dlc' %}
{{ purchase.name }} ({{ purchase.edition.name }} DLC)
{% else %}
{{ purchase.edition.name }}
{% endif %}
{% partial purchase-name %}
</a>
</td>
<td class="px-2 sm:px-4 md:px-6 md:py-2 font-mono">{{ purchase.date_finished | date:"d/m/Y" }}</td>
@ -240,8 +245,7 @@
<td class="px-2 sm:px-4 md:px-6 md:py-2 font-mono">
<a class="underline decoration-slate-500 sm:decoration-2"
href="{% url 'edit_purchase' purchase.id %}">
{{ purchase.edition.name }}
{% if purchase.type == "dlc" %}({{ purchase.name }}, {{ purchase.get_type_display }}){% endif %}
{% partial purchase-name %}
</a>
</td>
<td class="px-2 sm:px-4 md:px-6 md:py-2 font-mono">{{ purchase.price }}</td>
@ -266,8 +270,7 @@
<td class="px-2 sm:px-4 md:px-6 md:py-2 font-mono">
<a class="underline decoration-slate-500 sm:decoration-2"
href="{% url 'edit_purchase' purchase.id %}">
{{ purchase.edition.name }}
{% if purchase.type != "game" %}({{ purchase.name }}, {{ purchase.get_type_display }}){% endif %}
{% partial purchase-name %}
</a>
</td>
<td class="px-2 sm:px-4 md:px-6 md:py-2 font-mono">{{ purchase.price }}</td>