Fix Tradon processes content rendering
This commit is contained in:
@@ -22,7 +22,15 @@ class ProcessDocumentation(ModelSingleton, ModelSQL, ModelView):
|
||||
|
||||
content = fields.Function(fields.Text('Content'), 'get_content')
|
||||
|
||||
@staticmethod
|
||||
def default_content():
|
||||
return _html_content()
|
||||
|
||||
def get_content(self, name):
|
||||
return _html_content()
|
||||
|
||||
|
||||
def _html_content():
|
||||
return HTML_TEMPLATE % {
|
||||
'content': _documentation_content(),
|
||||
}
|
||||
@@ -183,48 +191,8 @@ def _render_table(lines, current_file):
|
||||
return ''.join(output)
|
||||
|
||||
|
||||
HTML_TEMPLATE = '''<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8"/>
|
||||
<style>
|
||||
body {
|
||||
color: #1f2933;
|
||||
font-family: Arial, sans-serif;
|
||||
line-height: 1.5;
|
||||
margin: 0;
|
||||
padding: 24px;
|
||||
}
|
||||
a {
|
||||
color: #0b63ce;
|
||||
text-decoration: none;
|
||||
}
|
||||
a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
table {
|
||||
border-collapse: collapse;
|
||||
margin: 16px 0;
|
||||
width: 100%%;
|
||||
}
|
||||
th,
|
||||
td {
|
||||
border: 1px solid #d7dde5;
|
||||
padding: 8px 10px;
|
||||
text-align: left;
|
||||
vertical-align: top;
|
||||
}
|
||||
th {
|
||||
background: #f3f6f9;
|
||||
}
|
||||
img {
|
||||
height: auto;
|
||||
max-width: 100%%;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<main>%(content)s</main>
|
||||
</body>
|
||||
</html>
|
||||
HTML_TEMPLATE = '''<div style="color: #1f2933; font-family: Arial, sans-serif;
|
||||
line-height: 1.5; padding: 24px;">
|
||||
%(content)s
|
||||
</div>
|
||||
'''
|
||||
|
||||
Reference in New Issue
Block a user