From: Jean-Philippe Lang Date: Sat, 19 Jul 2008 07:29:05 +0000 (+0000) Subject: Fixed: Wiki Linking Fails on News Item Preview (#1661). X-Git-Tag: 0.8.0-RC1~342 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=93201e7386eb8bb2c69f110d934f04feb81ffe93;p=redmine.git Fixed: Wiki Linking Fails on News Item Preview (#1661). git-svn-id: http://redmine.rubyforge.org/svn/trunk@1677 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/app/controllers/news_controller.rb b/app/controllers/news_controller.rb index c9ba6b991..8c1a03a5b 100644 --- a/app/controllers/news_controller.rb +++ b/app/controllers/news_controller.rb @@ -18,7 +18,7 @@ class NewsController < ApplicationController layout 'base' before_filter :find_news, :except => [:new, :index, :preview] - before_filter :find_project, :only => :new + before_filter :find_project, :only => [:new, :preview] before_filter :authorize, :except => [:index, :preview] before_filter :find_optional_project, :only => :index accept_key_auth :index diff --git a/app/views/news/edit.rhtml b/app/views/news/edit.rhtml index a7e5e6e36..4be566e0b 100644 --- a/app/views/news/edit.rhtml +++ b/app/views/news/edit.rhtml @@ -5,7 +5,7 @@ <%= render :partial => 'form', :locals => { :f => f } %> <%= submit_tag l(:button_save) %> <%= link_to_remote l(:label_preview), - { :url => { :controller => 'news', :action => 'preview' }, + { :url => { :controller => 'news', :action => 'preview', :project_id => @project }, :method => 'post', :update => 'preview', :with => "Form.serialize('news-form')" diff --git a/app/views/news/index.rhtml b/app/views/news/index.rhtml index 87db8a5f7..9cac39002 100644 --- a/app/views/news/index.rhtml +++ b/app/views/news/index.rhtml @@ -12,7 +12,7 @@ <%= render :partial => 'news/form', :locals => { :f => f } %> <%= submit_tag l(:button_create) %> <%= link_to_remote l(:label_preview), - { :url => { :controller => 'news', :action => 'preview' }, + { :url => { :controller => 'news', :action => 'preview', :project_id => @project }, :method => 'post', :update => 'preview', :with => "Form.serialize('news-form')" diff --git a/app/views/news/new.rhtml b/app/views/news/new.rhtml index 9208d8840..a4d29a0a9 100644 --- a/app/views/news/new.rhtml +++ b/app/views/news/new.rhtml @@ -5,7 +5,7 @@ <%= render :partial => 'news/form', :locals => { :f => f } %> <%= submit_tag l(:button_create) %> <%= link_to_remote l(:label_preview), - { :url => { :controller => 'news', :action => 'preview' }, + { :url => { :controller => 'news', :action => 'preview', :project_id => @project }, :method => 'post', :update => 'preview', :with => "Form.serialize('news-form')" diff --git a/app/views/news/show.rhtml b/app/views/news/show.rhtml index cc9fe1fbb..78be9c247 100644 --- a/app/views/news/show.rhtml +++ b/app/views/news/show.rhtml @@ -15,7 +15,7 @@ <%= render :partial => 'form', :locals => { :f => f } %> <%= submit_tag l(:button_save) %> <%= link_to_remote l(:label_preview), - { :url => { :controller => 'news', :action => 'preview' }, + { :url => { :controller => 'news', :action => 'preview', :project_id => @project }, :method => 'post', :update => 'preview', :with => "Form.serialize('news-form')"