Skip to content

Commit

Permalink
Merge pull request #214 from jnywong/patch-table-design
Browse files Browse the repository at this point in the history
🎨 Update table design
  • Loading branch information
jnywong authored Nov 26, 2024
2 parents 6b5f96f + afad0fd commit a824c58
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
10 changes: 4 additions & 6 deletions frx_challenges/web/templates/results.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,9 @@ <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 %}
Expand All @@ -39,12 +38,11 @@ <h1>Leaderboard</h1>
<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"]
[0, "desc"]
],
columnDefs: [
{
targets: 1,
targets: 0,
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 a824c58

Please sign in to comment.