Refactor: change :id on WikiController to use :project_id

Using :id to track projects on non-project controllers is confusing and
makes routing with resources difficult.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4265 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Eric Davis
2010-10-20 21:26:30 +00:00
parent c058bc2245
commit d3381fb518
10 changed files with 82 additions and 81 deletions

View File

@@ -18,7 +18,7 @@
<% @annotate.lines.each do |line| -%>
<tr class="bloc-<%= colors[line[0]] %>">
<th class="line-num"><%= line_num %></th>
<td class="revision"><%= link_to line[0], :controller => 'wiki', :action => 'index', :id => @project, :page => @page.title, :version => line[0] %></td>
<td class="revision"><%= link_to line[0], :controller => 'wiki', :action => 'index', :project_id => @project, :page => @page.title, :version => line[0] %></td>
<td class="author"><%= h(line[1]) %></td>
<td class="line-code"><pre><%=h line[2] %></pre></td>
</tr>

View File

@@ -15,5 +15,5 @@
</div>
<%= submit_tag l(:button_apply) %>
<%= link_to l(:button_cancel), :controller => 'wiki', :action => 'index', :id => @project, :page => @page.title %>
<%= link_to l(:button_cancel), :controller => 'wiki', :action => 'index', :project_id => @project, :page => @page.title %>
<% end %>

View File

@@ -10,7 +10,7 @@
<p><%= submit_tag l(:button_save) %>
<%= link_to_remote l(:label_preview),
{ :url => { :controller => 'wiki', :action => 'preview', :id => @project, :page => @page.title },
{ :url => { :controller => 'wiki', :action => 'preview', :project_id => @project, :page => @page.title },
:method => 'post',
:update => 'preview',
:with => "Form.serialize('wiki_form')",

View File

@@ -3,6 +3,7 @@
<h3><%= l(:label_history) %></h3>
<% form_tag({:action => "diff"}, :method => :get) do %>
<%= hidden_field_tag('project_id', h(@project.to_param)) %>
<table class="list">
<thead><tr>
<th>#</th>