openSNP/snpr

View on GitHub
app/views/snps/_snpedia_papers.html.erb

Summary

Maintainability
Test Coverage
<div id="snpedia" class="tab-pane clearfix active well tabs__one-tab">
  <h3>Links to SNPedia</h3>
  <% if snp.snpedia_papers.present? %>
  <div class="table-responsive">
    <table class="table">
      <tr>
        <th>Title</th>
        <th>Summary</th>
      </tr>
      <% snp.snpedia_papers.each do |p| %>
      <tr>
        <td class="table-cell">
          <%= bold_if_matching_variation(p, user_snp) do %>
          <%= link_to "#{snp.name} #{p.snp_variation.split('').join('/')}", p.url %>
          <% end %>
        </td>
        <td class="table-cell"><b><%= p.summary.capitalize %></b></td>
      </tr>
      <% end %>
    </table>
  </div>
  <% else %>
    There are no SNPedia links yet. Please come back later.
  <% end %>
  <div class="small">
    Note: For some SNPs, testing providers detect the genotype from the opposite strand of DNA, so that the genotypes listed on openSNP don't appear here. In those cases, please replace "A" by "T" or "G" by "C" (and vice-versa).
  </div>
</div>