app/views/genes/show.html.haml
=content_for :title, "DGIdb - #@title Gene Record"
=content_for :header do
%h2
=@title
%small
Gene Record
%a(href="/faq#defined")
=icon('question-sign')
- cache @gene do
.container-fluid
.tabbable
%ul.nav.nav-tabs
%li.active
%a(href="#summary" data-toggle="tab") Summary
%li
%a(href="#interactions" data-toggle="tab") Interactions
%li
%a(href="#claims" data-toggle="tab") Claims
.tab-content{style: "margin-top: 12px;"}
.tab-pane.active#summary
.row-fluid#container
.span12
%ul(class="result-list" id="list-results")
%li.gene
=render partial: 'genes/gene_summary_tab', locals: { gene: @gene } # partial will check if drug is null to tell if it is in drug or gene mode
.tab-pane.fade#interactions
.row-fluid#container
.span12
=render partial: 'shared/interactions_tab', locals: {gene: @gene}
.tab-pane.fade#claims
.row-fluid
.span12
=render partial: 'shared/claims_tab', locals: {gene: @gene}
:javascript
$(document).ready(function () {
var activeTab = $('#' + window.location.hash.substr(2));
if(activeTab.length) {
$('a[href="' + "#" + window.location.hash.substr(2) + '"]').trigger('click');
}
});
window.addEventListener("popstate", function() {
var activeTab = $('#' + window.location.hash.substr(2));
if (activeTab.length) {
$('a[href="' + "#" + window.location.hash.substr(2) + '"]').trigger('click');
}
});
$(".tabbable li a").click(function () {
window.location.hash = "_" + $(this).attr('href').substr(1);
return true;
});
=javascript_include_tag "jquery.masonry.min"
=javascript_include_tag "jquery.dataTables.min"
=javascript_include_tag "pagination_bootstrap"
=javascript_include_tag "gene_groups"
=javascript_include_tag "gene-list-tabs"