diff options
Diffstat (limited to 'app/views/messages')
-rw-r--r-- | app/views/messages/_form.rhtml | 3 | ||||
-rw-r--r-- | app/views/messages/show.rhtml | 17 |
2 files changed, 12 insertions, 8 deletions
diff --git a/app/views/messages/_form.rhtml b/app/views/messages/_form.rhtml index e484baf2f..25d88cd44 100644 --- a/app/views/messages/_form.rhtml +++ b/app/views/messages/_form.rhtml @@ -5,10 +5,11 @@ <p><label><%= l(:field_subject) %></label><br /> <%= f.text_field :subject, :required => true, :size => 120 %></p> -<p><%= f.text_area :content, :required => true, :cols => 80, :rows => 15, :class => 'wiki-edit' %></p> +<p><%= f.text_area :content, :required => true, :cols => 80, :rows => 15, :class => 'wiki-edit', :id => 'message_content' %></p> <%= wikitoolbar_for 'message_content' %> <!--[eoform:message]--> <span class="tabular"> <%= render :partial => 'attachments/form' %> +</span> </div> diff --git a/app/views/messages/show.rhtml b/app/views/messages/show.rhtml index 772f0653e..e39c09d50 100644 --- a/app/views/messages/show.rhtml +++ b/app/views/messages/show.rhtml @@ -1,27 +1,30 @@ <h2><%= link_to h(@board.name), :controller => 'boards', :action => 'show', :project_id => @project, :id => @board %> » <%=h @message.subject %></h2> +<div class="message"> <p><span class="author"><%= authoring @message.created_on, @message.author %></span></p> <div class="wiki"> <%= textilizable(@message.content, :attachments => @message.attachments) %> </div> <%= link_to_attachments @message.attachments, :no_author => true %> +</div> <br /> +<div class="message reply"> <h3 class="icon22 icon22-comment"><%= l(:label_reply_plural) %></h3> <% @message.children.each do |message| %> <a name="<%= "message-#{message.id}" %>"></a> - <h4><%=h message.subject %> - <%= message.author.name %>, <%= format_time(message.created_on) %></h4> + <h4><%=h message.subject %> - <%= authoring message.created_on, message.author %></h4> <div class="wiki"><%= textilizable message.content %></div> + <%= link_to_attachments message.attachments, :no_author => true %> <% end %> +</div> <% if authorize_for('messages', 'reply') %> -<p><%= toggle_link l(:button_reply), "reply", :focus => "reply_content" %></p> +<p><%= toggle_link l(:button_reply), "reply", :focus => 'message_content' %></p> <div id="reply" style="display:none;"> -<%= error_messages_for 'message' %> -<% form_for :reply, @reply, :url => {:action => 'reply', :id => @message} do |f| %> - <p><%= f.text_field :subject, :required => true, :size => 60 %></p> - <p><%= f.text_area :content, :required => true, :cols => 80, :rows => 10 %></p> - <p><%= submit_tag l(:button_submit) %></p> +<% form_for :reply, @reply, :url => {:action => 'reply', :id => @message}, :html => {:multipart => true} do |f| %> + <%= render :partial => 'form', :locals => {:f => f} %> + <%= submit_tag l(:button_submit) %> <% end %> </div> <% end %> |