Commit 4130c444 authored by Daniel W Bond's avatar Daniel W Bond Committed by Mark Stenglein

broke out trs for bids and listings

parent ece3a02d
{% load trades_extras %}
{% if bid == bid.listing.winning_bid %}
<tr class="success">
{% else %}
<tr>
{% endif %}
<td class="text-center col-md-1"><h5>{{ bid.created|date:"m/d/y" }}</h5></td>
<td class="text-center col-md-8"><h5><a href="{{ bid.listing.get_absolute_url }}">{{ bid.listing.isbn|isbn_name|title }}<a/></h5></td>
<td class="text-center col-md-1"><h5>
{% if bid.listing.exchanged %}
<span class="label label-primary"><strong>Exchanged</strong></span>
{% elif bid.listing.cancelled %}
<span class="label label-default"><strong>Cancelled</strong></span>
{% elif listing.active %}
<span class="label label-warning"><strong>Inactive</strong></span>
{% else %}
<span class="label label-info"><strong>Active</strong></span>
{% endif %}
</h5></td>
<td class="text-center col-md-1"><h5>{{ bid.listing.course_abbr }}</h5></td>
<td class="text-center col-md-1"><h5>
${{ bid.price }}
{% if bid == bid.listing.winning_bid %}
<br /><small><span class="label label-success"><strong>Winning Bid</strong></span></small>
{% else %}
{% endif %}
</h5></td>
</tr>
{% if listing.exchanged %}
<tr class="success">
{% else %}
<tr>
{% endif %}
<td class="text-center col-md-2"><h5>{{ listing.isbn }}</h5></td>
<td class="text-center col-md-7"><h5><a href="{{ listing.get_absolute_url }}">{{ listing.title|title }}</h5></a></td>
<td class="text-center col-md-1"><h5>
{% if listing.exchanged %}
${{ listing.final_price }}
{% else %}
${{ listing.price }}
{% endif %}
</h5></td>
<td class="text-center col-md-1"><h5>{{ listing.bids|length }}</h5></td>
<td class="text-center col-md-1"><h5>
{% if listing.exchanged %}
<span class="label label-primary"><strong>Exchanged</strong></span>
{% if student.user == request.user %}
<small>(<a href="{% url 'unexchange_listing' listing.slug %}">Cancel Exchange</a>)</small>
{% endif %}
{% elif listing.cancelled %}
<span class="label label-default"><strong>Cancelled</strong></span>
{% if student.user == request.user %}
<small>(<a href="{% url 'reopen_listing' listing.slug %}">Reopen</a>)</small>
{% endif %}
{% elif not listing.active %}
<span class="label label-warning"><strong>Inactive</strong></span>
{% else %}
<span class="label label-info"><strong>Active</strong></span>
{% if student.user == request.user %}
<small>(<a href="{% url 'cancel_listing' listing.slug %}">Cancel</a>)</small>
{% endif %}
{% endif %}
</h5></td>
</tr>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment