From 06266c8fecd78d620b7eb55c7d9df1b65340b5b1 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sat, 22 Nov 2008 11:44:07 +0000 Subject: Extends child_pages macro to display child pages based on page parameter (#1975). It can also be called from anywhere now (not only from wiki pages). git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2053 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/helpers/application_helper.rb | 16 ++++++++++++++++ app/helpers/wiki_helper.rb | 16 ---------------- 2 files changed, 16 insertions(+), 16 deletions(-) (limited to 'app/helpers') diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 4a72b022b..248704609 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -119,6 +119,22 @@ module ApplicationHelper end end + def render_page_hierarchy(pages, node=nil) + content = '' + if pages[node] + content << "\n" + end + content + end + # Truncates and returns the string as a single line def truncate_single_line(string, *args) truncate(string, *args).gsub(%r{[\r\n]+}m, ' ') diff --git a/app/helpers/wiki_helper.rb b/app/helpers/wiki_helper.rb index 0a6b810de..c692c748b 100644 --- a/app/helpers/wiki_helper.rb +++ b/app/helpers/wiki_helper.rb @@ -16,22 +16,6 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. module WikiHelper - - def render_page_hierarchy(pages, node=nil) - content = '' - if pages[node] - content << "\n" - end - content - end def html_diff(wdiff) words = wdiff.words.collect{|word| h(word)} -- cgit v1.2.3