diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2008-03-07 17:49:44 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2008-03-07 17:49:44 +0000 |
commit | a4c6c62c8b13db7987d115cbaf0011186e9f056e (patch) | |
tree | cbc5365ead4b832755487de0acaa04e5061bc9ea /app/views/boards/show.rhtml | |
parent | 4458a7282b183939594a8a2d345235cfec459938 (diff) | |
download | redmine-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.rhtml | 10 |
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 %> » <%= 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> |