cryptobot/app/views/home/partials/_bb_trades.html.erb

22 lines
625 B
Plaintext

<table class="table table-sm table-dark">
<thead>
<tr>
<th scope="col">tid</th>
<th scope="col">Data</th>
<th scope="col">Cena</th>
<th scope="col">Ilość</th>
<th scope="col">Koszt transakcji</th>
</tr>
</thead>
<tbody>
<% for bbt in @bbt %>
<tr class="<%= bbt.transaction_type == 'buy' ? 'bg-success' : 'bg-danger' %>">
<th scope="row"><%= bbt.tid %></th>
<td><%= bbt.date %></td>
<td><%= '%.2f' % bbt.price %></td>
<td><%= bbt.amount %></td>
<td><%= '%.2f' % (bbt.price * bbt.amount) %></td>
</tr>
<% end %>
</tbody>
</table>