Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🎨 Update table design #214

Merged
merged 2 commits into from
Nov 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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