Sub WriteHtmlOccupancies(obj)
Dim collOccupancies, o, ich, strName, strRelative, strPnP, strType, fExtant, strGender, nPlural
Set collOccupancies = obj.contacts.ToGenoCollection
If (collOccupancies.Count > 0) Then
g_ichReferencesStart = -1 ' indicate at least one collapse/expand non-notes section present
Report.WriteLn "<div class='clearleft'><br /><ul class='xT'>"
Report.WriteFormattedLn " <li class='xT2-{} xT-h' onclick='xTclk(event,""2"")'>",
Util.IfElse(Session("fCollapseReferences"), "c", "o")
Report.WriteFormattedLn "<a name='Occupancies'></a><h3 class='xT-i inline'>{&t}</h3><ul class='xT-h'><li>", Dic("HeaderOccupancy")
Select Case obj.Class
Case "Individual"
strName = obj.Session("NameShort")
strRelative = PnR(i)
strPnP = PnP(i)
fExtant = Not i.IsDead
strType = ""
Case "SocialEntity"
strName = obj.Session("Name")
strGender =
Util.FirstNonEmpty(CustomTag(obj,"Gender.ID"), "N")
nPlural = Util.IfElse(IsFalse(CustomTag(obj,"Plural")),1,2)
strPnP = Dic.Plurial("PnP_" & strGender, nPlural)
strRelative = Dic.Plurial("PnR_" & strGender, nPlural)
fExtant = (CustomTag(obj, "Extant") <> "N")
strType = CustomTag(obj, "Type")
End Select
For Each o In collOccupancies
Report.WriteFormattedLn "<a name='{}'></a><div class='clearleft'>", o.ID
ich = Report.BufferLength
If (o.Pictures.Count > 0) Then
Report.WriteLn "<div class='floatleft aligncenter widthpaddedsmall'>"
WriteHtmlPicturesSmall o, "left", True
Report.WriteLn "</div>"
End If
' added & "[{?!8}{8}]" and end of phrase below for pre 2011.02.06 Dictionaries that will not have param 8 in phrase
template Report.WritePhrase Util.FirstNonEmpty(StrDicOrTag("PhOT_" & o.Type.ID & "_" & obj.Class, CustomTag(o, "NarrativeStyle")), StrDicOrTag("PhOT_" & o.Type.ID, CustomTag(o, "NarrativeStyle")), _
Dic.
Lookup2("PhOT_" & o.Type.ID & "_" & obj.Class, "PhOT_" & o.Type.ID)) & "[{?!8}{8}]", _
strName, strRelative, StrDateSpan(o.DateStart, o.DateEnd), _
Util.IfElse(o.DateStart.
ToStringNarrative <> o.DateEnd.ToStringNarrative, o.Duration, ""), _
(Not fExtant Or (o.DateEnd.ToStringNarrative<>""))=False, _
StrHtmlHyperlink(o.Place), o.
Summary, o.Place.Session("Hlink"), strType
If (o.place.Pictures.Count > 0) Then 'HarryCaper
Report.WriteFormattedLn StrHtmlImgPhotoPop(o.place) 'HarryCaper
End If 'HarryCaper
If Report.BufferLength > ich And o.Summary <> "" Then
Report.WriteBr Report.WritePhraseDic "PhContact", o.telephone, o.Fax, Util.FormatHtmlHyperlink(Util.IfElse(o.Email <> "","mailto:" & o.Email,""), o.Email), Util.FormatHtmlHyperlink(o.Homepage, ,"target='_blank'"), o.Type, o.Place, o.Mobile
WriteHtmlFootnoteRef o.Source
WriteHtmlFootnoteRefs(o.Sources)
WriteHtmlExtraNarrative o
WriteHtmlAdditionalInformation(o)
WriteHtmlAnnotation o, Dic("AnnotationOccupancy"), o.Comment
If Session("fShowPictureDetails") Then
WriteHtmlDetailsPicture o, True, True
WriteHtmlAnnotationPicture Dic("Contact"), o, "", ""
End If
strName = strPnP
strType = ""
Report.WriteLn "</div>"
Next
Report.WriteLn "</li></ul></li></ul></div>"
End If
End Sub