diff --git a/app/helpers/routes_helper.rb b/app/helpers/routes_helper.rb index b8415a5..85d60a2 100644 --- a/app/helpers/routes_helper.rb +++ b/app/helpers/routes_helper.rb @@ -29,6 +29,14 @@ module RoutesHelper end end + def _project_news_path(project, *args) + if project + project_news_index_path(project, *args) + else + news_index_path(*args) + end + end + def _new_project_issue_path(project, *args) if project new_project_issue_path(project, *args) diff --git a/app/views/activities/index.html.erb b/app/views/activities/index.html.erb index d939fdc..8f5cd08 100644 --- a/app/views/activities/index.html.erb +++ b/app/views/activities/index.html.erb @@ -42,7 +42,7 @@ <% end %> <% content_for :header_tags do %> -<%= auto_discovery_link_tag(:atom, params.merge(:format => 'atom', :from => nil, :key => User.current.rss_key)) %> +<%= auto_discovery_link_tag(:atom, :params => request.query_parameters.merge(:from => nil, :key => User.current.rss_key), :format => 'atom') %> <% end %> <% content_for :sidebar do %> diff --git a/app/views/common/feed.atom.builder b/app/views/common/feed.atom.builder index 74cebc5..893400d 100644 --- a/app/views/common/feed.atom.builder +++ b/app/views/common/feed.atom.builder @@ -1,8 +1,8 @@ xml.instruct! xml.feed "xmlns" => "http://www.w3.org/2005/Atom" do xml.title truncate_single_line_raw(@title, 100) - xml.link "rel" => "self", "href" => url_for(params.merge(:only_path => false)) - xml.link "rel" => "alternate", "href" => url_for(params.merge(:only_path => false, :format => nil, :key => nil)) + xml.link "rel" => "self", "href" => url_for(:params => request.query_parameters, :only_path => false, :format => 'atom') + xml.link "rel" => "alternate", "href" => url_for(:params => request.query_parameters.merge(:format => nil, :key => nil), :only_path => false) xml.id home_url xml.icon favicon_url xml.updated((@items.first ? @items.first.event_datetime : Time.now).xmlschema) diff --git a/app/views/news/index.html.erb b/app/views/news/index.html.erb index 64614c1..2ff5a1c 100644 --- a/app/views/news/index.html.erb +++ b/app/views/news/index.html.erb @@ -44,7 +44,7 @@ <% end %> <% content_for :header_tags do %> - <%= auto_discovery_link_tag(:atom, params.merge({:format => 'atom', :page => nil, :key => User.current.rss_key})) %> + <%= auto_discovery_link_tag(:atom, _project_news_path(@project, :key => User.current.rss_key, :format => 'atom')) %> <%= stylesheet_link_tag 'scm' %> <% end %> diff --git a/app/views/repositories/entry.html.erb b/app/views/repositories/entry.html.erb index 37a5db9..b495dd4 100644 --- a/app/views/repositories/entry.html.erb +++ b/app/views/repositories/entry.html.erb @@ -9,7 +9,11 @@ <%= render :partial => 'link_to_functions' %> <% if Redmine::MimeType.is_type?('image', @path) %> - <%= render :partial => 'common/image', :locals => {:path => url_for(params.merge(:action => 'raw')), :alt => @path} %> + <%= render :partial => 'common/image', :locals => {:path => url_for(:action => 'raw', + :id => @project, + :repository_id => @repository.identifier_param, + :path => @path, + :rev => @rev), :alt => @path} %> <% elsif @content %> <%= render :partial => 'common/file', :locals => {:filename => @path, :content => @content} %> <% else %> diff --git a/app/views/repositories/revisions.html.erb b/app/views/repositories/revisions.html.erb index c0afb95..fc22210 100644 --- a/app/views/repositories/revisions.html.erb +++ b/app/views/repositories/revisions.html.erb @@ -23,8 +23,8 @@ <%= stylesheet_link_tag "scm" %> <%= auto_discovery_link_tag( :atom, - params.merge( - {:format => 'atom', :page => nil, :key => User.current.rss_key})) %> + :params => request.query_parameters.merge(:page => nil, :key => User.current.rss_key), + :format => 'atom') %> <% end %> <% other_formats_links do |f| %> diff --git a/app/views/repositories/show.html.erb b/app/views/repositories/show.html.erb index b89bbf9..d96a737 100644 --- a/app/views/repositories/show.html.erb +++ b/app/views/repositories/show.html.erb @@ -42,9 +42,10 @@ <% if @repository.supports_all_revisions? %> <% content_for :header_tags do %> <%= auto_discovery_link_tag( - :atom, params.merge( - {:format => 'atom', :action => 'revisions', - :id => @project, :page => nil, :key => User.current.rss_key})) %> + :atom, + :action => 'revisions', :id => @project, + :repository_id => @repository.identifier_param, + :key => User.current.rss_key) %> <% end %> <% other_formats_links do |f| %>