# - - - M o n t h C e l l . _ _ d a y A n n o t a t i o n
def __dayAnnotation ( self, parent, daySummary ):
'''Render day-annotation content.
[ (parent is an et.Element) and
(daySummary is a birdnotes.DaySummary instance) ->
parent +:= blocks displaying day-annotation
content from daySummary, if any ]
'''
This method generates the various types of labeled
annotation first in a standard order—route,
weather, missed, and film—followed by unclassified
notes. For the general structure, see Section 4.6, “XHTML for day-annotation elements”. See also Section 23.15, “MonthCell.__annoBlock(): Annotation
block with a label”.
#-- 1 --
# [ if daySummary.route is not None ->
# parent +:= a div labeled with 'route' displaying
# daySummary.route
# else -> I ]
if daySummary.route is not None:
self.__annoBlock ( parent, 'Route', daySummary.route )
#-- 2 --
if daySummary.weather is not None:
self.__annoBlock ( parent, 'Weather', daySummary.weather )
#-- 3 --
if daySummary.missed is not None:
self.__annoBlock ( parent, 'Missed', daySummary.missed )
#-- 4 --
if daySummary.film is not None:
self.__annoBlock ( parent, 'Film', daySummary.film )
The handling of the unlabeled narrative is slightly
different: it is not enclosed in a block with a label, so
it goes straight to Section 23.16, “MonthCell.__narrative(): Render a
Narrative instance”.
#-- 5 --
if daySummary.notes is not None:
self.__narrative ( parent, daySummary.notes )