@@ -1,8 +1,20 | |||||
1 | <div class="contextual"> |
|
1 | <div class="contextual"> | |
2 | <%= link_to_if_authorized l(:label_message_new), {:controller => 'messages', :action => 'new', :board_id => @board}, :class => "icon icon-add" %> |
|
2 | <%= link_to_if_authorized l(:label_message_new), | |
|
3 | {:controller => 'messages', :action => 'new', :board_id => @board}, | |||
|
4 | :class => 'icon icon-add', | |||
|
5 | :onclick => 'Element.show("add-message"); return false;' %> | |||
3 | <%= watcher_tag(@board, User.current) %> |
|
6 | <%= watcher_tag(@board, User.current) %> | |
4 | </div> |
|
7 | </div> | |
5 |
|
8 | |||
|
9 | <div id="add-message" style="display:none;"> | |||
|
10 | <h2><%= link_to h(@board.name), :controller => 'boards', :action => 'show', :project_id => @project, :id => @board %> » <%= l(:label_message_new) %></h2> | |||
|
11 | <% form_for :message, @message, :url => {:controller => 'messages', :action => 'new', :board_id => @board}, :html => {:multipart => true} do |f| %> | |||
|
12 | <%= render :partial => 'messages/form', :locals => {:f => f} %> | |||
|
13 | <p><%= submit_tag l(:button_create) %> | |||
|
14 | <%= link_to l(:button_cancel), "#", :onclick => 'Element.hide("add-message")' %></p> | |||
|
15 | <% end %> | |||
|
16 | </div> | |||
|
17 | ||||
6 | <h2><%=h @board.name %></h2> |
|
18 | <h2><%=h @board.name %></h2> | |
7 |
|
19 | |||
8 | <% if @topics.any? %> |
|
20 | <% if @topics.any? %> |
@@ -3,7 +3,7 | |||||
3 | <div class="box"> |
|
3 | <div class="box"> | |
4 | <!--[form:message]--> |
|
4 | <!--[form:message]--> | |
5 | <p><label><%= l(:field_subject) %></label><br /> |
|
5 | <p><label><%= l(:field_subject) %></label><br /> | |
6 |
<%= f.text_field :subject, :required => true, :size => |
|
6 | <%= f.text_field :subject, :required => true, :size => 120 %></p> | |
7 |
|
7 | |||
8 | <p><%= f.text_area :content, :required => true, :cols => 80, :rows => 15, :class => 'wiki-edit' %></p> |
|
8 | <p><%= f.text_area :content, :required => true, :cols => 80, :rows => 15, :class => 'wiki-edit' %></p> | |
9 | <%= wikitoolbar_for 'message_content' %> |
|
9 | <%= wikitoolbar_for 'message_content' %> |
@@ -1,16 +1,17 | |||||
1 | <h2><%= link_to h(@board.name), :controller => 'boards', :action => 'show', :project_id => @project, :id => @board %> » <%=h @message.subject %></h2> |
|
1 | <h2><%= link_to h(@board.name), :controller => 'boards', :action => 'show', :project_id => @project, :id => @board %> » <%=h @message.subject %></h2> | |
2 |
|
2 | |||
3 | <p><em><%= @message.author.name %>, <%= format_time(@message.created_on) %></em></p> |
|
3 | <p><span class="author"><%= authoring @message.created_on, @message.author %></span></p> | |
4 | <div class="wiki"> |
|
4 | <div class="wiki"> | |
5 | <%= textilizable(@message.content, :attachments => @message.attachments) %> |
|
5 | <%= textilizable(@message.content, :attachments => @message.attachments) %> | |
6 | </div> |
|
6 | </div> | |
7 | <%= link_to_attachments @message.attachments, :no_author => true %> |
|
7 | <%= link_to_attachments @message.attachments, :no_author => true %> | |
|
8 | <br /> | |||
8 |
|
9 | |||
9 | <h3 class="icon22 icon22-comment"><%= l(:label_reply_plural) %></h3> |
|
10 | <h3 class="icon22 icon22-comment"><%= l(:label_reply_plural) %></h3> | |
10 | <% @message.children.each do |message| %> |
|
11 | <% @message.children.each do |message| %> | |
11 | <a name="<%= "message-#{message.id}" %>"></a> |
|
12 | <a name="<%= "message-#{message.id}" %>"></a> | |
12 | <h4><%=h message.subject %> - <%= message.author.name %>, <%= format_time(message.created_on) %></h4> |
|
13 | <h4><%=h message.subject %> - <%= message.author.name %>, <%= format_time(message.created_on) %></h4> | |
13 |
<div class="wiki" |
|
14 | <div class="wiki"><%= textilizable message.content %></div> | |
14 | <% end %> |
|
15 | <% end %> | |
15 |
|
16 | |||
16 | <% if authorize_for('messages', 'reply') %> |
|
17 | <% if authorize_for('messages', 'reply') %> |
General Comments 0
You need to be logged in to leave comments.
Login now