Noosfero/noosfero

View on GitHub
app/views/search/_comment.html.erb

Summary

Maintainability
Test Coverage
<li>
  <%- if comment.author -%>
    <%= link_to content_tag( 'span', comment.author.name() ), comment.author.url,
        :class => 'comment-picture',
        :style => 'background-image:url(%s)' % profile_icon(comment.author, :icon)
    %>
  <%- else -%>
    <%# unauthenticated user: display gravatar icon %>
    <%= content_tag 'span', '&nbsp;',
        :class => 'comment-picture',
        :style => 'background-image:url(%s)' % gravatar_profile_image_url( comment.email, :size => 20 )
    %>
  <%- end %>
  <strong><%= link_to(comment.title, comment.url) %></strong>
  <div class="item_meta">
    <%= _('by %{author} on "%{article}"') % {
              :comment => link_to(comment.title, comment.url),
              :article => link_to(comment.article.title, comment.article.url),
              :author => comment.author_name } %>
  </div>
</li>