sanger/sequencescape

View on GitHub
app/views/pipelines/_request_comments.html.erb

Summary

Maintainability
Test Coverage
<%# Note: This shows ALL comments relevant to the request, not just those on the request itself %>
<td class='comments'>
  <%= link_to (pluralize comments_count, 'comment'), request_comments_path(request.id) %>
  <%= link_to '+', request_comments_path(request.id), remote: true, class: 'show-comment badge badge-active', data: {
    :'comment-field' => "#comment_for_#{request.id}",
    update: "#comment_for_#{request.id}",
    throbber: "#loader_for_request_#{request.id}"
  } %><%= content_tag :a, '-', class: 'hide-comment badge badge-danger', data: { :'comment-field' => "#comment_for_#{request.id}" } %>
  <%= loading_bar("loader_for_request_#{request.id}") %>
  <div id="comment_for_<%= request.id %>" style="display:none;"></div>
</td>