cirandas.net

ref: master

app/views/comment/_comment.html.erb


  • <% 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 %> <% url_image, status_class = comment.author_id ? [comment.removed_user_image, 'icon-user-removed'] : [gravatar_profile_image_url( comment.email, :size => 50, :d=>404 ), 'icon-user-unknown'] %> <%= link_to( image_tag(url_image, :onerror=>'gravatarCommentFailback(this)', 'data-gravatar'=>gravatar_profile_image_url(comment.email, :size=>50)) + content_tag('span', comment.author_name, :class => 'comment-info') + content_tag('span', comment.message, :class => 'comment-user-status ' + status_class), gravatar_profile_url(comment.email), :target => '_blank', :class => 'comment-picture', :title => '%s %s' % [comment.author_name, comment.message] )%> <% end %> <% comment_balloon do %>
    <%= comment_actions(comment) %>
    <%= show_time(comment.created_at) %>

    <%= comment.title.blank? && ' '.html_safe || comment.title %>

    <%= txt2html comment.body %>

    <%= safe_join(@plugins.dispatch(:comment_extra_contents, local_assigns).collect { |content| instance_exec(&content) }, "") %>
    <% if @comment && @comment.errors.any? && @comment.reply_of_id.to_i == comment.id %> <%= error_messages_for :comment %> <% end %>
    <% end %>
    <% unless comment.spam? %>
      <% comment.replies.each do |reply| %> <%= render :partial => 'comment/comment', :locals => { :comment => reply } %> <% end %>
    <% end %>