app/views/interaction_claims/_interaction_claim_summary.html.haml
- cache interaction_claim do
-interaction = interaction_claim.interaction
%div(class="item-title")
%div(class="item-name")
%h3(class="item-source")
=succeed ':' do
=link_to interaction_claim.source.source_db_name, source_path(interaction_claim.source.source_db_name)
%a{href: "/drugs/#{interaction.drug.name}"}
=interaction.drug.name
%span{class: "glyphicon glyphicon-play", "aria-hidden" => "true", style: "margin-left: 10px; margin-right: -8px"}
 
%a{href: "/genes/#{interaction.gene.name}"}
=interaction.gene.name
%div(class="item-corner")
%ul(class="attribute-list")
%li
%strong
Version:
=interaction_claim.source.source_db_version
%div(class="item-content")
%div(class="cell category")
%div(class="item-panel")
%h4{style: "display: inline-block;"}
Main Info:
%table{class: "table table-condensed table-striped", style: "table-layout:fixed;" }
%tr
%td="Gene"
%td=@interaction.gene.name
%tr
%td="Drug"
%td=@interaction.drug.name
%tr
%td="Interaction Types & Directionality"
%td=interaction_claim.interaction_claim_types.count==0 ? "n/a" : interaction_claim.interaction_claim_types.map{|ict| ict.directionality.nil? ? ict.type : "#{ict.type} (#{ict.directionality})"}.join(", ")
%div(class="cell category")
%div(class="item-panel")
%h4
Other Info:
%table{class: "table table-condensed table-striped", style: "table-layout:fixed;" }
-interaction_claim.interaction_claim_attributes[0..2].each do |attribute|
%tr
%td=attribute.name
%td=attribute.value
%div(class="cell category")
%div{class: "item-panel", style: "margin-bottom:10px"}
%h4
Publications:
%table{class: "table table-condensed table-striped", style: "table-layout:fixed;" }
-interaction_claim.publications[0..2].each do |publication|
%tr
%td
%a{href: PMID.pubmed_url(publication.pmid)}
= publication.citation
%div(class="item-panel")
%h4
Source Links:
%table{class: "table table-condensed table-striped", style: "table-layout:fixed;" }
-interaction_claim.interaction_claim_links.each do |link|
%tr
%td
- url = link.link_url.include?('source_tsvs') ? File.join('..', link.link_url) : link.link_url
%a{href: url}
= link.link_text