Skip to content
Snippets Groups Projects
Commit 9529b3e3 authored by Martin Mareš's avatar Martin Mareš
Browse files

Registrace: V seznamu kol uvádíme i termíny

parent f75b160d
No related branches found
No related tags found
1 merge request!86Registrace
......@@ -22,7 +22,7 @@ from typing import Optional, List, Tuple
import mo
from mo.place_level import place_levels, PlaceLevel
from mo.util_format import timedelta, time_and_timedelta
from mo.util_format import timeformat_short, timedelta, time_and_timedelta
# HACK: Work-around for https://github.com/dropbox/sqlalchemy-stubs/issues/114
from typing import TYPE_CHECKING, TypeVar, Type, Any
......@@ -306,6 +306,14 @@ class Round(Base):
return round_points_step_names[self.points_step]
return str(self.points_step)
def format_times(self) -> str:
times = []
if self.ct_tasks_start is not None:
times.append('od ' + timeformat_short(self.ct_tasks_start))
if self.ct_submit_end is not None:
times.append('do ' + timeformat_short(self.ct_submit_end))
return " ".join(times)
class User(Base):
__tablename__ = 'users'
......
......@@ -11,6 +11,7 @@
<th>Kategorie
<th>Popis
<th>Kolo
<th>Termíny
<th>Odkazy
<tbody>
{% for round in available_rounds %}
......@@ -18,6 +19,7 @@
<td><b>{{ round.category }}</b>
<td>{{ round.enroll_advert }}</b>
<td>{{ round.name }}
<td>{{ round.format_times() }}
{% if round.round_id in pcrs_by_round_id %}
<td>Již přihlášen
{% else %}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment