summaryrefslogtreecommitdiffstats
path: root/app/helpers
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2007-08-01 19:38:13 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2007-08-01 19:38:13 +0000
commitefbe29249c49936fa31a812c1ab27dab92c69fbd (patch)
treed18392080e2485ad579a30ab94195928ca4b0169 /app/helpers
parent188077d6345ebaed00555c25092cb43ec46b5531 (diff)
downloadredmine-efbe29249c49936fa31a812c1ab27dab92c69fbd.tar.gz
redmine-efbe29249c49936fa31a812c1ab27dab92c69fbd.zip
Added icon on external wiki links
git-svn-id: http://redmine.rubyforge.org/svn/trunk@597 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/helpers')
-rw-r--r--app/helpers/application_helper.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index 7bb809991..2293fcdc0 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -142,17 +142,17 @@ module ApplicationHelper
# example:
# [[link]] -> "link":link
# [[link|title]] -> "title":link
- text = text.gsub(/\[\[([^\]\|]+)(\|([^\]\|]+))?\]\]/) {|m| "\"#{$3 || $1}\":" + format_wiki_link.call(Wiki.titleize($1)) }
+ text = text.gsub(/\[\[([^\]\|]+)(\|([^\]\|]+))?\]\]/) {|m| link_to(($3 || $1), format_wiki_link.call(Wiki.titleize($1)), :class => 'wiki-page') }
# turn issue ids into links
# example:
# #52 -> <a href="/issues/show/52">#52</a>
- text = text.gsub(/#(\d+)(?=\b)/) {|m| link_to "##{$1}", :controller => 'issues', :action => 'show', :id => $1}
+ text = text.gsub(/#(\d+)(?=\b)/) {|m| link_to "##{$1}", {:controller => 'issues', :action => 'show', :id => $1}, :class => 'issue' }
# turn revision ids into links (@project needed)
# example:
# r52 -> <a href="/repositories/revision/6?rev=52">r52</a> (@project.id is 6)
- text = text.gsub(/(?=\b)r(\d+)(?=\b)/) {|m| link_to "r#{$1}", :controller => 'repositories', :action => 'revision', :id => @project.id, :rev => $1} if @project
+ text = text.gsub(/(?=\b)r(\d+)(?=\b)/) {|m| link_to "r#{$1}", {:controller => 'repositories', :action => 'revision', :id => @project.id, :rev => $1}, :class => 'changeset' } if @project
# when using an image link, try to use an attachment, if possible
attachments = options[:attachments]