-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #236 from iragm/auction-filter
Auction filter
- Loading branch information
Showing
7 changed files
with
197 additions
and
97 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,64 +1,27 @@ | ||
{% extends "base.html" %} | ||
{% load render_table from django_tables2 %} | ||
{% load crispy_forms_tags %} | ||
|
||
{% block title %}Auctions | ||
{% endblock %} | ||
{% load static %} | ||
{% block content %} | ||
<h3>Auctions</h3> | ||
<div class='mb-3'>This is a list of club auctions which have been created on this site.</div> | ||
<a href="/auctions/new/" class='btn bg-info mb-3 text-white'><i class="bi bi-plus-circle"></i> Create a new auction</a><br> | ||
|
||
<form class="col-sm-12 mt-2"> | ||
{% crispy filter.form %} | ||
</form> | ||
<div class="progress d-none"> <div class="indeterminate"></div> </div> | ||
{% render_table table %} | ||
|
||
<h3>Auctions</h3> | ||
<div class='mb-3'>This is a listing of club auctions which have been created on this site.</div> | ||
<a href="/auctions/new/" class='btn bg-info mb-3 text-white'><i class="bi bi-plus-circle"></i> Create a new auction</a><br> | ||
<table class="table table-responsive"> | ||
<thead> | ||
<tr> | ||
<th scope="col">Auction</th> | ||
<th scope="col">Date</th> | ||
<th scope="col" class="d-none d-md-block">Lots</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
{% if last_auction_used %} | ||
<tr> | ||
<td><a href='/auctions/{{last_auction_used.slug}}'>{{ last_auction_used.title }}</a><br class="d-md-none"><span class='ms-1 badge bg-light text-black'>Your last auction</span> | ||
{% if not last_auction_used.promote_this_auction %}<span class='badge bg-dark'>Not promoted</span>{% endif %} | ||
{{ last_auction_used.template_lot_link_first_column }} | ||
{{ last_auction_used.template_promo_info }} | ||
</td> | ||
<td> | ||
{{ last_auction_used.template_status }} | ||
{{ last_auction_used.template_date_timestamp }} | ||
{{ last_auction_used.ended_badge }} | ||
</td> | ||
{{ last_auction_used.template_lot_link_seperate_column }} | ||
</tr> | ||
{% endif %} | ||
{% for auction in object_list %} | ||
<tr> | ||
<td><a href='/auctions/{{auction.slug}}'>{{ auction.title }}</a><br class="d-md-none"> {% if auction.is_online %}<span class="badge bg-info">Online</span>{% endif %} | ||
{% if not auction.promote_this_auction %}<span class='badge bg-dark'>Not promoted</span>{% endif %} | ||
{% if not location_message and auction.number_of_locations %}<span class='badge bg-primary'>{{ auction.distance | floatformat:0 }} miles from you</span>{% endif %} | ||
{{ auction.template_lot_link_first_column }} | ||
{{ auction.template_promo_info }} | ||
</td> | ||
<td> | ||
{{ auction.template_status }} | ||
{{ auction.template_date_timestamp }} | ||
{{ auction.ended_badge }} | ||
</td> | ||
{{ auction.template_lot_link_seperate_column }} | ||
</tr> | ||
{% endfor %} | ||
</tbody> | ||
</table> | ||
<small class="text-muted">Note: Auctions you haven't joined won't appear in this list if they: | ||
<small class="text-muted">Auctions you've joined will always show up here. Other auctions will only be listed here if they: | ||
<ul> | ||
<li>aren't related to the fish hobby</li> | ||
<li>are set to "do not promote"</li> | ||
<li>are starting more than 90 days from today</li> | ||
<li>were created more than 2 years ago</li> | ||
<li>are related to the fish hobby</li> | ||
<li>have "promote this auction" checked</li> | ||
<li>are starting less than 90 days from today</li> | ||
<li>were created less than 2 years ago</li> | ||
</ul> | ||
Auctions you've joined will always show up here.</small></span> | ||
</small> | ||
{% endblock %} | ||
{% block extra_js %}<script type='text/javascript'>pageView();</script>{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,8 @@ | ||
{% load render_table from django_tables2 %} | ||
|
||
{% if no_results %} | ||
<div class="table-container mt-2 mb-2"> | ||
{{ no_results | safe }} | ||
</div> | ||
{% else %} | ||
{% render_table table %} | ||
{% endif %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.