Simplification
The last commit means we can simplify the url_generator.rb a bit more. It's still an ugly beast.
This commit is contained in:
parent
761f8bbb51
commit
d880d81b0a
|
@ -102,14 +102,6 @@ class UrlGenerator < AbstractUrlGenerator
|
||||||
else
|
else
|
||||||
%{<span class="newWikiWord">#{text}</span>}
|
%{<span class="newWikiWord">#{text}</span>}
|
||||||
end
|
end
|
||||||
when :show
|
|
||||||
if known_page
|
|
||||||
wikilink_for(mode, name, text, web_address)
|
|
||||||
else
|
|
||||||
href = @controller.url_for :controller => 'wiki', :web => web_address, :action => 'new',
|
|
||||||
:id => name, :only_path => true
|
|
||||||
%{<span class="newWikiWord">#{text}<a href="#{href}">?</a></span>}
|
|
||||||
end
|
|
||||||
else
|
else
|
||||||
if known_page
|
if known_page
|
||||||
wikilink_for(mode, name, text, web_address)
|
wikilink_for(mode, name, text, web_address)
|
||||||
|
|
Loading…
Reference in a new issue