Uploaded Pictures Should Display in "Published" Mode

This commit is contained in:
Jacques Distler 2008-12-20 13:56:50 -06:00
parent 5a86d874f7
commit 1f816af24b
3 changed files with 11 additions and 4 deletions

View file

@ -105,6 +105,8 @@ class UrlGenerator < AbstractUrlGenerator
end
def pic_link(mode, name, text, web_address, known_pic)
href = @controller.url_for :controller => 'file', :web => web_address, :action => 'file',
:id => name
case mode
when :export
if known_pic
@ -114,13 +116,11 @@ class UrlGenerator < AbstractUrlGenerator
end
when :publish
if known_pic
%{<img alt="#{text}" src="#{CGI.escape(name)}" />}
%{<img alt="#{text}" src="#{href}" />}
else
%{<span class="newWikiWord">#{text}</span>}
end
else
href = @controller.url_for :controller => 'file', :web => web_address, :action => 'file',
:id => name
if known_pic
%{<img alt="#{text}" src="#{href}" />}
else