Commit 2ef472f1 authored by Jérome Perrin's avatar Jérome Perrin

run_my_doc: make TestPage_viewTestReport valid HTML

Don't use inline <style> in a <div>, but in an external <link>.

This fixes:

    Using nu validator to parse the view "TestPage_viewTestReport" (from erp5_run_my_doc bt) with warnings displayed :
    Error: line 581 column 23 : Element “style” not allowed as child of element “div” in this context. (Suppressing further errors from this subtree.): "><div  >
    <style type="text/css">
    body,
parent d44e5ea8
return """ return """\
<style type="text/css"> <link rel="stylesheet" type="text/css" href="{}/test_page_report.css">
body, table { """.format(context.getPortalObject().absolute_url())
font-family: Verdana,Arial,sans-serif;
font-size: 24px;
margin:auto;
}
table {
border: 1px solid #CCCCCC;
border-collapse: collapse;
}
th, td {
padding-left: 0.3em;
padding-right: 0.3em;
}
a {
text-decoration: none;
}
.title {
font-style: italic;
}
.selected {
background-color: #FFFFCC;
}
.status_done {
background-color: #EEFFEE;
}
.status_passed {
background-color: #CCFFCC;
}
.status_failed {
background-color: #FFCCCC;
}
.breakpoint {
background-color: #CCCCCC;
border: 1px solid black;
}
</style>
"""
body, table {
font-family: Verdana,Arial,sans-serif;
font-size: 24px;
margin:auto;
}
table {
border: 1px solid #CCCCCC;
border-collapse: collapse;
}
th, td {
padding-left: 0.3em;
padding-right: 0.3em;
}
a {
text-decoration: none;
}
.title {
font-style: italic;
}
.selected {
background-color: #FFFFCC;
}
.status_done {
background-color: #EEFFEE;
}
.status_passed {
background-color: #CCFFCC;
}
.status_failed {
background-color: #FFCCCC;
}
.breakpoint {
background-color: #CCCCCC;
border: 1px solid black;
}
\ No newline at end of file
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="File" module="OFS.Image"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>__name__</string> </key>
<value> <string>test_page_report.css</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/css</string> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment