<%[' module:individual.htm version:2013.06.30 ']%> <%[@ IncludeFile "Code/Util.vbs" ]%> <%[@ IncludeFile "Code/Lang.vbs" ]%> <%[@ IncludeFile "Code/TimelineInfo.vbs" ]%> <%[If Session("Book") Then Report.AbortTemplate]%> <%[ ' The following prevents the page to be generated if the name is empty or the individual is excluded from the report. ' This is achieved simply by checking if the Href is empty If (i.Href = "") Then Report.AbortPage Dim volume If Session("VolumeMap").Count > 0 Then volume = Session("VolumeMap").KeyValue(Util.IfElse(i.Position.GenoMap <> "", i.Position.GenoMap ,0)) Else volume = "" End If If Session("Volume") <> "!All!" And volume <> Session("Volume") Then Report.AbortPage Dim strName, g_strNameShort, strtTitle strName = StrPlainName(i.Session("NameAlternative")) g_strNameShort = i.Session("NameShort") strTitle = Util.JavaScriptEncode(strName) Report.TagBr = "
" & vbCRLF ' For debugging, but it does not harm to re-define the
tag ]%> @[Report.WriteText strName]@ <%[ If Session("VideoJs") Then ]%> <%[ End If ]%> <%[ If Session("Timelines") Then Report.WriteLn "" Report.WriteLn "" Report.WriteLn "" End If ' style sheet after timeline so can override style if required ]%> @[GoogleAnalytics]@
<%[ Session("NotesStart") = Report.BufferLength ichNotesStart = Session("NotesStart") WriteHtmlButtonToggle("Notes") ichNotesEnd = Report.BufferLength Session("ReferencesStart") = Report.BufferLength ichReferencesStart = Session("ReferencesStart") WriteHtmlButtonToggle("OtherDetails") ichReferencesEnd = Report.BufferLength Report.WriteLn "
" Set oHyperlinkRings = Session("oHyperlinkRings") Set oHyperlinkRingIndex = Session("oHyperlinkRingIndex") WriteIndividualBody i If (Session("ReferencesStart") >= 0) Then ' Book Report or we have no place references, so remove the "Show All References | Hide All References" Report.BufferRemoveAt ichReferencesStart, ichReferencesEnd End If If (Session("NotesStart") >= 0) Then ' Book Report or we have no annotations, so remove the "collapse/expand all Notes" button Report.BufferRemoveAt ichNotesStart, ichNotesEnd End If WriteHtmlFramesetSafeguardK i.Name, "GenoProReportIndividual", i Sub WriteMetaDescription(i) Dim b, c, s, cMateFemale, cChildFemale, o, strSpouse strSpouse = "_Spouse" Set b = i.Birth Report.WritePhraseDic "FmtMetaDescIndividual1", _ StrPlainName(i.Session("NameFull")), Dic.LookupEx("Child_", i.Gender.ID), StrPlainName(i.Father.Session("NameFull")), StrPlainName(i.Mother.Session("NameFull")), CustomDate(b.Date).ToStringNarrative, b.Place.Session("Locative"), i.Gender.ID = "F", StrPlainName(i.Session("NameFullPossessive")), StrPlainName(i.Father.Session("NameFullPossessive")), StrPlainName(i.Mother.Session("NameFullPossessive")) Set s = i.Mates.ToGenoCollection cMateFemale = 0 For Each o in s If o.Gender.ID = "F" Then cMateFemale = cMateFemale + 1 Next If s.Count = cMateFemale Then If Dic.Peek(strSpouse & "_" & i.Gender.ID & "_F") <> "" Then strSpouse = strSpouse & "_" & i.Gender.ID & "_F" End If Set c = i.Children.ToGenoCollection cChildFemale = 0 For Each o in c If o.Gender.ID = "F" Then cChildFemale = cChildFemale + 1 Next Report.WritePhraseDic "FmtMetaDescIndividual2", i.Session("NameShort"), ToHave(i, s), _ Dic.PlurialCardinal(strSpouse, s.Count), s.ToString, _ Dic.PlurialCardinal("Child", c.Count), c.ToString(Session("NameTags")(3)), _ s.Count = cMateFemale, s.Count > 1, c.Count = cChildFemale, c.Count > 1 End Sub Sub WriteMetaKeywords(i) Report.WritePhraseDic "FmtMetaKeyWordsIndividual", i.Session("FullName"), i.Session("NameLast"), i.Pictures.Count > 0, i.Session("NameFullPossessive") End Sub ]%>