mirror of
https://github.com/redmine/redmine.git
synced 2025-11-15 09:46:02 +01:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user