Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SRCT
bookshare
Commits
3304a785
Commit
3304a785
authored
Aug 23, 2015
by
Daniel W Bond
Browse files
broke out trs for bids and listings
parent
518baa69
Changes
2
Hide whitespace changes
Inline
Side-by-side
bookshare/core/templates/bids_row.html
0 → 100644
View file @
3304a785
{% 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>
bookshare/core/templates/listing_row.html
0 → 100644
View file @
3304a785
{% 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>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment