]> git.openstreetmap.org Git - rails.git/blobdiff - app/views/notes/_note.gpx.builder
Add a reopen API call for notes
[rails.git] / app / views / notes / _note.gpx.builder
index 22d9283ef7a8aff3a8b8c0af4df3225864ae5db3..b6d0855368cd1f8113f18ce8c48fc6d3e3ce93f8 100644 (file)
@@ -12,7 +12,12 @@ xml.wpt("lon" => note.lon, "lat" => note.lat) do
 
     xml.id note.id
     xml.url note_url(note, :format => params[:format])
 
     xml.id note.id
     xml.url note_url(note, :format => params[:format])
-    xml.comment_url comment_note_url(note, :format => params[:format])
-    xml.close_url close_note_url(note, :format => params[:format])
+
+    if note.closed?
+      xml.reopen_url reopen_note_url(note, :format => params[:format])
+    else
+      xml.comment_url comment_note_url(note, :format => params[:format])
+      xml.close_url close_note_url(note, :format => params[:format])
+    end
   end
 end
   end
 end