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
!82
Označení neaktivovaných účtů -- vytvoření user_html_flags
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Označení neaktivovaných účtů -- vytvoření user_html_flags
jk/issue-196-v2
into
devel
Overview
25
Commits
6
Changes
12
Merged
Jiří Kalvoda
requested to merge
jk/issue-196-v2
into
devel
3 years ago
Overview
25
Commits
6
Changes
1
Expand
Closes
#196 (closed)
0
0
Merge request reports
Compare
version 4
version 6
d3b92473
3 years ago
version 5
105c9f3f
3 years ago
version 4
ac004018
3 years ago
version 3
8b41c224
3 years ago
version 2
5d675f50
3 years ago
version 1
297ea6ad
3 years ago
devel (base)
and
version 5
latest version
8af351ab
6 commits,
3 years ago
version 6
d3b92473
5 commits,
3 years ago
version 5
105c9f3f
5 commits,
3 years ago
version 4
ac004018
5 commits,
3 years ago
version 3
8b41c224
7 commits,
3 years ago
version 2
5d675f50
7 commits,
3 years ago
version 1
297ea6ad
3 commits,
3 years ago
Show latest version
1 file
+
5
−
14
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
mo/web/table.py
+
5
−
14
Options
@@ -56,28 +56,19 @@ class Row:
class
CellLink
(
Cell
):
url
:
str
hint
:
Optional
[
str
]
html_suffix
:
Markup
def
__init__
(
self
,
text
:
str
,
url
:
str
,
hint
:
Optional
[
str
]
=
None
):
def
__init__
(
self
,
text
:
str
,
url
:
str
,
hint
:
Optional
[
str
]
=
None
,
html_suffix
:
Markup
=
Markup
(
""
)
):
Cell
.
__init__
(
self
,
text
)
self
.
url
=
url
self
.
hint
=
hint
self
.
html_suffix
=
html_suffix
def
to_html
(
self
)
->
str
:
a
=
'
<td><a href=
"'
+
escape
(
self
.
url
)
+
'"'
if
self
.
hint
:
a
+=
'
title=
"'
+
escape
(
self
.
hint
)
+
'"'
return
a
+
'
>
'
+
escape
(
self
.
text
)
+
'
</a>
'
class
CellLinkWithHtmlSuffix
(
CellLink
):
html_suffix
:
Markup
def
__init__
(
self
,
text
:
str
,
url
:
str
,
html_suffix
,
hint
:
Optional
[
str
]
=
None
):
CellLink
.
__init__
(
self
,
text
,
url
,
hint
)
self
.
html_suffix
=
html_suffix
def
to_html
(
self
)
->
str
:
return
super
().
to_html
()
+
str
(
self
.
html_suffix
)
return
a
+
'
>
'
+
escape
(
self
.
text
)
+
'
</a>
'
+
str
(
self
.
html_suffix
)
class
CellCheckbox
(
Cell
):
@@ -211,7 +202,7 @@ def cell_email_link(user: db.User) -> CellLink:
return
CellLink
(
user
.
email
,
'
mailto:
'
+
urllib
.
parse
.
quote
(
user
.
email
,
safe
=
'
@
'
))
def
cell_email_link_flags
(
user
:
db
.
User
)
->
CellMarkup
:
return
CellLink
WithHtmlSuffix
(
user
.
email
,
'
mailto:
'
+
urllib
.
parse
.
quote
(
user
.
email
,
safe
=
'
@
'
),
user_html_flags
(
user
))
return
CellLink
(
user
.
email
,
'
mailto:
'
+
urllib
.
parse
.
quote
(
user
.
email
,
safe
=
'
@
'
),
html_suffix
=
user_html_flags
(
user
))
def
cell_user_link
(
user
:
db
.
User
,
text
:
str
)
->
CellLink
:
Loading