--- /dev/null
+<div class="note-comment" style="margin-top: 5px">
+ <% if comment.author.nil? -%>
+ <div class="note-comment-description" style="font-size: smaller; color: #999999"><%= t "note.description.#{comment.event}_at", :when => friendly_date(comment.created_at) %></div>
+ <% else -%>
+ <div class="note-comment-description" style="font-size: smaller; color: #999999"><%= t "note.description.#{comment.event}_at_by", :when => friendly_date(comment.created_at), :user => note_author(comment.author, :only_path => false) %></div>
+ <% end -%>
+ <div class="note-comment-text"><%= comment.body %></div>
+</div>
<div>
- <% description.comments.each do |comment| -%>
- <div class="note-comment" style="margin-top: 5px">
- <% if comment.author.nil? -%>
- <div class="note-comment-description" style="font-size: smaller; color: #999999"><%= t "note.description.#{comment.event}_at", :when => friendly_date(comment.created_at) %></div>
- <% else -%>
- <div class="note-comment-description" style="font-size: smaller; color: #999999"><%= t "note.description.#{comment.event}_at_by", :when => friendly_date(comment.created_at), :user => note_author(comment.author, :only_path => false) %></div>
- <% end -%>
- <div class="note-comment-text"><%= comment.body %></div>
- </div>
- <% end -%>
+ <%= render :partial => "comment", :collection => description.comments %>
</div>
--- /dev/null
+<h2><%= t "note.entry.comment" %></h2>
+<%= render :partial => "comment", :object => entry %>
+<h2><%= t "note.entry.full" %></h2>
+<%= render :partial => "description", :object => entry.note %>
xml.link url_for(:controller => "browse", :action => "note", :id => comment.note.id, :only_path => false)
xml.guid url_for(:controller => "browse", :action => "note", :id => comment.note.id, :only_path => false)
- description_text = ""
-
- if comment.event == "commented" and not comment.nil?
- description_text += "<b>Comment:</b><br>"
- description_text += comment.body.to_html
- description_text += "<br>"
- end
-
- description_text += "<b>Full note:</b><br>"
- description_text += comment.note.flatten_comment("<br>", comment.created_at)
-
- xml.description description_text
+ xml.description render(:partial => "entry", :object => comment, :formats => [ :html ])
if comment.author
xml.author comment.author.display_name
closed: "closed note (near %{place})"
new: "new note (near %{place})"
comment: "new comment (near %{place})"
+ entry:
+ comment: Comment
+ full: Full note
mine:
title: "Notes submitted or commented on by %{user}"
heading: "%{user}'s notes"