30 lines
1.1 KiB
Plaintext
30 lines
1.1 KiB
Plaintext
<div class='externalfilterblock'>
|
|
<%
|
|
case content_type
|
|
when /image\// then
|
|
%>
|
|
<img src='<%= url_for(:controller => 'wiki_external_filter', :action => 'filter', :macro => macro, :name => name) %>' alt="<%= h source %>" />
|
|
<%
|
|
when /text\/plain/ then
|
|
%>
|
|
<pre><%= h content %></pre>
|
|
<%
|
|
when /\/.*(x|ht)ml/ then
|
|
%>
|
|
<div><%= content %></div>
|
|
<%
|
|
else
|
|
%>
|
|
<object class='externalfilterinline' name='<%= name %>' data='<%= url_for(:controller => 'wiki_external_filter', :action => 'filter', :macro => macro, :name => name) %>' type='<%= content_type %>' title="<%= h source %>">
|
|
<embed name='<%= name %>-2' src='<%= url_for(:controller => 'wiki_external_filter', :action => 'filter', :macro => macro, :name => name) %>' type='<%= content_type %>' title="<%= h source %>" />
|
|
</object>
|
|
<%
|
|
end
|
|
%>
|
|
<br/>
|
|
<span class='wiki_page'>Goto source: [[<%= wiki_name %>]]</span>
|
|
</div>
|
|
<% content_for :header_tags do %>
|
|
<%= stylesheet_link_tag "wiki_external_filter.css", :plugin => "wiki_external_filter", :media => :all %>
|
|
<% end %>
|