Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
O
OHR Support
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
97
Issues
97
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
OHR Support
Commits
8ee8ef02
Commit
8ee8ef02
authored
Oct 16, 2011
by
Holger Just
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Extract the NullFormatter into its own files
parent
a8e997db
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
62 additions
and
29 deletions
+62
-29
wiki_formatting.rb
lib/redmine/wiki_formatting.rb
+0
-29
formatter.rb
lib/redmine/wiki_formatting/null_formatter/formatter.rb
+32
-0
helper.rb
lib/redmine/wiki_formatting/null_formatter/helper.rb
+30
-0
No files found.
lib/redmine/wiki_formatting.rb
View file @
8ee8ef02
...
...
@@ -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
lib/redmine/wiki_formatting/null_formatter/formatter.rb
0 → 100644
View file @
8ee8ef02
#-- 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
lib/redmine/wiki_formatting/null_formatter/helper.rb
0 → 100644
View file @
8ee8ef02
#-- 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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment