wiki initial commit

git-svn-id: http://redmine.rubyforge.org/svn/branches/work@290 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang committed 2007-03-04 13:40:21 +00:00
1 parent c32c92bfa9
commit 003960b811
47 files changed
+1876 -4

No files matched your search

+4 -2
View File
@@ -63,7 +63,7 @@ module ApplicationHelper
end
def format_time(time)
l_datetime(time) if time
l_datetime((time.is_a? String) ? time.to_time : time) if time
end
def day_name(day)
@@ -93,7 +93,9 @@ module ApplicationHelper
end
def textilizable(text)
text = (Setting.text_formatting == 'textile') && (ActionView::Helpers::TextHelper.method_defined? "textilize") ? RedCloth.new(h(text)).to_html : simple_format(auto_link(h(text)))
# turn wiki links in textile links: "text":url
text = text.gsub(/\[\[([^\]]+)\]\]/) {|m| "\"#{$1}\":/wiki/#{@project.id}/#{Wiki.titleize($1)}" } if @project
text = (Setting.text_formatting == 'textile') && (ActionView::Helpers::TextHelper.method_defined? "textilize") ? auto_link(RedCloth.new(text, [:filter_html]).to_html) : simple_format(auto_link(h(text)))
# turn "#id" patterns into links to issues
text = text.gsub(/#(\d+)([^;\d])/, "<a href='/issues/show/\\1'>#\\1</a>\\2")
end
+19
View File
@@ -0,0 +1,19 @@
# redMine - project management software
# Copyright (C) 2006-2007 Jean-Philippe Lang
#
# 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.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
module WikiHelper
end