diff options
author | Go MAEDA <maeda@farend.jp> | 2020-02-04 05:32:04 +0000 |
---|---|---|
committer | Go MAEDA <maeda@farend.jp> | 2020-02-04 05:32:04 +0000 |
commit | a0b909d523969194f0bf1adeb862e2c4335e32e9 (patch) | |
tree | caa4e183d015c85f9ac0ae42b444043e97439645 /app/views/repositories | |
parent | 01f523f1658bdac92cfd2d1bfeb6999db2f23b46 (diff) | |
download | redmine-a0b909d523969194f0bf1adeb862e2c4335e32e9.tar.gz redmine-a0b909d523969194f0bf1adeb862e2c4335e32e9.zip |
Repository browser does not render previews for audio/video files (#32153).
Patch by Mizuki ISHIKAWA.
git-svn-id: http://svn.redmine.org/redmine/trunk@19492 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/views/repositories')
-rw-r--r-- | app/views/repositories/entry.html.erb | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/app/views/repositories/entry.html.erb b/app/views/repositories/entry.html.erb index 99c611104..2cc1a0859 100644 --- a/app/views/repositories/entry.html.erb +++ b/app/views/repositories/entry.html.erb @@ -9,11 +9,7 @@ <%= render :partial => 'link_to_functions' %> <% if Redmine::MimeType.is_type?('image', @path) %> - <%= render :partial => 'common/image', :locals => {:path => url_for(:action => 'raw', - :id => @project, - :repository_id => @repository.identifier_param, - :path => @path, - :rev => @rev), :alt => @path} %> + <%= render :partial => 'common/image', :locals => {:path => @raw_url, :alt => @path} %> <% elsif @content %> <%= render :partial => 'common/file', :locals => {:filename => @path, :content => @content} %> <% else %> @@ -24,14 +20,11 @@ end %> <%= render :partial => 'common/other', :locals => { - :path => (url_for(params.merge(:action => 'raw')) if @allow_download), + :path => (@raw_url if @repository.supports_cat?), :kind => kind, :download_link => @repository.supports_cat? ? link_to( l(:label_no_preview_download), - { :action => 'raw', :id => @project, - :repository_id => @repository.identifier_param, - :path => to_path_param(@path), - :rev => @rev }, + @raw_url, :class => 'icon icon-download') : nil } %> <% end %> |