crowdAI/crowdai

View on GitHub
app/concepts/discussion/views/comment.erb

Summary

Maintainability
Test Coverage
<div class="discussion-comment" id='comment-<%= comment.id %>'  data-cell='Discussion::Cell::Comment'>
  <div class="pic">
    <% if comment.participant.is_a? NullParticipant %>
      <%= link_to '#' do %>
        <%= concept(Image::Cell,author) %>
      <% end %>
    <% else %>
      <%= link_to participant_path(author) do %>
        <%= concept(Image::Cell,author) %>
      <% end %>
    <% end %>
  </div>
  <div class="topic-content">
    <p class="details">Posted by
      <% if author.is_a? NullParticipant %>
        <%= author.name %>&nbsp;
      <% else %>
        <%= link_to author.name, participant_path(author) %>&nbsp;
      <% end %>
      <%= time_ago_in_words(comment.created_at) %> ago |&nbsp;
      <%= link_to "Quote", new_topic_comment_path(comment.topic, quoted_comment_id: comment.id) %>
      <%= admin_actions %>
    </p>
    <div class='comment'>
      <%= comment.comment %>
    </div>
  </div>
  <%= concept(Vote::Cell, comment, current_participant: current_participant) %>
</div>