1 # frozen_string_literal: true
 
   3 xml.note("lon" => note.lon, "lat" => note.lat) do
 
   5   xml.url api_note_url(note, :format => params[:format])
 
   8     xml.reopen_url reopen_api_note_url(note, :format => params[:format])
 
  10     xml.comment_url comment_api_note_url(note, :format => params[:format])
 
  11     xml.close_url close_api_note_url(note, :format => params[:format])
 
  14   xml.date_created note.created_at
 
  15   xml.status note.status
 
  17   xml.date_closed note.closed_at if note.closed?
 
  20     note.comments.each do |comment|
 
  22         xml.date comment.created_at
 
  25           xml.uid comment.author.id
 
  26           xml.user comment.author.display_name
 
  27           xml.user_url user_url(:display_name => comment.author.display_name, :only_path => false)
 
  30         xml.action comment.event
 
  33           xml.text comment.body.to_text
 
  34           xml.html comment.body.to_html