From a0b909d523969194f0bf1adeb862e2c4335e32e9 Mon Sep 17 00:00:00 2001 From: Go MAEDA Date: Tue, 4 Feb 2020 05:32:04 +0000 Subject: 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 --- app/views/repositories/entry.html.erb | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) (limited to 'app/views/repositories') 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 %> -- cgit v1.2.3