From 0100011e5cdc4532b925c7b09e0b4a61532cd809 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Fri, 13 Mar 2009 17:45:47 +0000 Subject: [PATCH] Fixing repository routes (#2967). git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2581 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- .../repositories/_dir_list_content.rhtml | 1 + app/views/repositories/browse.rhtml | 2 +- app/views/repositories/show.rhtml | 2 +- config/routes.rb | 20 +++++++++---------- 4 files changed, 13 insertions(+), 12 deletions(-) diff --git a/app/views/repositories/_dir_list_content.rhtml b/app/views/repositories/_dir_list_content.rhtml index 3fad7c02c..799318134 100644 --- a/app/views/repositories/_dir_list_content.rhtml +++ b/app/views/repositories/_dir_list_content.rhtml @@ -5,6 +5,7 @@ <% if entry.is_dir? %> -<% form_tag do %> +<% form_tag({}, :method => :get) do %> <%= l(:label_revision) %>: <%= text_field_tag 'rev', @rev, :size => 5 %> <% end %> diff --git a/app/views/repositories/show.rhtml b/app/views/repositories/show.rhtml index 943fe9485..a0f7dc33c 100644 --- a/app/views/repositories/show.rhtml +++ b/app/views/repositories/show.rhtml @@ -3,7 +3,7 @@ <%= link_to l(:label_statistics), {:action => 'stats', :id => @project}, :class => 'icon icon-stats' %> <% if !@entries.nil? && authorize_for('repositories', 'browse') -%> -<% form_tag(:action => 'browse', :id => @project) do -%> +<% form_tag({:action => 'browse', :id => @project}, :method => :get) do -%> | <%= l(:label_revision) %>: <%= text_field_tag 'rev', @rev, :size => 5 %> <% end -%> <% end -%> diff --git a/config/routes.rb b/config/routes.rb index 307a38bd9..b5d4d51e3 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -209,16 +209,16 @@ ActionController::Routing::Routes.draw do |map| map.with_options :controller => 'repositories' do |repositories| repositories.with_options :conditions => {:method => :get} do |repository_views| - repositories.connect 'projects/:id/repository', :action => 'show' - repositories.connect 'projects/:id/repository/edit', :action => 'edit' - repositories.connect 'projects/:id/repository/statistics', :action => 'stats' - repositories.connect 'projects/:id/repository/revisions', :action => 'revisions' - repositories.connect 'projects/:id/repository/revisions.:format', :action => 'revisions' - repositories.connect 'projects/:id/repository/revisions/:rev', :action => 'revision' - repositories.connect 'projects/:id/repository/revisions/:rev/diff', :action => 'diff' - repositories.connect 'projects/:id/repository/revisions/:rev/diff.:format', :action => 'diff' - repositories.connect 'projects/:id/repository/revisions/:rev/:action/*path' - repositories.connect 'projects/:id/repository/:action/*path' + repository_views.connect 'projects/:id/repository', :action => 'show' + repository_views.connect 'projects/:id/repository/edit', :action => 'edit' + repository_views.connect 'projects/:id/repository/statistics', :action => 'stats' + repository_views.connect 'projects/:id/repository/revisions', :action => 'revisions' + repository_views.connect 'projects/:id/repository/revisions.:format', :action => 'revisions' + repository_views.connect 'projects/:id/repository/revisions/:rev', :action => 'revision' + repository_views.connect 'projects/:id/repository/revisions/:rev/diff', :action => 'diff' + repository_views.connect 'projects/:id/repository/revisions/:rev/diff.:format', :action => 'diff' + repository_views.connect 'projects/:id/repository/revisions/:rev/:action/*path' + repository_views.connect 'projects/:id/repository/:action/*path' end repositories.connect 'projects/:id/repository/edit', :action => 'edit', :conditions => {:method => :post} -- 2.39.5