Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Update detail page with link to view publication related entries #116

Merged
merged 1 commit into from
Jul 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions media/html/public_browse_table.html
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,8 @@ <h2 style="font-size: 24px; margin-bottom: 24px;">

// Create input element
let input = document.createElement('input');
// Populate element with search from URL querystring if present
input.value = new URLSearchParams(window.location.search).get(`${this.dataSrc()}`) ?? ''
input.placeholder = title;
column.header().replaceChildren(input);

Expand All @@ -182,6 +184,9 @@ <h2 style="font-size: 24px; margin-bottom: 24px;">
column.search(input.value).draw();
}
});

// Search and draw column with query populated search term
column.search(input.value).draw();
});

// Force redraw to address responsive column width issue
Expand Down
4 changes: 3 additions & 1 deletion media/html/public_detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,9 @@ <h3 class="panel-title"><b>Citation</b></h3>
{{ pubmed_info|citation_format }}
{% endautoescape %}
</p>

<button>
<a id="link_relatedEntries" href="/browse/table">View related RMDB entries for this publication</a>
</button>
<p><span class="lead" id="show_description"><span class="label label-brown">Description</span></span></p>
<p id="tag_description"></p>
<p style="padding-top:5px;" id="show_pdb">
Expand Down
1 change: 1 addition & 0 deletions media/js/public/view_tags.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ function fill_tags() {
if(/^\d+$/.test(tags.pubmed_id)) {
$("#tag_pubmed").text(tags.pubmed_id);
$("#link_pubmed").attr("href", "http://www.ncbi.nlm.nih.gov/pubmed/" + tags.pubmed_id);
$("#link_relatedEntries").attr("href", "/browse/table?pubmed_id=" + tags.pubmed_id);
}else{
$("#link_pubmed").css("display", "none");
$("#show_publication").css("display", "none");
Expand Down