Commit 2d9e669e authored by Jean-Philippe Lang's avatar Jean-Philippe Lang

Added preview for issue notes.

git-svn-id: http://redmine.rubyforge.org/svn/trunk@1096 e93f8b46-1217-0410-a6f0-8f06a7374b81
parent d54ba39e
......@@ -242,7 +242,7 @@ class IssuesController < ApplicationController
def preview
issue = Issue.find_by_id(params[:id])
@attachements = issue.attachments if issue
@text = params[:issue][:description]
@text = (params[:issue] ? params[:issue][:description] : nil) || params[:notes]
render :partial => 'common/preview'
end
......
<% labelled_tabular_form_for(:issue, @issue, :url => {:action => 'update', :id => @issue}, :html => {:multipart => true}) do |f| %>
<% labelled_tabular_form_for(:issue, @issue, :url => {:action => 'update', :id => @issue},
:html => {:multipart => true,
:id => 'issue-form'}) do |f| %>
<div class="box">
<% unless @status_options.empty? %>
......@@ -39,4 +41,14 @@
</div>
<%= submit_tag l(:button_submit) %>
<%= link_to_remote l(:label_preview),
{ :url => { :controller => 'issues', :action => 'preview', :id => @issue },
:method => 'post',
:update => 'preview',
:with => "Form.serialize('issue-form')",
:complete => "window.location.hash='preview'"
}, :accesskey => accesskey(:preview) %> |
<%= toggle_link l(:button_cancel), 'update' %>
<% end %>
<div id="preview" class="wiki"></div>
......@@ -94,7 +94,6 @@ end %>
<div id="update" style="display:none;">
<h3><%= l(:button_update) %></h3>
<%= render :partial => 'update' %>
<%= toggle_link l(:button_cancel), 'update' %>
</div>
<% end %>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment