As with the XHTML rendering, we display a hyphen if the
effort is unknown. The logic that decides how much
precision to display is Section 58, “statNumber(): Display a float without
too much precision”.
For styling, see Section 13.11.15, “FO_PH_CELL_ATTRS”.
# - - - P a r t y H o u r s C e l l . f o
def fo(self, s, **kw):
'''Render self as XSL-FO.
'''
#-- 1
if self._total is None:
text = '-'
else:
text = statNumber(self._total)
#-- 2
# [ s +:= an open table-cell element styled by
# FO_PH_CELL_ATTRS and kw
# cell := that element ]
cell = s.start('table-cell', FO_PH_CELL_ATTRS, kw)
#-- 3
# [ s +:= a block element containing text, right-aligned ]
s.leaf('block', FO_ALIGN_RIGHT, text)
#-- 4
cell.end()