summaryrefslogtreecommitdiffstats
path: root/app/views/wiki/index.api.rsb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2012-10-25 19:44:04 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2012-10-25 19:44:04 +0000
commit9e313087205721ed3c6239be7cde55598d29f9e6 (patch)
treec5ba4ab52453907afae728887b470f95008bbbdb /app/views/wiki/index.api.rsb
parentb2e035fa96e4c2b06dcd559850d11987ba96ee1c (diff)
downloadredmine-9e313087205721ed3c6239be7cde55598d29f9e6.tar.gz
redmine-9e313087205721ed3c6239be7cde55598d29f9e6.zip
REST API for retrieving wiki pages (#7082).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10716 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/views/wiki/index.api.rsb')
-rw-r--r--app/views/wiki/index.api.rsb13
1 files changed, 13 insertions, 0 deletions
diff --git a/app/views/wiki/index.api.rsb b/app/views/wiki/index.api.rsb
new file mode 100644
index 000000000..f1035c89b
--- /dev/null
+++ b/app/views/wiki/index.api.rsb
@@ -0,0 +1,13 @@
+api.array :wiki_pages do
+ @pages.each do |page|
+ api.wiki_page do
+ api.title page.title
+ if page.parent
+ api.parent :title => page.parent.title
+ end
+ api.version page.version
+ api.created_on page.created_on
+ api.updated_on page.updated_on
+ end
+ end
+end