Skip to content
Snippets Groups Projects
Commit 614eb259 authored by Jan Maximilian Michal's avatar Jan Maximilian Michal
Browse files

removed headline from tutor startpage

parent 118fe72c
No related branches found
No related tags found
No related merge requests found
......@@ -6,8 +6,8 @@
{% block body_block %}
<div class="row justify-content-center my-2">
<div class="col-3">
<div class="row justify-content-center my-3">
<div class="col-4">
{# This is a contol panel where new work can be requested #}
<div class="card">
......@@ -15,15 +15,21 @@
<table class="table">
<thead>
<th>Name</th>
<th>Progress</th>
<th></th>
</thead>
<tbody>
{% for submission_type in submission_type_list %}
<tr>
<td class="align-middle">{{ submission_type }}</td>
<td class="align-middle"><code>{{ submission_type.submissions__feedback_list__count }} / {{submission_type.submissions__count}}</code></td>
<td class="align-middle"><a role="button" class="btn btn-secondary" href="{% url 'CreateFeedbackForType' submission_type.slug %}">Get</a></td>
</tr>
{% endfor %}
<tr>
<td><strong>Your constribution:</strong></td>
<td colspan="2"><code>{% if feedback_list|length > 0 %} {{feedback_list|length}} {% else %} None. Sad. {% endif %}</code></td>
</tr>
</tbody>
</table>
<div class="card-footer text-muted">
......@@ -43,21 +49,8 @@
</div>
<div class="col-5">
{# The custom header message #}
<div class="row my-2 page-header">
{% if feedback_list|length == 0 %}
<h2>You havn't provided any feedback yet. Sad. Get to work!</h2>
{% else %}
{% if feedback_list|length == 1 %}
<h2>So far you have provieded one constribution </h2>
{% else %}
<h2>So far you have provided {{feedback_list|length}} constributions</h2>
{% endif %}
</div>
{# The big table where the tutor can see what s/he actually did #}
<div class="row justify-content-center my-2">
<div class="row justify-content-center">
<table class="table">
<thead>
<tr>
......@@ -83,7 +76,6 @@
{% endfor %}
</tbody>
</table>
{% endif %}
</div>
</div>
</div>
......
......@@ -83,7 +83,10 @@ def user_home(request):
@group_required('Tutors')
def tutor_view(request):
context = {
'submission_type_list': SubmissionType.objects.all(),
'submission_type_list': SubmissionType.objects.annotate(
Count('submissions__feedback_list')).annotate(
Count('submissions')
).all(),
'feedback_list': Feedback.objects.filter(of_tutor=request.user),
}
return render(request, 'core/tutor_startpage.html', context)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment