summaryrefslogtreecommitdiffstats
path: root/app/views/boards/show.rhtml
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/boards/show.rhtml')
-rw-r--r--app/views/boards/show.rhtml14
1 files changed, 13 insertions, 1 deletions
diff --git a/app/views/boards/show.rhtml b/app/views/boards/show.rhtml
index cdb9e772d..0af89fdb7 100644
--- a/app/views/boards/show.rhtml
+++ b/app/views/boards/show.rhtml
@@ -1,8 +1,20 @@
<div class="contextual">
-<%= link_to_if_authorized l(:label_message_new), {:controller => 'messages', :action => 'new', :board_id => @board}, :class => "icon icon-add" %>
+<%= link_to_if_authorized l(:label_message_new),
+ {:controller => 'messages', :action => 'new', :board_id => @board},
+ :class => 'icon icon-add',
+ :onclick => 'Element.show("add-message"); return false;' %>
<%= watcher_tag(@board, User.current) %>
</div>
+<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| %>
+ <%= render :partial => 'messages/form', :locals => {:f => f} %>
+ <p><%= submit_tag l(:button_create) %>
+ <%= link_to l(:button_cancel), "#", :onclick => 'Element.hide("add-message")' %></p>
+<% end %>
+</div>
+
<h2><%=h @board.name %></h2>
<% if @topics.any? %>