Fixed: file upload on wiki page broken by recent refactoring (#6724).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4274 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
432b00df40
commit
d9652183f6
|
@ -35,7 +35,7 @@
|
||||||
<div id="wiki_add_attachment">
|
<div id="wiki_add_attachment">
|
||||||
<p><%= link_to l(:label_attachment_new), {}, :onclick => "Element.show('add_attachment_form'); Element.hide(this); Element.scrollTo('add_attachment_form'); return false;",
|
<p><%= link_to l(:label_attachment_new), {}, :onclick => "Element.show('add_attachment_form'); Element.hide(this); Element.scrollTo('add_attachment_form'); return false;",
|
||||||
:id => 'attach_files_link' %></p>
|
:id => 'attach_files_link' %></p>
|
||||||
<% form_tag({ :controller => 'wiki', :action => 'add_attachment', :page => @page.title }, :multipart => true, :id => "add_attachment_form", :style => "display:none;") do %>
|
<% form_tag({ :controller => 'wiki', :action => 'add_attachment', :project_id => @project, :page => @page.title }, :multipart => true, :id => "add_attachment_form", :style => "display:none;") do %>
|
||||||
<div class="box">
|
<div class="box">
|
||||||
<p><%= render :partial => 'attachments/form' %></p>
|
<p><%= render :partial => 'attachments/form' %></p>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -41,7 +41,7 @@ ActionController::Routing::Routes.draw do |map|
|
||||||
end
|
end
|
||||||
|
|
||||||
wiki_routes.connect 'projects/:project_id/wiki/:page/:action',
|
wiki_routes.connect 'projects/:project_id/wiki/:page/:action',
|
||||||
:action => /rename|destroy|preview|protect/,
|
:action => /rename|destroy|preview|protect|add_attachment/,
|
||||||
:conditions => {:method => :post}
|
:conditions => {:method => :post}
|
||||||
|
|
||||||
wiki_routes.connect 'projects/:project_id/wiki/:page/edit', :action => 'update', :conditions => {:method => :post}
|
wiki_routes.connect 'projects/:project_id/wiki/:page/edit', :action => 'update', :conditions => {:method => :post}
|
||||||
|
|
|
@ -327,6 +327,7 @@ class RoutingTest < ActionController::IntegrationTest
|
||||||
should_route :post, "/projects/22/wiki/ladida/rename", :controller => 'wiki', :action => 'rename', :project_id => '22', :page => 'ladida'
|
should_route :post, "/projects/22/wiki/ladida/rename", :controller => 'wiki', :action => 'rename', :project_id => '22', :page => 'ladida'
|
||||||
should_route :post, "/projects/22/wiki/ladida/destroy", :controller => 'wiki', :action => 'destroy', :project_id => '22', :page => 'ladida'
|
should_route :post, "/projects/22/wiki/ladida/destroy", :controller => 'wiki', :action => 'destroy', :project_id => '22', :page => 'ladida'
|
||||||
should_route :post, "/projects/22/wiki/ladida/protect", :controller => 'wiki', :action => 'protect', :project_id => '22', :page => 'ladida'
|
should_route :post, "/projects/22/wiki/ladida/protect", :controller => 'wiki', :action => 'protect', :project_id => '22', :page => 'ladida'
|
||||||
|
should_route :post, "/projects/22/wiki/ladida/add_attachment", :controller => 'wiki', :action => 'add_attachment', :project_id => '22', :page => 'ladida'
|
||||||
end
|
end
|
||||||
|
|
||||||
context "wikis (plural, admin setup)" do
|
context "wikis (plural, admin setup)" do
|
||||||
|
|
Loading…
Reference in New Issue