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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Martin Mareš
Odevzdávací Systém MO
Merge requests
!105
Zjednoznačnění výsledkovky & postup výběrem
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Zjednoznačnění výsledkovky & postup výběrem
jirka/vysledkovky-a-postup
into
devel
Overview
18
Commits
6
Changes
1
Merged
Jiří Setnička
requested to merge
jirka/vysledkovky-a-postup
into
devel
3 years ago
Overview
18
Commits
6
Changes
1
Expand
Obsahuje:
#233 (closed)
Postup do dalšího kola výběrem účastníků
#210 (closed)
Ruční zjednoznačnění pořadí
#238 (closed)
Výsledkové listiny pro hierarchii soutěží
Edited
3 years ago
by
Jiří Setnička
0
0
Merge request reports
Viewing commit
fa4e240a
Show latest version
1 file
+
21
−
8
Side-by-side
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
fa4e240a
Table: Přidání CellInput
· fa4e240a
Jiří Setnička
authored
3 years ago
mo/web/table.py
+
21
−
8
Options
@@ -71,22 +71,35 @@ class CellLink(Cell):
@@ -71,22 +71,35 @@ class CellLink(Cell):
return
a
+
'
>
'
+
escape
(
self
.
text
)
+
'
</a>
'
+
str
(
self
.
html_suffix
)
return
a
+
'
>
'
+
escape
(
self
.
text
)
+
'
</a>
'
+
str
(
self
.
html_suffix
)
class
Cell
Checkbox
(
Cell
):
class
Cell
Input
(
Cell
):
name
:
str
name
:
str
value
:
str
value
:
str
checked
:
bool
type
:
str
attrs
:
Dict
[
str
,
Optional
[
str
]]
def
__init__
(
self
,
name
:
str
,
value
:
str
,
checked
:
bool
=
False
):
def
__init__
(
self
,
name
:
str
,
value
:
str
,
type
:
str
=
"
text
"
,
attrs
:
Dict
[
str
,
Optional
[
str
]]
=
{}
):
Cell
.
__init__
(
self
,
""
)
Cell
.
__init__
(
self
,
""
)
self
.
name
=
name
self
.
name
=
name
self
.
value
=
value
self
.
value
=
value
self
.
checked
=
checked
self
.
type
=
type
self
.
attrs
=
attrs
def
to_html
(
self
)
->
str
:
def
to_html
(
self
)
->
str
:
ch
=
f
'
<td><input type=
"
checkbox
"
name=
"
{
self
.
name
}
"
value=
"
{
self
.
value
}
"'
out
=
f
'
<td><input type=
"
{
self
.
type
}
"
name=
"
{
self
.
name
}
"
value=
"
{
self
.
value
}
"'
if
self
.
checked
:
for
(
attr
,
value
)
in
self
.
attrs
.
items
():
ch
+=
'
checked
'
out
+=
f
'
{
attr
}
'
return
ch
+
'
>
'
if
value
is
not
None
:
out
+=
f
'
=
"
{
value
}
"'
return
out
+
'
>
'
class
CellCheckbox
(
CellInput
):
def
__init__
(
self
,
name
:
str
,
value
:
str
,
checked
:
bool
=
False
):
attrs
=
{}
if
checked
:
attrs
[
'
checked
'
]
=
None
CellInput
.
__init__
(
self
,
name
,
value
,
"
checkbox
"
,
attrs
)
class
CellMarkup
(
Cell
):
class
CellMarkup
(
Cell
):
text
:
str
text
:
str
Loading