mirror of
https://github.com/redmine/redmine.git
synced 2025-11-09 14:56:01 +01:00
Fixes that diff of a javascript file in repository module is not displayed with layout in Rails 7.1
(#39747, #36320). git-svn-id: https://svn.redmine.org/redmine/trunk@22563 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -48,7 +48,7 @@
|
||||
<% end -%>
|
||||
|
||||
<% other_formats_links do |f| %>
|
||||
<%= f.link_to_with_query_parameters 'Diff', {}, :caption => 'Unified diff' %>
|
||||
<%= f.link_to_with_query_parameters 'Diff', { path: nil }, :caption => 'Unified diff' %>
|
||||
<% end %>
|
||||
|
||||
<% html_title(with_leading_slash(@path), 'Diff') -%>
|
||||
|
||||
@@ -299,12 +299,13 @@ Rails.application.routes.draw do
|
||||
|
||||
get "projects/:id/repository/:repository_id/revisions/:rev/diff(/*path)",
|
||||
:to => 'repositories#diff',
|
||||
:format => false,
|
||||
:constraints => {:rev => /[a-z0-9\.\-_]+/, :path => /.*/}
|
||||
:format => 'html',
|
||||
:constraints => {:rev => /[a-z0-9\.\-_]+/, :path => /.*/, format: /(html|diff)/ }
|
||||
|
||||
get "projects/:id/repository/:repository_id/diff(/*path)",
|
||||
:to => 'repositories#diff',
|
||||
:format => false,
|
||||
:constraints => {:path => /.*/}
|
||||
:format => 'html',
|
||||
:constraints => {:path => /.*/, format: /(html|diff)/ }
|
||||
|
||||
get 'projects/:id/repository/:repository_id/show/*path', :to => 'repositories#show', :format => 'html', :constraints => {:path => /.*/}
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@ class RoutingRepositoriesTest < Redmine::RoutingTest
|
||||
|
||||
should_route 'GET /projects/foo/repository/foo/revisions/2457' => 'repositories#revision', :id => 'foo', :repository_id => 'foo', :rev => '2457'
|
||||
should_route 'GET /projects/foo/repository/foo/revisions/2457/show' => 'repositories#show', :id => 'foo', :repository_id => 'foo', :rev => '2457', :format => 'html'
|
||||
should_route 'GET /projects/foo/repository/foo/revisions/2457/diff' => 'repositories#diff', :id => 'foo', :repository_id => 'foo', :rev => '2457'
|
||||
should_route 'GET /projects/foo/repository/foo/revisions/2457/diff' => 'repositories#diff', :id => 'foo', :repository_id => 'foo', :rev => '2457', :format => 'html'
|
||||
|
||||
%w(show entry raw annotate).each do |action|
|
||||
@paths.each do |path|
|
||||
@@ -66,7 +66,7 @@ class RoutingRepositoriesTest < Redmine::RoutingTest
|
||||
end
|
||||
@paths.each do |path|
|
||||
should_route "GET /projects/foo/repository/foo/revisions/2457/diff/#{path}" => "repositories#diff",
|
||||
:id => 'foo', :repository_id => 'foo', :rev => '2457', :path => path
|
||||
:id => 'foo', :repository_id => 'foo', :rev => '2457', :path => path, :format => 'html'
|
||||
end
|
||||
end
|
||||
|
||||
@@ -85,7 +85,7 @@ class RoutingRepositoriesTest < Redmine::RoutingTest
|
||||
end
|
||||
@paths.each do |path|
|
||||
should_route "GET /projects/foo/repository/svn/diff/#{path}" => "repositories#diff",
|
||||
:id => 'foo', :repository_id => 'svn', :path => path
|
||||
:id => 'foo', :repository_id => 'svn', :path => path, :format => 'html'
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user