|
1 | NO CONTENT: new file 100644, binary diff hidden |
@@ -142,17 +142,17 module ApplicationHelper | |||
|
142 | 142 | # example: |
|
143 | 143 | # [[link]] -> "link":link |
|
144 | 144 | # [[link|title]] -> "title":link |
|
145 |
text = text.gsub(/\[\[([^\]\|]+)(\|([^\]\|]+))?\]\]/) {|m| |
|
|
145 | text = text.gsub(/\[\[([^\]\|]+)(\|([^\]\|]+))?\]\]/) {|m| link_to(($3 || $1), format_wiki_link.call(Wiki.titleize($1)), :class => 'wiki-page') } | |
|
146 | 146 | |
|
147 | 147 | # turn issue ids into links |
|
148 | 148 | # example: |
|
149 | 149 | # #52 -> <a href="/issues/show/52">#52</a> |
|
150 | text = text.gsub(/#(\d+)(?=\b)/) {|m| link_to "##{$1}", :controller => 'issues', :action => 'show', :id => $1} | |
|
150 | text = text.gsub(/#(\d+)(?=\b)/) {|m| link_to "##{$1}", {:controller => 'issues', :action => 'show', :id => $1}, :class => 'issue' } | |
|
151 | 151 | |
|
152 | 152 | # turn revision ids into links (@project needed) |
|
153 | 153 | # example: |
|
154 | 154 | # r52 -> <a href="/repositories/revision/6?rev=52">r52</a> (@project.id is 6) |
|
155 | text = text.gsub(/(?=\b)r(\d+)(?=\b)/) {|m| link_to "r#{$1}", :controller => 'repositories', :action => 'revision', :id => @project.id, :rev => $1} if @project | |
|
155 | 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 | |
|
156 | 156 | |
|
157 | 157 | # when using an image link, try to use an attachment, if possible |
|
158 | 158 | attachments = options[:attachments] |
@@ -639,6 +639,18 div.wiki table, div.wiki td { | |||
|
639 | 639 | padding: 4px; |
|
640 | 640 | } |
|
641 | 641 | |
|
642 | div.wiki a { | |
|
643 | background-position: 0% 60%; | |
|
644 | background-repeat: no-repeat; | |
|
645 | padding-left: 12px; | |
|
646 | background-image: url(../images/external.png); | |
|
647 | } | |
|
648 | ||
|
649 | div.wiki a.wiki-page, div.wiki a.issue, div.wiki a.changeset { | |
|
650 | padding-left: 0; | |
|
651 | background-image: none; | |
|
652 | } | |
|
653 | ||
|
642 | 654 | div.wiki code { |
|
643 | 655 | font-size: 1.2em; |
|
644 | 656 | } |
General Comments 0
You need to be logged in to leave comments.
Login now