improve reporting: additional field for HTML-rendered text; CSS class for tabular report
This commit is contained in:
parent
8851759a11
commit
d9694f711c
3 changed files with 15 additions and 1 deletions
|
@ -176,6 +176,10 @@ table.records th, table.records td {
|
|||
border: 1px solid black;
|
||||
}
|
||||
|
||||
table.report td {
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
dl.docutils dt {
|
||||
font-weight: bold;
|
||||
margin-top: 0.3em;
|
||||
|
|
|
@ -15,7 +15,8 @@
|
|||
|
||||
|
||||
<div metal:define-macro="results">
|
||||
<table tal:define="results view/results">
|
||||
<table class="report"
|
||||
tal:define="results view/results">
|
||||
<tr>
|
||||
<th tal:repeat="col view/displayedColumns"
|
||||
tal:content="col/title"
|
||||
|
|
|
@ -24,6 +24,15 @@ from cybertools.composer.report.field import Field
|
|||
from loops import util
|
||||
|
||||
|
||||
class TextField(Field):
|
||||
|
||||
format = 'text/restructured'
|
||||
|
||||
def getDisplayValue(self, row):
|
||||
value = self.getValue(row)
|
||||
return row.parent.context.view.renderText(value, self.format)
|
||||
|
||||
|
||||
class UrlField(Field):
|
||||
|
||||
renderer = 'target'
|
||||
|
|
Loading…
Add table
Reference in a new issue