diff --git a/templates/web/index.html b/templates/web/index.html index 5c219f0e..ea7c5790 100644 --- a/templates/web/index.html +++ b/templates/web/index.html @@ -36,57 +36,59 @@ {% endif %} {% if node.tasks %} - - +
+
+ + + + + + + + + + {% for task in node.tasks %} - - - - - + + {% comment %} + TODO: Add remaining time to deadline by creating simple tag: + https://stackoverflow.com/questions/52296306/django-template-is-there-a-built-in-way-to-get-current-date-as-type-date-ins + https://docs.djangoproject.com/en/1.11/howto/custom-template-tags/#django.template.Library.simple_tag + {% endcomment %} + + + + - - {% for task in node.tasks %} - - - {% comment %} - TODO: Add remaining time to deadline by creating simple tag: - https://stackoverflow.com/questions/52296306/django-template-is-there-a-built-in-way-to-get-current-date-as-type-date-ins - https://docs.djangoproject.com/en/1.11/howto/custom-template-tags/#django.template.Library.simple_tag - {% endcomment %} - - - - - - {% endfor %} - - - - - -
TaskAssignedDeadlineEarned pointsMax points
TaskAssignedDeadlineEarned pointsMax points + {% if task.accepted_submit_num %} + {{ task.name }} + {% else %} + {{ task.name }} + {% endif %} + + {{ task.assigned|date:"d.m.Y, H:i" }} + {% if task.assigned_show_remaining %} ({{ task.assigned|timeuntil }} left){% endif %} + + {% if task.deadline %} + {{ task.deadline|date:"d.m.Y, H:i" }} ({{ task.deadline|timeuntil }} left) + {% endif %} + + {% if task.assigned_points is not None %} + {{ task.assigned_points|floatformat:2 }} + {% endif %} + + {% if task.assignment.max_points is not None %} + {{ task.assignment.max_points|floatformat:2 }} + {% endif %} +
- {% if task.accepted_submit_num %} - {{ task.name }} - {% else %} - {{ task.name }} - {% endif %} - - {{ task.assigned|date:"d.m.Y, H:i" }} - {% if task.assigned_show_remaining %} ({{ task.assigned|timeuntil }} left){% endif %} - - {% if task.deadline %} - {{ task.deadline|date:"d.m.Y, H:i" }} ({{ task.deadline|timeuntil }} left) - {% endif %} - - {% if task.assigned_points is not None %} - {{ task.assigned_points|floatformat:2 }} - {% endif %} - - {% if task.assignment.max_points is not None %} - {{ task.assignment.max_points|floatformat:2 }} - {% endif %} -
Celkem{{ node.earned_points|floatformat:2 }}{{ node.max_points|floatformat:2 }}
+ {% endfor %} + + Celkem + {{ node.earned_points|floatformat:2 }} + {{ node.max_points|floatformat:2 }} + + + {% else %}

No task assigned.

{% endif %}