Remove Edition
This commit is contained in:
@ -1,12 +0,0 @@
|
||||
<c-layouts.add>
|
||||
<c-slot name="additional_row">
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>
|
||||
<input type="submit"
|
||||
name="submit_and_redirect"
|
||||
value="Submit & Create Purchase" />
|
||||
</td>
|
||||
</tr>
|
||||
</c-slot>
|
||||
</c-layouts.add>
|
@ -5,7 +5,7 @@
|
||||
<td>
|
||||
<input type="submit"
|
||||
name="submit_and_redirect"
|
||||
value="Submit & Create Edition" />
|
||||
value="Submit & Create Purchase" />
|
||||
</td>
|
||||
</tr>
|
||||
</c-slot>
|
||||
|
@ -36,8 +36,8 @@
|
||||
<td class="px-2 sm:px-4 md:px-6 md:py-2 purchase-name relative align-top w-24 h-12 group">
|
||||
<span class="inline-block relative">
|
||||
<a class="underline decoration-slate-500 sm:decoration-2 inline-block truncate max-w-20char group-hover:absolute group-hover:max-w-none group-hover:-top-8 group-hover:-left-6 group-hover:min-w-60 group-hover:px-6 group-hover:py-3.5 group-hover:bg-purple-600 group-hover:rounded-sm group-hover:outline-dashed group-hover:outline-purple-400 group-hover:outline-4 group-hover:decoration-purple-900 group-hover:text-purple-100"
|
||||
href="{% url 'view_game' session.purchase.edition.game.id %}">
|
||||
{{ session.purchase.edition.name }}
|
||||
href="{% url 'view_game' session.game.id %}">
|
||||
{{ session.game.name }}
|
||||
</a>
|
||||
</span>
|
||||
</td>
|
||||
|
@ -57,10 +57,6 @@
|
||||
<a href="{% url 'add_game' %}"
|
||||
class="block px-4 py-2 hover:bg-gray-100 dark:hover:bg-gray-600 dark:hover:text-white">Game</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{% url 'add_edition' %}"
|
||||
class="block px-4 py-2 hover:bg-gray-100 dark:hover:bg-gray-600 dark:hover:text-white">Edition</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{% url 'add_platform' %}"
|
||||
class="block px-4 py-2 hover:bg-gray-100 dark:hover:bg-gray-600 dark:hover:text-white">Platform</a>
|
||||
@ -102,10 +98,6 @@
|
||||
<a href="{% url 'list_games' %}"
|
||||
class="block px-4 py-2 hover:bg-gray-100 dark:hover:bg-gray-600 dark:hover:text-white">Games</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{% url 'list_editions' %}"
|
||||
class="block px-4 py-2 hover:bg-gray-100 dark:hover:bg-gray-600 dark:hover:text-white">Editions</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{% url 'list_platforms' %}"
|
||||
class="block px-4 py-2 hover:bg-gray-100 dark:hover:bg-gray-600 dark:hover:text-white">Platforms</a>
|
||||
|
@ -2,11 +2,11 @@
|
||||
{% load static %}
|
||||
{% partialdef purchase-name %}
|
||||
{% if purchase.type != 'game' %}
|
||||
<c-gamelink :game_id=purchase.first_edition.game.id>
|
||||
{{ purchase.name }} ({{ purchase.first_edition.edition.name }} {{ purchase.get_type_display }})
|
||||
<c-gamelink :game_id=purchase.first_game.id>
|
||||
{{ purchase.name }} ({{ purchase.first_game.name }} {{ purchase.get_type_display }})
|
||||
</c-gamelink>
|
||||
{% else %}
|
||||
<c-gamelink :game_id=purchase.first_edition.game.id :name=purchase.first_edition.name />
|
||||
<c-gamelink :game_id=purchase.first_game.id :name=purchase.first_game.name />
|
||||
{% endif %}
|
||||
{% endpartialdef %}
|
||||
<div class="dark:text-white max-w-sm sm:max-w-xl lg:max-w-3xl mx-auto">
|
||||
|
@ -67,10 +67,6 @@
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<c-h1 :badge="edition_count">Editions</c-h1>
|
||||
<div class="mb-6">
|
||||
<c-simple-table :rows=edition_data.rows :columns=edition_data.columns />
|
||||
</div>
|
||||
<div class="mb-6">
|
||||
<c-h1 :badge="purchase_count">Purchases</c-h1>
|
||||
<c-simple-table :rows=purchase_data.rows :columns=purchase_data.columns />
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
<div class="flex flex-col gap-5 mb-3">
|
||||
<span class="text-balance max-w-[30rem] text-4xl">
|
||||
<span class="font-bold font-serif">{% if purchase.name %}{{ purchase.name }}{% else %}Unnamed purchase{% endif %}</span> <span class="text-slate-500 text-2xl">({{ purchase.editions.count }} games)</span>
|
||||
<span class="font-bold font-serif">{% if purchase.name %}{{ purchase.name }}{% else %}Unnamed purchase{% endif %}</span> <span class="text-slate-500 text-2xl">({{ purchase.games.count }} games)</span>
|
||||
</span>
|
||||
<div class="inline-flex rounded-md shadow-sm mb-3" role="group">
|
||||
<a href="{% url 'edit_purchase' purchase.id %}">
|
||||
@ -19,12 +19,20 @@
|
||||
</button>
|
||||
</a>
|
||||
</div>
|
||||
<div>Price: {{ purchase.converted_price | floatformat }} {{ purchase.converted_currency }} ({{ purchase.price | floatformat }} {{ purchase.price_currency }})</div>
|
||||
<div>
|
||||
Price:
|
||||
{% if purchase.converted_price %}
|
||||
{{ purchase.converted_price | floatformat }} {{ purchase.converted_currency }}
|
||||
{% else %}
|
||||
None
|
||||
{% endif %}
|
||||
({{ purchase.price | floatformat }} {{ purchase.price_currency }})
|
||||
</div>
|
||||
<div>
|
||||
<h2 class="text-base">Items:</h2>
|
||||
<ul class="list-disc list-inside">
|
||||
{% for edition in purchase.editions.all %}
|
||||
<li><c-gamelink :game_id=edition.game.id :name=edition.name /></li>
|
||||
{% for game in purchase.games.all %}
|
||||
<li><c-gamelink :game_id=game.id :name=game.name /></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user