Added preview for issue notes.
git-svn-id: http://redmine.rubyforge.org/svn/trunk@1096 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
d54ba39e7a
commit
2d9e669e85
|
@ -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
|
||||
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
<% 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 %>
|
||||
|
||||
|
|
Loading…
Reference in New Issue