diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2008-02-12 18:31:15 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2008-02-12 18:31:15 +0000 |
commit | 30a7314b861f1c61d8dbc27d2d57b2146ce57855 (patch) | |
tree | 79b8f429f1452fc18f0c54e347182e0344559ab9 | |
parent | c5d998528fedb6652074c06132cabd9435a4d5be (diff) | |
download | redmine-30a7314b861f1c61d8dbc27d2d57b2146ce57855.tar.gz redmine-30a7314b861f1c61d8dbc27d2d57b2146ce57855.zip |
Fixed: wiki and changeset links not displayed when previewing issue description or notes.
git-svn-id: http://redmine.rubyforge.org/svn/trunk@1138 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r-- | app/controllers/issues_controller.rb | 4 | ||||
-rw-r--r-- | app/controllers/journals_controller.rb | 1 | ||||
-rw-r--r-- | app/views/issues/_edit.rhtml | 2 | ||||
-rw-r--r-- | app/views/issues/new.rhtml | 2 |
4 files changed, 5 insertions, 4 deletions
diff --git a/app/controllers/issues_controller.rb b/app/controllers/issues_controller.rb index 85151e905..b0e82d365 100644 --- a/app/controllers/issues_controller.rb +++ b/app/controllers/issues_controller.rb @@ -21,7 +21,7 @@ class IssuesController < ApplicationController before_filter :find_issue, :only => [:show, :edit, :destroy_attachment] before_filter :find_issues, :only => [:bulk_edit, :move, :destroy] - before_filter :find_project, :only => [:new, :update_form] + before_filter :find_project, :only => [:new, :update_form, :preview] before_filter :authorize, :except => [:index, :changes, :preview, :update_form, :context_menu] before_filter :find_optional_project, :only => [:index, :changes] accept_key_auth :index, :changes @@ -311,7 +311,7 @@ class IssuesController < ApplicationController end def preview - issue = Issue.find_by_id(params[:id]) + issue = @project.issues.find_by_id(params[:id]) @attachements = issue.attachments if issue @text = params[:notes] || (params[:issue] ? params[:issue][:description] : nil) render :partial => 'common/preview' diff --git a/app/controllers/journals_controller.rb b/app/controllers/journals_controller.rb index b867b4ae6..05d41fa30 100644 --- a/app/controllers/journals_controller.rb +++ b/app/controllers/journals_controller.rb @@ -34,6 +34,7 @@ private def find_journal @journal = Journal.find(params[:id]) render_403 and return false unless @journal.editable_by?(User.current) + @project = @journal.journalized.project rescue ActiveRecord::RecordNotFound render_404 end diff --git a/app/views/issues/_edit.rhtml b/app/views/issues/_edit.rhtml index 5bd685e47..7c4cf501c 100644 --- a/app/views/issues/_edit.rhtml +++ b/app/views/issues/_edit.rhtml @@ -28,7 +28,7 @@ <%= f.hidden_field :lock_version %> <%= submit_tag l(:button_submit) %> <%= link_to_remote l(:label_preview), - { :url => { :controller => 'issues', :action => 'preview', :id => @issue }, + { :url => { :controller => 'issues', :action => 'preview', :project_id => @project, :id => @issue }, :method => 'post', :update => 'preview', :with => 'Form.serialize("issue-form")', diff --git a/app/views/issues/new.rhtml b/app/views/issues/new.rhtml index 52c32dbbd..7b9dde899 100644 --- a/app/views/issues/new.rhtml +++ b/app/views/issues/new.rhtml @@ -8,7 +8,7 @@ </div> <%= submit_tag l(:button_create) %> <%= link_to_remote l(:label_preview), - { :url => { :controller => 'issues', :action => 'preview', :id => @issue }, + { :url => { :controller => 'issues', :action => 'preview', :project_id => @project, :id => @issue }, :method => 'post', :update => 'preview', :with => "Form.serialize('issue-form')", |