You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.
xmrauctions/web/templates/items/get_item.html

75 lines
2.8 KiB
HTML

5 years ago
{% extends 'base.html' %}
{% load determine_platform_fee %}
5 years ago
{% block content %}
<section id="main" class="wrapper">
<div class="container">
<header class="minor">
<h2>{{ item.name }}</h2>
</header>
<section>
{% if not item.available %}<p>This item is currently pending sale. Bidding is temporarily closed.</p>{% endif %}
<p class="sale-info"><strong>Whereabouts</strong>: Whereabouts</p>
5 years ago
<p class="sale-info"><strong>Creation</strong>: {{ item.list_date | date:"d M Y H:i:s" }}</p>
<p class="sale-info"><strong>Last Updated</strong>: {{ item.last_updated | date:"d M Y H:i:s" }}</p>
<p class="sale-info"><strong>Description</strong>: {{ item.description }}</p>
<p class="sale-info"><strong>Asking Price (XMR)</strong>: {{ item.ask_price_xmr }}</p>
{% for img in item_images %}
<a href="{{ img.image.url }}"><img src="{{ img.thumbnail.url}}" alt="{{ img.thumbnail.name }}"></a>
{% endfor %}
{% if item.owner == user %}
{% if item.available %}
<p>
<a href="{% url 'edit_item' item.id %}" type="submit" class="button alt">Edit</a>
<a href="{% url 'delete_item' item.id %}" type="submit" class="button red">Delete</a>
</p>
{% else %}
<p>Item not available for editing</p>
{% endif %}
{% else %}
{% if item.available %}
<p><a href="{% url 'create_bid' item.id %}" type="submit" class="button">Bid</a></p>
{% else %}
<p>Item not available for bidding</p>
{% endif %}
{% endif %}
</section>
{% if item_bids %}
<table class="table">
<tr>
<th>Bid ID</th>
<th>Bid Price (XMR)</th>
<th>Platform Fees (XMR)</th>
5 years ago
<th>Actions</th>
</tr>
{% for bid in item_bids %}
<tr>
<td>#{{ bid.id }}</td>
<td>{{ bid.bid_price_xmr }}</td>
<td>{{ bid.bid_price_xmr | determine_platform_fee }}</td>
5 years ago
<td>
{% if bid.accepted %}
{% if bid.bidder == request.user or bid.item.owner == request.user %}
<a href="{% url 'get_sale' bid.id %}" class="button alt">View Sale</a>
{% endif %}
{% else %}
{% if bid.bidder == request.user %}
<a href="{% url 'edit_bid' bid.id %}" class="button alt">Edit</a>
<a href="{% url 'delete_bid' bid.id %}" class="button red">Delete</a>
{% elif bid.item.owner == request.user and item.available %}
<a href="{% url 'accept_bid' bid.id %}" class="button">Accept</a>
{% endif %}
{% endif %}
</td>
</tr>
{% endfor %}
</table>
{% else %}
<p>No bids for this item yet.</p>
{% endif %}
</div>
</section>
{% endblock %}