Skip to content
This repository has been archived by the owner on Jan 3, 2024. It is now read-only.

Commit

Permalink
feat(submission_page): template of submissions complete
Browse files Browse the repository at this point in the history
  • Loading branch information
LuizaMaluf committed Nov 30, 2023
1 parent 48d650d commit 297cd3c
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 25 deletions.
2 changes: 1 addition & 1 deletion apps/submissions/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@

class SubmissionListView(SubmissionViewBase):
model = Submission
template_name = "submission_list.html"
template_name = "submissions/list.html"
context_object_name = "submissions"
1 change: 0 additions & 1 deletion templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@
<a class="nav-link text-white" href="#">
Ranking
</a>
<a class="nav-link" href="{% url 'submissions: submissions_list' %}">Submissions</a>
</li>
</ul>
{% if request.user.is_authenticated %}
Expand Down
57 changes: 57 additions & 0 deletions templates/submissions/list.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
{% extends "base.html" %}

{% load crispy_forms_tags %}

{% block title %}Submissions{% endblock title %}

{% block content %}
<h2>Submissions</h2>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">

<style>
.center-table {
display: flex;
justify-content: center;
}
table {
border-collapse: collapse;
width: 200%;
margin: 20px 0;
}
th, td {
border: 1px solid #dddddd;
text-align: left;
padding: 8px;
}
th {
background-color: #f2f2f2;
}
</style>
</head>
<body>
<div class="center-table">
<table>
<thead>
<tr>
<th>Submission ID</th>
<th>Task</th>
<th>Status</th>
<th>Created at</th>
</tr>
</thead>
<tbody>
{% for submission in submissions.all %}
<tr>
<td>{{ submission.id }}</td>
<td>{{ submission.task.title }}</td>
<td>{{ submission.status }}</td>
<td>{{ submission.created_at}}</td>
</tr>
{% endfor %}
</tbody>
</table>
<div>
</body>
{% endblock content %}
23 changes: 0 additions & 23 deletions templates/submissions/submission_list.html

This file was deleted.

0 comments on commit 297cd3c

Please sign in to comment.