diff --git a/lib/redmine/wiki_formatting.rb b/lib/redmine/wiki_formatting.rb index d75b0db7..54d1429d 100644 --- a/lib/redmine/wiki_formatting.rb +++ b/lib/redmine/wiki_formatting.rb @@ -94,34 +94,5 @@ module Redmine end end end - - # Default formatter module - module NullFormatter - class Formatter - include ActionView::Helpers::TagHelper - include ActionView::Helpers::TextHelper - include ActionView::Helpers::UrlHelper - - def initialize(text) - @text = text - end - - def to_html(*args) - simple_format(auto_link(CGI::escapeHTML(@text))) - end - end - - module Helper - def wikitoolbar_for(field_id) - end - - def heads_for_wiki_formatter - end - - def initial_page_content(page) - page.pretty_title.to_s - end - end - end end end diff --git a/lib/redmine/wiki_formatting/null_formatter/formatter.rb b/lib/redmine/wiki_formatting/null_formatter/formatter.rb new file mode 100644 index 00000000..350c8141 --- /dev/null +++ b/lib/redmine/wiki_formatting/null_formatter/formatter.rb @@ -0,0 +1,32 @@ +#-- copyright +# ChiliProject is a project management system. +# +# Copyright (C) 2010-2011 the ChiliProject Team +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# See doc/COPYRIGHT.rdoc for more details. +#++ + +module Redmine + module WikiFormatting + module NullFormatter + class Formatter + include ActionView::Helpers::TagHelper + include ActionView::Helpers::TextHelper + include ActionView::Helpers::UrlHelper + + def initialize(text) + @text = text + end + + def to_html(*args) + simple_format(auto_link(CGI::escapeHTML(@text))) + end + end + end + end +end \ No newline at end of file diff --git a/lib/redmine/wiki_formatting/null_formatter/helper.rb b/lib/redmine/wiki_formatting/null_formatter/helper.rb new file mode 100644 index 00000000..6d4f32c2 --- /dev/null +++ b/lib/redmine/wiki_formatting/null_formatter/helper.rb @@ -0,0 +1,30 @@ +#-- copyright +# ChiliProject is a project management system. +# +# Copyright (C) 2010-2011 the ChiliProject Team +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# See doc/COPYRIGHT.rdoc for more details. +#++ + +module Redmine + module WikiFormatting + module NullFormatter + module Helper + def wikitoolbar_for(field_id) + end + + def heads_for_wiki_formatter + end + + def initial_page_content(page) + page.pretty_title.to_s + end + end + end + end +end \ No newline at end of file