diff options
author | Go MAEDA <maeda@farend.jp> | 2019-10-03 00:09:28 +0000 |
---|---|---|
committer | Go MAEDA <maeda@farend.jp> | 2019-10-03 00:09:28 +0000 |
commit | 3ce678510e96fa0ce5459e6b7731878347f686b2 (patch) | |
tree | 6d556d89e83137e55f382af2377abd8bda0f61fa /app/views | |
parent | df1c54146f36e16becb4de7137074238ca496776 (diff) | |
download | redmine-3ce678510e96fa0ce5459e6b7731878347f686b2.tar.gz redmine-3ce678510e96fa0ce5459e6b7731878347f686b2.zip |
Render Textile and Markdown attachments on the preview page (#29752).
Patch by Takenori TAKAKI.
git-svn-id: http://svn.redmine.org/redmine/trunk@18584 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/views')
-rw-r--r-- | app/views/attachments/file.html.erb | 2 | ||||
-rw-r--r-- | app/views/common/_markup.html.erb | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/app/views/attachments/file.html.erb b/app/views/attachments/file.html.erb index af5ea78dc..e19b9127e 100644 --- a/app/views/attachments/file.html.erb +++ b/app/views/attachments/file.html.erb @@ -1,4 +1,4 @@ <%= render :layout => 'layouts/file' do %> - <%= render :partial => 'common/file', :locals => {:content => @content, :filename => @attachment.filename} %> + <%= render_file_content(@attachment, @content) %> <% end %> diff --git a/app/views/common/_markup.html.erb b/app/views/common/_markup.html.erb new file mode 100644 index 000000000..dc6c7f474 --- /dev/null +++ b/app/views/common/_markup.html.erb @@ -0,0 +1,3 @@ +<div class="wiki"> + <%= Redmine::WikiFormatting.to_html(markup_text_formatting, Redmine::CodesetUtil.to_utf8_by_setting(markup_text)).html_safe %> +</div> |