Wiki page hierarchy (#528). Parent page can be assigned on Rename screen.

git-svn-id: http://redmine.rubyforge.org/svn/trunk@1698 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2008-07-26 11:46:24 +00:00
parent b68fd4c04b
commit 60d066f943
38 changed files with 139 additions and 11 deletions

View File

@@ -17,6 +17,22 @@
module WikiHelper
def render_page_hierarchy(pages, node=nil)
content = ''
if pages[node]
content << "<ul class=\"pages-hierarchy\">\n"
pages[node].each do |page|
content << "<li>"
content << link_to(h(page.pretty_title), {:action => 'index', :page => page.title},
:title => l(:label_updated_time, distance_of_time_in_words(Time.now, page.updated_on)))
content << "\n" + render_page_hierarchy(pages, page.id) if pages[page.id]
content << "</li>\n"
end
content << "</ul>\n"
end
content
end
def html_diff(wdiff)
words = wdiff.words.collect{|word| h(word)}
words_add = 0