• <% if comment.author %> <%= link_to image_tag(profile_icon(comment.author, :minor)) + content_tag('span', comment.author_name, :class => 'comment-info'), comment.author.url, :class => 'comment-picture', :title => comment.author_name %> <% else %> <%# unauthenticated user: display gravatar icon %> <% url_image, status_class = comment.author_id ? [comment.removed_user_image, 'icon-user-removed'] : [str_gravatar_url_for( comment.email, :size => 50 ), 'icon-user-unknown'] %> <%= content_tag 'span', image_tag(url_image) + content_tag('span', comment.author_name, :class => 'comment-info') + content_tag('span', comment.message, :class => 'comment-user-status ' + status_class), :class => 'comment-picture', :title => '%s %s' % [comment.author_name, comment.message] %> <% end %> <% comment_balloon do %> <% if logged_in? && (user == @page.profile || user == comment.author || user.has_permission?(:moderate_comments, @page.profile)) %> <% button_bar(:style => 'float: right; margin-top: 0px;') do %> <%= icon_button(:delete, _('Remove this comment and all its replies'), { :profile => params[:profile], :remove_comment => comment.id, :view => params[:view] }, :method => :post, :confirm => _('Are you sure you want to remove this comment and all its replies?')) %> <% end %> <% end %>
    <%= show_time(comment.created_at) %>

    <%= comment.title %>

    <%= txt2html comment.body %>

    <% if @comment && @comment.errors.any? && @comment.reply_of_id.to_i == comment.id %> <%= error_messages_for :comment %> <% end %> <%= link_to_function _('Reply'), "var f = add_comment_reply_form(this, %s); f.find('input[name=comment[title]], textarea').val(''); return false" % comment.id, :class => 'comment-reply-link', :id => 'comment-reply-to-' + comment.id.to_s %>
    <% end %>
    <% unless comment.replies.blank? %> <% end %>