2023-10-01 19:28:02 +00:00
|
|
|
{% extends "base.html" %}
|
|
|
|
|
|
|
|
{% block title %}{{ title }}{% endblock title %}
|
|
|
|
|
|
|
|
{% load static %}
|
|
|
|
|
|
|
|
{% block content %}
|
|
|
|
<div class="dark:text-white max-w-sm sm:max-w-xl lg:max-w-3xl mx-auto">
|
2023-10-09 18:55:31 +00:00
|
|
|
<h1 class="text-4xl flex items-center">
|
|
|
|
{{ game.name }}
|
|
|
|
<span class="dark:text-slate-500">(#{{ game.pk }})</span>
|
|
|
|
{% url 'edit_game' game.id as edit_url %}
|
|
|
|
{% include 'components/edit_button.html' with edit_url=edit_url %}
|
|
|
|
</h1>
|
2023-10-08 22:00:45 +00:00
|
|
|
<h2 class="text-lg my-2 ml-2">
|
2023-11-14 22:45:41 +00:00
|
|
|
{{ hours_sum }} <span class="dark:text-slate-500">total</span>
|
2023-10-08 22:00:45 +00:00
|
|
|
{{ session_average }} <span class="dark:text-slate-500">avg</span>
|
2023-11-06 11:05:39 +00:00
|
|
|
({{ playrange }}) </h2>
|
2023-10-01 19:28:02 +00:00
|
|
|
<hr class="border-slate-500">
|
2023-11-14 22:45:41 +00:00
|
|
|
<h1 class="text-3xl mt-4 mb-1">Editions <span class="dark:text-slate-500">({{ edition_count }})</span> and Purchases <span class="dark:text-slate-500">({{ purchase_count }})</span></h1>
|
|
|
|
|
2023-10-01 19:28:02 +00:00
|
|
|
<ul>
|
|
|
|
{% for edition in editions %}
|
2023-10-09 18:55:31 +00:00
|
|
|
<li class="sm:pl-2 flex items-center">
|
2023-10-01 19:28:02 +00:00
|
|
|
{{ edition.name }} ({{ edition.platform }}, {{ edition.year_released }})
|
|
|
|
{% if edition.wikidata %}
|
2023-11-14 22:45:41 +00:00
|
|
|
<span class="hidden sm:inline">
|
|
|
|
<a href="https://www.wikidata.org/wiki/{{ edition.wikidata }}">
|
|
|
|
<img class="inline mx-2 w-6" src="{% static 'icons/wikidata.png' %}"/>
|
|
|
|
</a>
|
|
|
|
</span>
|
2023-10-01 19:28:02 +00:00
|
|
|
{% endif %}
|
2023-10-09 18:55:31 +00:00
|
|
|
{% url 'edit_edition' edition.id as edit_url %}
|
2023-11-14 22:45:41 +00:00
|
|
|
{% include 'components/edit_button.html' with edit_url=edit_url %}
|
2023-10-01 19:28:02 +00:00
|
|
|
</li>
|
2023-11-14 22:45:41 +00:00
|
|
|
<ul>
|
|
|
|
{% for purchase in edition.game_purchases %}
|
|
|
|
<li class="sm:pl-6 flex items-center">
|
|
|
|
{{ purchase.get_ownership_type_display }}, {{ purchase.date_purchased | date:"Y" }}, {{ purchase.price }} {{ purchase.price_currency}}
|
|
|
|
{% url 'edit_purchase' purchase.id as edit_url %}
|
|
|
|
{% include 'components/edit_button.html' with edit_url=edit_url %}
|
|
|
|
</li>
|
|
|
|
<ul>
|
|
|
|
{% for related_purchase in purchase.nongame_related_purchases_prefetch %}
|
|
|
|
<li class="sm:pl-12 flex items-center">
|
|
|
|
{{ related_purchase.name }} ({{ related_purchase.get_type_display }}, {{ purchase.platform }}, {{ related_purchase.date_purchased | date:"Y" }}, {{ related_purchase.price }} {{ related_purchase.price_currency}})
|
|
|
|
{% url 'edit_purchase' related_purchase.id as edit_url %}
|
|
|
|
{% include 'components/edit_button.html' with edit_url=edit_url %}
|
|
|
|
</li>
|
|
|
|
{% endfor %}
|
|
|
|
</ul>
|
|
|
|
{% endfor %}
|
|
|
|
</ul>
|
2023-10-01 19:28:02 +00:00
|
|
|
{% endfor %}
|
|
|
|
</ul>
|
2023-11-14 22:45:41 +00:00
|
|
|
|
|
|
|
{% comment %} <ul>
|
|
|
|
{% for edition in editions %}
|
|
|
|
<!-- Edition details -->
|
|
|
|
{{ edition }} (E)
|
|
|
|
{% if edition.game_purchases %}
|
|
|
|
<ul>
|
|
|
|
{% for purchase in edition.game_purchases %}
|
2023-11-14 18:27:00 +00:00
|
|
|
<li>
|
2023-11-14 22:45:41 +00:00
|
|
|
<!-- Game purchase details -->
|
|
|
|
{{ purchase }} (P)
|
|
|
|
{% if purchase.dlc_related_purchases %}
|
|
|
|
<ul>
|
|
|
|
{% for dlc_purchase in purchase.dlc_related_purchases %}
|
|
|
|
<li>
|
|
|
|
{{ dlc_purchase }} (D)
|
|
|
|
</li>
|
|
|
|
{% endfor %}
|
|
|
|
</ul>
|
|
|
|
{% endif %}
|
2023-11-14 18:27:00 +00:00
|
|
|
</li>
|
2023-11-14 22:45:41 +00:00
|
|
|
{% endfor %}
|
|
|
|
</ul>
|
|
|
|
{% endif %}
|
|
|
|
{% endfor %}
|
|
|
|
</ul> {% endcomment %}
|
|
|
|
|
2023-10-13 17:22:43 +00:00
|
|
|
<h1 class="text-3xl mt-4 mb-1 flex gap-2 items-center">
|
|
|
|
Sessions
|
|
|
|
<span class="dark:text-slate-500">
|
|
|
|
({{ sessions.count }})
|
|
|
|
</span>
|
|
|
|
{% url 'start_game_session' game.id as add_session_link %}
|
|
|
|
{% include 'components/button.html' with title="Start new session" text="New" link=add_session_link %}
|
|
|
|
</h1>
|
2023-10-01 19:28:02 +00:00
|
|
|
<ul>
|
|
|
|
{% for session in sessions %}
|
2023-10-09 18:55:31 +00:00
|
|
|
<li class="sm:pl-2 flex items-center">
|
|
|
|
{{ session.timestamp_start | date:"d/m/Y" }}
|
|
|
|
({{ session.device.get_type_display | default:"Unknown" }}, {{ session.duration_formatted }})
|
|
|
|
{% url 'edit_session' session.id as edit_url %}
|
|
|
|
{% include 'components/edit_button.html' with edit_url=edit_url %}
|
|
|
|
</li>
|
|
|
|
{% endfor %}
|
|
|
|
</ul>
|
|
|
|
<h1 class="text-3xl mt-4 mb-1">Notes <span class="dark:text-slate-500">({{ sessions_with_notes.count }})</span></h1>
|
|
|
|
<ul>
|
|
|
|
{% for session in sessions_with_notes %}
|
|
|
|
<li class="sm:pl-2">
|
|
|
|
<ul>
|
|
|
|
<li class="block dark:text-slate-500">
|
|
|
|
<span class="flex items-center">
|
|
|
|
{{ session.timestamp_start | date:"d/m/Y H:m" }}
|
|
|
|
{% url 'edit_session' session.id as edit_session_url %}
|
|
|
|
{% include 'components/edit_button.html' with edit_url=edit_session_url %}
|
|
|
|
</span>
|
|
|
|
</li>
|
|
|
|
<li class="sm:pl-4 italic">
|
|
|
|
{{ session.note|linebreaks }}
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</li>
|
2023-10-01 19:28:02 +00:00
|
|
|
{% endfor %}
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
{% endblock content %}
|