mirror of
https://github.com/redmine/redmine.git
synced 2025-11-02 03:15:57 +01:00
Preview description if it was edited while updating an issue (#741).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3623 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -453,9 +453,17 @@ class IssuesController < ApplicationController
|
||||
|
||||
def preview
|
||||
@issue = @project.issues.find_by_id(params[:id]) unless params[:id].blank?
|
||||
@attachements = @issue.attachments if @issue
|
||||
@text = params[:notes] || (params[:issue] ? params[:issue][:description] : nil)
|
||||
render :partial => 'common/preview'
|
||||
if @issue
|
||||
@attachements = @issue.attachments
|
||||
@description = params[:issue] && params[:issue][:description]
|
||||
if @description && @description.gsub(/(\r?\n|\n\r?)/, "\n") == @issue.description.to_s.gsub(/(\r?\n|\n\r?)/, "\n")
|
||||
@description = nil
|
||||
end
|
||||
@notes = params[:notes]
|
||||
else
|
||||
@description = (params[:issue] ? params[:issue][:description] : nil)
|
||||
end
|
||||
render :layout => false
|
||||
end
|
||||
|
||||
def auto_complete
|
||||
|
||||
Reference in New Issue
Block a user