diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2007-11-22 19:19:47 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2007-11-22 19:19:47 +0000 |
commit | 7704e2d9191d00d19115198f981e2262bc11dc25 (patch) | |
tree | 5676d3aa9abdf93faad31cce5e0f3c668f0003b0 /app/views/messages | |
parent | 0634591b3db01098057f2e20e101d7886ddbff5a (diff) | |
download | redmine-7704e2d9191d00d19115198f981e2262bc11dc25.tar.gz redmine-7704e2d9191d00d19115198f981e2262bc11dc25.zip |
Forums: attachments can now be added to replies.
git-svn-id: http://redmine.rubyforge.org/svn/trunk@923 e93f8b46-1217-0410-a6f0-8f06a7374b81
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 %> |