diff app/views/wiki/show.api.rsb @ 1115:433d4f72a19b redmine-2.2

Update to Redmine SVN revision 11137 on 2.2-stable branch
author Chris Cannam
date Mon, 07 Jan 2013 12:01:42 +0000
parents
children 261b3d9a4903
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/app/views/wiki/show.api.rsb	Mon Jan 07 12:01:42 2013 +0000
@@ -0,0 +1,18 @@
+api.wiki_page do
+  api.title @page.title
+  if @page.parent
+    api.parent :title => @page.parent.title
+  end
+  api.text @content.text
+  api.version @content.version
+  api.author(:id => @content.author_id, :name => @content.author.name)
+  api.comments @page.content.comments
+  api.created_on @page.created_on
+  api.updated_on @content.updated_on
+
+  api.array :attachments do
+    @page.attachments.each do |attachment|
+      render_api_attachment(attachment, api)
+    end
+  end if include_in_api_response?('attachments')
+end