Commit 9b8fa771 authored by Hervé  MENAGER's avatar Hervé MENAGER
Browse files

add filter on Uniprot IDs on the compounds query page

FIX #195
parent 735baf73
Pipeline #26080 passed with stages
in 11 minutes and 10 seconds
......@@ -266,6 +266,7 @@
<span>
filters used:&nbsp;
{% include "text_filter_badge.html" with param_name="q" param_value=q %}
{% include "selected_badge.html" with param_name="uniprot_id" values=selected_uniprot_id label="Uniprot ID" %}
{% include "slider_badge.html" with param_name="nb_donor_h" param_value=nb_donor_h param_value_min=nb_donor_h_value_min param_value_max=nb_donor_h_value_max param_label="H donors" %}
{% include "slider_badge.html" with param_name="nb_acceptor_h" param_value=nb_acceptor_h param_value_min=nb_acceptor_h_value_min param_value_max=nb_acceptor_h_value_max param_label="H acceptors" %}
......
{% if values %}
{% for value in values %}
<span class="badge badge-info selected-filters" style="font-size: 100%">{{ value.name|default:value }}
<span class="badge badge-info selected-filters" style="font-size: 100%" {% if label %}title="{{ label }}: {{ value.name|default:value }}"{% endif %}>{{ value.name|default:value }}
<a href="#" style="color: #495057;" onclick="queryUrl.unPage(); queryUrl.removeFromSelection('{{ param_name }}', '{{ value.id|default:value }}')"><i class="fas fa-times fa-xs"></i></a>
</span>&nbsp;
{% endfor %}
......
......@@ -20,6 +20,7 @@ from ippidb.models import (
ProteinDomainPartnerComplex,
Disease,
Domain,
Protein,
Taxonomy,
LeLleBiplotData,
PcaBiplotData,
......@@ -605,6 +606,15 @@ class CompoundListView(ListView):
self.filter_context,
self.request.GET,
),
CompoundListFilterHandler(
Protein,
"compoundaction__ppi_id__ppicomplex__complex__protein",
"proteindomaincomplex__ppicomplex__ppi__compoundaction__compound",
"uniprot_id",
self.filter_context,
self.request.GET,
on_value="uniprot_id",
),
CompoundListFilterHandler(
ProteinDomainBoundComplex,
"compoundaction__ppi_id__ppicomplex__complex",
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment