summaryrefslogtreecommitdiffstats
path: root/app/views/repositories
diff options
context:
space:
mode:
authorGo MAEDA <maeda@farend.jp>2021-05-28 08:37:30 +0000
committerGo MAEDA <maeda@farend.jp>2021-05-28 08:37:30 +0000
commit5ac8f70d108a4d41e3f5954845bf64946e5caa28 (patch)
treee883e410a2b637d01e6701a3df51025cca6298a4 /app/views/repositories
parent66fc9f463dbca69529df106338cafcc46f5fa115 (diff)
downloadredmine-5ac8f70d108a4d41e3f5954845bf64946e5caa28.tar.gz
redmine-5ac8f70d108a4d41e3f5954845bf64946e5caa28.zip
Render Textile and Markdown files in the repository browser (#16849).
Patch by Takenori TAKAKI. git-svn-id: http://svn.redmine.org/redmine/trunk@21013 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/views/repositories')
-rw-r--r--app/views/repositories/entry.html.erb4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/views/repositories/entry.html.erb b/app/views/repositories/entry.html.erb
index 2cc1a0859..4f8678bea 100644
--- a/app/views/repositories/entry.html.erb
+++ b/app/views/repositories/entry.html.erb
@@ -10,6 +10,10 @@
<% if Redmine::MimeType.is_type?('image', @path) %>
<%= render :partial => 'common/image', :locals => {:path => @raw_url, :alt => @path} %>
+<% elsif Redmine::MimeType.of(@path) == 'text/x-textile' %>
+ <%= render :partial => 'common/markup', :locals => {:markup_text_formatting => 'textile', :markup_text => @content} %>
+<% elsif Redmine::MimeType.of(@path) == 'text/markdown' %>
+ <%= render :partial => 'common/markup', :locals => {:markup_text_formatting => 'markdown', :markup_text => @content} %>
<% elsif @content %>
<%= render :partial => 'common/file', :locals => {:filename => @path, :content => @content} %>
<% else %>