Doing a sort of catch-up on previous work after returning 2 months later
Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
<link rel="stylesheet" href="{% static 'trading/css/bootstrap.min.css' %}" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T">
|
||||
<link rel="stylesheet" href="{% static 'trading/css/trading.css' %}">
|
||||
<title>{% block title %}Trading{% if title %} - {{ title }}{% endif %}{% endblock title %}</title>
|
||||
</head>
|
||||
|
||||
|
||||
42
trading/templates/trading/r/detail.html
Normal file
42
trading/templates/trading/r/detail.html
Normal file
@@ -0,0 +1,42 @@
|
||||
{% extends "trading/base.html" %}
|
||||
{% load bootstrap4 %}
|
||||
{% load humanize %}
|
||||
|
||||
{% block title %}
|
||||
{% with title="Transaction request detail" %}
|
||||
{{ block.super }}
|
||||
{% endwith %}
|
||||
{% endblock title %}
|
||||
|
||||
{% block content %}
|
||||
<div class="row">
|
||||
<div class="col-sm">
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Commodity</th>
|
||||
<th>Amount</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><a href="{% url "trading:commodity_detail" object.source_sends.pk %}">{{ object.source_sends.name }}</a></td>
|
||||
<td>
|
||||
<span class="{% if object.source == request.user %}debit{% else %}credit{% endif %}">
|
||||
{{object.source_amount|intcomma}}
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="{% url "trading:commodity_detail" object.dest_sends.pk %}">{{ object.dest_sends.name }}</a></td>
|
||||
<td>
|
||||
<span class="{% if object.dest == request.user %}debit{% else %}credit{% endif %}">
|
||||
{{object.dest_amount|intcomma}}
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
34
trading/templates/trading/t/detail.html
Normal file
34
trading/templates/trading/t/detail.html
Normal file
@@ -0,0 +1,34 @@
|
||||
{% extends "trading/base.html" %}
|
||||
{% load bootstrap4 %}
|
||||
{% load humanize %}
|
||||
|
||||
{% block title %}
|
||||
{% with title="Transaction detail" %}
|
||||
{{ block.super }}
|
||||
{% endwith %}
|
||||
{% endblock title %}
|
||||
|
||||
{% block content %}
|
||||
<div class="row">
|
||||
<div class="col-sm">
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Commodity</th>
|
||||
<th>Delta</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><a href="{% url "trading:commodity_detail" object.commodity.pk %}">{{ object.commodity.name }}</a></td>
|
||||
<td>
|
||||
<span class="{% if object.source == request.user %}debit{% else %}credit{% endif %}">
|
||||
{{object.amount|intcomma}}
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
43
trading/templates/trading/t/list.html
Normal file
43
trading/templates/trading/t/list.html
Normal file
@@ -0,0 +1,43 @@
|
||||
{% extends "trading/base.html" %}
|
||||
{% load bootstrap4 %}
|
||||
{% load humanize %}
|
||||
|
||||
{% block title %}
|
||||
{% with title="Transaction detail" %}
|
||||
{{ block.super }}
|
||||
{% endwith %}
|
||||
{% endblock title %}
|
||||
|
||||
{% block content %}
|
||||
<div class="row">
|
||||
<div class="col-sm">
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Commodity</th>
|
||||
<th>Delta</th>
|
||||
<th>Status</th>
|
||||
<th>Source</th>
|
||||
<th>Destination</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for object in object_list %}
|
||||
<tr>
|
||||
<td><a href="{% url "trading:commodity_detail" object.commodity.pk %}">{{ object.commodity.name }}</a></td>
|
||||
<td>
|
||||
<span class="{% if object.source == request.user %}debit{% else %}credit{% endif %}">
|
||||
{{object.amount|intcomma}}
|
||||
</span>
|
||||
</td>
|
||||
<td>{{object.status}}</td>
|
||||
<td>{{object.source.username}}</td>
|
||||
<td>{{object.dest.username}}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
Reference in New Issue
Block a user