# - - - P a r t y H o u r s C e l l . h t m l
def html(self, sox, addCss=None):
'''Render self as XHTML.
'''
If no values have been accumulated, a hyphen is displayed
to indicate an absence of data. The function that uses
an appropriate amount of precision is Section 58, “statNumber(): Display a float without
too much precision”. For the CSS class used to mark
up the resulting th element, see Section 13.4.12, “CLASS_PH_CELL”.
#-- 1
# [ if self._total is None ->
# text := a hyphen
# else ->
# text := self._total displayed without excessive precision ]
if self._total is None:
text = '-'
else:
text = statNumber(self._total)
#-- 2
# [ sox +:= a td element containing text and the markup in
# CLASS_PH_CELL combined with addCss ]
sox.leaf("td", text, combineCss(CLASS_PH_CELL, addCss),
valign='top')