<% end %>
Posted by <b><%= link_to diary_entry.user.display_name, :controller => 'user', :action => 'view', :display_name => diary_entry.user.display_name %></b> at <%= diary_entry.created_at %><br />
<% if params[:action] == 'list' %>
-<%= link_to 'Comment on this entry', :action => 'view', :display_name => diary_entry.user.display_name, :id => diary_entry.id, :anchor => 'comment' %>
+<%= link_to 'Comment on this entry', :action => 'view', :display_name => diary_entry.user.display_name, :id => diary_entry.id, :anchor => 'newcomment' %>
|
<%= link_to 'Reply to this entry', :controller => 'message', :action => 'new', :user_id => diary_entry.user.id, :title => "Re: #{diary_entry.title}" %>
<% end %>
xml.description htmlize(entry.body)
xml.author entry.user.display_name
xml.pubDate entry.created_at.to_s(:rfc822)
+ xml.comments url_for(:action => "view", :id => entry.id, :display_name => entry.user.display_name, :anchor => "comments", :only_path => false)
if entry.latitude and entry.longitude
xml.geo :lat, entry.latitude.to_s
<%= render :partial => 'diary_entry', :object => @entry %>
+<a id="comments"></a>
+
<%= render :partial => 'diary_comment', :collection => @entry.diary_comments %>
<% if @user %>
-<h4 id="comment">Leave a comment</h4>
+<h4 id="newcomment">Leave a comment</h4>
<%= error_messages_for 'diary_comment' %>
<% form_for :diary_comment, @diary_comment, :url => { :action => 'comment' } do |f| %>
<%= f.text_area :body, :cols => 80, :rows => 5 %>
<% else %>
-<h4 id="comment"><%= link_to "Login", :controller => 'user', :action => 'login', :referer => request.request_uri %> to leave a comment</h4>
+<h4 id="newcomment"><%= link_to "Login", :controller => 'user', :action => 'login', :referer => request.request_uri %> to leave a comment</h4>
<% end %>