compound_list.html 3.98 KB
Newer Older
1
{% extends "queries.html" %}
2
{% load customtags %}
Hervé  MENAGER's avatar
Hervé MENAGER committed
3
    
4
{% block title %}compounds list{% endblock %}
Hervé  MENAGER's avatar
Hervé MENAGER committed
5
6

{% block content %}
7
<div id="mainnav">
8
        <nav class="secondary-nav">
9
10
11
        <div class="inner-wrap">
            <ul>
                <li>
12
                    <a href="/compound">By Compounds</a>
13
14
                </li>
                <li>
15
                    <a href="/queries/pockets">By Pockets</a>
16
17
18
19
20
21
22
23
24
                </li>
            </ul>
        </div>
    </nav>
</div>
<div class="inner-wrap">
    <nav class="breadcrumb" role="navigation">
        <div id="breadcrumb-label" class="breadcrumb-label">You are here</div>
        <div aria-labelledby="breadcrumb-label">
25
          {% block breadcrumb %} {{block.super}}> <a href="/compound/">By compounds</a>{% endblock %} 
26
27
28
        </div>
    </nav>
</div>
Hervé  MENAGER's avatar
Hervé MENAGER committed
29
30
31
32
33

<div class="container-fluid">
<div class="row flex-xl-nowrap">
  <div class="col-12 col-md-3 col-xl-2 bd-sidebar">
<form>
34
35
36
37
  {% include "multiselection_list_menu.html" with label="PPI" selected_list=selected_ppis unselected_list=ppis param_name="ppi" all_param_name="ppis_all" all_param_value=ppis_all %}
  {% include "multiselection_list_menu.html" with label="Disease" selected_list=selected_diseases unselected_list=diseases param_name="disease" all_param_name="diseases_all" all_param_value=diseases_all %}
  {% include "multiselection_list_menu.html" with label="Organism" selected_list=selected_taxonomies unselected_list=taxonomies param_name="taxonomy" all_param_name="taxonomies_all" all_param_value=taxonomies_all %}
  {% include "multiselection_list_menu.html" with label="Bound complex" selected_list=selected_boundcomplexes unselected_list=boundcomplexes param_name="boundcomplex" all_param_name="boundcomplexes_all" all_param_value=boundcomplexes_all %}
Hervé  MENAGER's avatar
Hervé MENAGER committed
38
39
</form>
</div>
40

41
<main class="col-12 col-md-9 col-xl-10 pl-md-5 bd-content" role="main">
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
    <div class="row m-2 border border- bg-light"><span>{{ count }} compounds</span>
        {% if selected_ppis or selected_diseases or selected_taxonomies or selected_boundcomplexes %}
            <span>&nbsp;-&nbsp;filters:&nbsp;</span>
            {% if selected_ppis %}
                {% for selected in selected_ppis %}
                    <span class="badge badge-info" style="font-size: 100%">{{ selected.name }}</span>&nbsp;
                {% endfor %}
            {% endif %}
            {% if selected_diseases %}
                {% for selected in selected_diseases %}
                    <span class="badge badge-info" style="font-size: 100%">{{ selected.name }}</span>&nbsp;
                {% endfor %}
            {% endif %}
            {% if selected_taxonomies %}
                {% for selected in selected_taxonomies %}
                    <span class="badge badge-info" style="font-size: 100%">{{ selected.name }}</span>&nbsp;
                {% endfor %}
            {% endif %}
            {% if selected_boundcomplexes %}
                {% for selected in selected_boundcomplexes %}
                    <span class="badge badge-info" style="font-size: 100%">{{ selected.name }}</span>&nbsp;
                {% endfor %}
            {% endif %}
        {% endif %}
    </div>
Hervé  MENAGER's avatar
Hervé MENAGER committed
67
68
69
70
71
{% if compounds %}
    {% for compound in compounds %}
        {% include "compound_abstract.html" with compound=compound %}
    {% endfor %}
{% else %}
72
    <p>Nothing found there!</p>
Hervé  MENAGER's avatar
Hervé MENAGER committed
73
74
75
76
77
78
79
80
81
{% endif %}					
                    </main>
</div>
</div>

<nav>
  <ul class="pagination justify-content-end">
    {% if compounds.has_previous %}
    <li class="page-item">
82
     <a class="page-link" href="?{% url_replace request 'page' compounds.previous_page_number  %}" tabindex="-1">Previous</a>
Hervé  MENAGER's avatar
Hervé MENAGER committed
83
84
85
86
87
88
89
90
91
    </li>
    {% endif %}

    <li class="page-item disabled">
     <span class="page-link">Page {{ compounds.number }} of {{ compounds.paginator.num_pages }}.</span>
    </li>

    {% if compounds.has_next %}
    <li class="page-item">
92
     <a class="page-link" href="?{% url_replace request 'page' compounds.next_page_number  %}" tabindex="-1">Next</a>
Hervé  MENAGER's avatar
Hervé MENAGER committed
93
94
95
96
97
    </li>
    {% endif %}
  </ul>
</nav>
{% endblock %}