@@ -344,8 +344,8 class IssuesController < ApplicationController | |||
|
344 | 344 | end |
|
345 | 345 | |
|
346 | 346 | def preview |
|
347 | issue = @project.issues.find_by_id(params[:id]) | |
|
348 | @attachements = issue.attachments if issue | |
|
347 | @issue = @project.issues.find_by_id(params[:id]) if params[:id] | |
|
348 | @attachements = issue.attachments if @issue | |
|
349 | 349 | @text = params[:notes] || (params[:issue] ? params[:issue][:description] : nil) |
|
350 | 350 | render :partial => 'common/preview' |
|
351 | 351 | end |
@@ -8,7 +8,7 | |||
|
8 | 8 | </div> |
|
9 | 9 | <%= submit_tag l(:button_create) %> |
|
10 | 10 | <%= link_to_remote l(:label_preview), |
|
11 |
{ :url => { :controller => 'issues', :action => 'preview', :project_id => @project |
|
|
11 | { :url => { :controller => 'issues', :action => 'preview', :project_id => @project }, | |
|
12 | 12 | :method => 'post', |
|
13 | 13 | :update => 'preview', |
|
14 | 14 | :with => "Form.serialize('issue-form')", |
General Comments 0
You need to be logged in to leave comments.
Login now