def render_timeline_event(self, context, field, event):
     # Decompose event data.
     title, description, path = event[3]
     # Return apropriate content.
     if field == 'url':
         if not path:
             # method is DELETE
             return ''
         files_core = FilesCoreComponent(self.env)
         req = None
         try:
             req = context.req
         except AttributeError as e:
             pass
         download_config = files_core.files_download_config(req=req)
         node = FileSystemNode(download_config.base_path)
         node.populate_file_data(
             get_normalized_relative_path(node.base_path,
                                          path,
                                          assume_relative_path=True))
         if node.exists():
             return context.href.files(node.relative_path)
         else:
             return ""
     elif field == 'title':
         return tag(title)
     elif field == 'description':
         return tag(description)
 def render_timeline_event(self, context, field, event):
     # Decompose event data.
     title, description, path = event[3]
     # Return apropriate content.
     if field == 'url':
         if not path:
             # method is DELETE
             return ''
         files_core = FilesCoreComponent(self.env)
         req = None
         try:
             req = context.req
         except AttributeError as e:
             pass
         download_config = files_core.files_download_config(req=req)
         node = FileSystemNode(download_config.base_path)
         node.populate_file_data(get_normalized_relative_path(node.base_path, path,
             assume_relative_path=True))
         if node.exists():
             return context.href.files(node.relative_path)
         else:
             return ""
     elif field == 'title':
         return tag(title)
     elif field == 'description':
         return tag(description)