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:
Jacques Distler 2009-10-23 10:05:02 -05:00
parent d880d81b0a
commit f559d8a06d

View file

@ -177,7 +177,7 @@ class UrlGenerator < AbstractUrlGenerator
def wikilink_for(mode, name, text, 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,
:id => name, :only_path => true
%{<a class="existingWikiWord" href="#{href}">#{text}</a>}