Uploaded Pictures Should Display in "Published" Mode
This commit is contained in:
parent
5a86d874f7
commit
1f816af24b
3 changed files with 11 additions and 4 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue