<%[
Pictures.SortBy("Name")
Dim strDimension, c, strName
Dim oDataSorter, collPictures, ichStart
Set oDataSorter = Util.NewDataSorter()
For Each p In Pictures
If p.References.Count > 0 And Not p.Session("IsExcluded") Then
oDataSorter.Add p, p.Name
End if
Next
oDataSorter.SortByKey
Set collPictures = oDataSorter.ToGenoCollection
ichStart = Report.BufferLength
' create object with id property for fancybox slideshow (used in WriteHtmlPicture)
Class dummy
Public id
End Class
Dim obj
Set obj = New dummy
obj.id = "dummy"
For Each p In collPictures
If p.References.Count > 0 And Not p.Session("IsExcluded") Then
Report.WriteLn "
"
strName = Util.IfElse(g_fUse_PictureId,StrFormatText(p, StrParseText(Trim(p.Name), True)),"")
Report.WritePhraseDic "PhPictureDetails", Util.IfElse(Session("fHidePictureName"), "", strName), p.Date.ToStringNarrative, StrHtmlHyperlink(p.Place), ""
WriteHtmlFootnoteRef p.Source
WriteHtmlExtraNarrative p
WriteHtmlAdditionalInformation p
WriteHtmlAnnotation p, Dic("AnnotationPicture"), p.Comment
Set c = p.Cache
If Session("fShowTechnicalData") Then WriteHtmlAnnotation p, Dic("AnnotationPictureTechnical"), Util.FormatPhrase(Dic("PhPictureTechnical"), c.Dimension, c.Megapixels, c.FileSizeKB, c.Dpi, c.Bpp, p.Path.relative)
WriteHtmlAllFootnotes p.Sources, True
WriteHtmlReferences p, False
Report.Writeln "
"
End If
Next
If ichStart = Report.BufferLength Then ' if no pictures don't write html file for Picture Gallery
Session("ShowGallery") = False
Report.AbortTemplate
End If
' remove any unecessary items (reverse order to avoid invalidating buffer pointers)
If Session("ReferencesStart") >= 0 Then
' 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
' We have no annotations, so remove the "Show All Notes | Hide All Notes"
Report.BufferRemoveAt Session("NotesStart"), ichNotesEnd
End If
]%>
<%[ WriteHtmlFramesetSafeguard("Places") ]%>