Intra-Web Links in S5 Slideshows on Published Webs
Never really thought through where those should go. They now point to the published version.
This commit is contained in:
parent
d880d81b0a
commit
f559d8a06d
|
@ -177,7 +177,7 @@ class UrlGenerator < AbstractUrlGenerator
|
||||||
|
|
||||||
def wikilink_for(mode, name, text, web_address)
|
def wikilink_for(mode, name, text, web_address)
|
||||||
web = Web.find_by_address(web_address)
|
web = Web.find_by_address(web_address)
|
||||||
action = web.published? && !(web == @web && mode != :publish) ? 'published' : 'show'
|
action = web.published? && !(web == @web && ![:publish, :s5].include?(mode) ) ? 'published' : 'show'
|
||||||
href = @controller.url_for :controller => 'wiki', :web => web_address, :action => action,
|
href = @controller.url_for :controller => 'wiki', :web => web_address, :action => action,
|
||||||
:id => name, :only_path => true
|
:id => name, :only_path => true
|
||||||
%{<a class="existingWikiWord" href="#{href}">#{text}</a>}
|
%{<a class="existingWikiWord" href="#{href}">#{text}</a>}
|
||||||
|
|
Loading…
Reference in a new issue