Skip to content

Commit

Permalink
🎨 Update table design
Browse files Browse the repository at this point in the history
  • Loading branch information
jnywong committed Nov 26, 2024
1 parent 6b5f96f commit 430be60
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
12 changes: 5 additions & 7 deletions frx_challenges/web/templates/results.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,25 +26,23 @@ <h1>Leaderboard</h1>
<div class="row py-2">
<div class="col py-2">
<div class="table-responsive">
<table id="results" class="table table-striped">
<table id="results" class="table hover">
<thead>
<tr>
<th scope="col">ID</th>
<th scope="col">Date created</th>
<th scope="col">Submission Name</th>
{% for md in metadata_display %}<th scope="col">{{ md }}</th>{% endfor %}
<th scope="col">Date created</th>
{% for dc in evaluation_display_config %}<th scope="col">{{ dc.display_name }}</th>{% endfor %}
</tr>
</thead>
<tbody>
{% for result in results %}
<tr>
<td>{{ result.submission.id }}</td>
<td>{{ result.submission.created_at|date:"c" }}</td>
<td>
<a href='{% url "submissions-detail" result.submission.id %}'>{{ result.submission.name }}</a>
</td>
{% for m in result.metadata %}<td>{{ m }}</td>{% endfor %}
<td>{{ result.submission.created_at|date:"c" }}</td>
{% for r in result.best_version.latest_evaluation.ordered_results %}
<td scope="col">
{% if r %}{{ r }}{% endif %}
Expand All @@ -64,11 +62,11 @@ <h1>Leaderboard</h1>
const resultsTable = new DataTable("#results", {
order: [
// Apply reverse chronological ordering by default
[1, "desc"]
[2, "desc"]
],
columnDefs: [
{
targets: 1,
targets: 2,
render: (data) => {
return dayjs(data).fromNow();
}
Expand Down
2 changes: 1 addition & 1 deletion frx_challenges/web/templates/submission/list.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ <h1>My Submissions</h1>
<div class="container py-2">
<div class="row py-2">
<div class="table-responsive">
<table id="results" class="table table-striped">
<table id="results" class="table hover">
<thead>
<tr>
<th scope="col">Name</th>
Expand Down

0 comments on commit 430be60

Please sign in to comment.