Skip to content
Snippets Groups Projects
Commit caf0498f authored by Jiří Kalvoda's avatar Jiří Kalvoda
Browse files

CellLink: Přidán html_suffix pro zobrazování `*` flagů

parent cfd9e1eb
Branches
No related tags found
1 merge request!82Označení neaktivovaných účtů -- vytvoření user_html_flags
......@@ -55,17 +55,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>'
return a + '>' + escape(self.text) + '</a>' + str(self.html_suffix)
class CellCheckbox(Cell):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment