Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Odevzdávací Systém MO
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Martin Mareš
Odevzdávací Systém MO
Commits
9529b3e3
Commit
9529b3e3
authored
3 years ago
by
Martin Mareš
Browse files
Options
Downloads
Patches
Plain Diff
Registrace: V seznamu kol uvádíme i termíny
parent
f75b160d
No related branches found
No related tags found
1 merge request
!86
Registrace
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
mo/db.py
+9
-1
9 additions, 1 deletion
mo/db.py
mo/web/templates/user_join_list.html
+2
-0
2 additions, 0 deletions
mo/web/templates/user_join_list.html
with
11 additions
and
1 deletion
mo/db.py
+
9
−
1
View file @
9529b3e3
...
...
@@ -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
'
...
...
This diff is collapsed.
Click to expand it.
mo/web/templates/user_join_list.html
+
2
−
0
View file @
9529b3e3
...
...
@@ -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 %}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment