summaryrefslogtreecommitdiffstats
path: root/app/views/boards/show.rhtml
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2008-03-07 17:49:44 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2008-03-07 17:49:44 +0000
commita4c6c62c8b13db7987d115cbaf0011186e9f056e (patch)
treecbc5365ead4b832755487de0acaa04e5061bc9ea /app/views/boards/show.rhtml
parent4458a7282b183939594a8a2d345235cfec459938 (diff)
downloadredmine-a4c6c62c8b13db7987d115cbaf0011186e9f056e.tar.gz
redmine-a4c6c62c8b13db7987d115cbaf0011186e9f056e.zip
Added preview for forum messages.
git-svn-id: http://redmine.rubyforge.org/svn/trunk@1205 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/views/boards/show.rhtml')
-rw-r--r--app/views/boards/show.rhtml10
1 files changed, 9 insertions, 1 deletions
diff --git a/app/views/boards/show.rhtml b/app/views/boards/show.rhtml
index 01db0854c..54645622e 100644
--- a/app/views/boards/show.rhtml
+++ b/app/views/boards/show.rhtml
@@ -8,11 +8,19 @@
<div id="add-message" style="display:none;">
<h2><%= link_to h(@board.name), :controller => 'boards', :action => 'show', :project_id => @project, :id => @board %> &#187; <%= l(:label_message_new) %></h2>
-<% form_for :message, @message, :url => {:controller => 'messages', :action => 'new', :board_id => @board}, :html => {:multipart => true} do |f| %>
+<% form_for :message, @message, :url => {:controller => 'messages', :action => 'new', :board_id => @board}, :html => {:multipart => true, :id => 'message-form'} do |f| %>
<%= render :partial => 'messages/form', :locals => {:f => f} %>
<p><%= submit_tag l(:button_create) %>
+ <%= link_to_remote l(:label_preview),
+ { :url => { :controller => 'messages', :action => 'preview', :board_id => @board },
+ :method => 'post',
+ :update => 'preview',
+ :with => "Form.serialize('message-form')",
+ :complete => "Element.scrollTo('preview')"
+ }, :accesskey => accesskey(:preview) %> |
<%= link_to l(:button_cancel), "#", :onclick => 'Element.hide("add-message")' %></p>
<% end %>
+<div id="preview" class="wiki"></div>
</div>
<h2><%=h @board.name %></h2>