Commit 1bf4fc4c authored by Hervé  MENAGER's avatar Hervé MENAGER
Browse files

fix various layout problems in compound list/card

mainly borders in tables, and alignments
parent d68eef8f
Pipeline #41762 passed with stages
in 18 minutes and 11 seconds
{%if compound.pubchem_id or compound.chembl_id or compound.chemspider_id or compound.ligand_id %} {%if compound.pubchem_id or compound.chembl_id or compound.chemspider_id or compound.ligand_id %}
<table class="table mb-0"> <table class="table m-1 card_border">
<tbody> <tbody>
<tr class="row"> <tr class="table-row">
<td scope="col" class="col-2 text-center"> <td scope="col" class="col-2 text-center">
{% if compound.pubchem_id %} {% if compound.pubchem_id %}
<a href="{{ compound.pubchem_url }}" target="_blank"><img <a href="{{ compound.pubchem_url }}" target="_blank"><img
......
<table class="table mb-0"> <table class="table m-1 card_border">
<tbody> <tbody>
<tr class="row"> <tr class="table-row">
<td scope="col" class="col-2 text-center"> <td scope="col" class="col-2 text-center">
<a href="https://www.ncbi.nlm.nih.gov/pccompound?term={{ compound.inchikey }}" target="_blank"><img src="/static/images/Other/Pubchemlogo.png" style="height: 1.5em;" title="search INCHIKEY on PubChem" /></a> <a href="https://www.ncbi.nlm.nih.gov/pccompound?term={{ compound.inchikey }}" target="_blank"><img src="/static/images/Other/Pubchemlogo.png" style="height: 1.5em;" title="search INCHIKEY on PubChem" /></a>
</td> </td>
......
...@@ -62,16 +62,16 @@ ...@@ -62,16 +62,16 @@
{% endif %} {% endif %}
{% if compound.biblio_refs %} {% if compound.biblio_refs %}
<h4 class="pt-2 compound_list_title">Bibliography ({{compound.biblio_refs.count}})</h4> <h4 class="pt-2 compound_list_title">Bibliography ({{compound.biblio_refs.count}})</h4>
<table class="table"> <table class="table m-1 card_border">
<thead> <thead>
<tr> <tr class="table-row">
<th scope="col">Publication</th> <th scope="col">Publication</th>
<th scope="col" title="Compound name in publication">Name</th> <th scope="col" title="Compound name in publication">Name</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
{% for biblio_ref in compound.biblio_refs %} {% for biblio_ref in compound.biblio_refs %}
<tr> <tr class="table-row">
<td scope="col">{% include "biblio_citation.html" with bibliography=biblio_ref.bibliography%}</td> <td scope="col">{% include "biblio_citation.html" with bibliography=biblio_ref.bibliography%}</td>
<td scope="col">{{ biblio_ref.compound_name }}</td> <td scope="col">{{ biblio_ref.compound_name }}</td>
</tr> </tr>
...@@ -81,9 +81,9 @@ ...@@ -81,9 +81,9 @@
<h4 class="pt-2 compound_list_title">Pharmacological data</h4> <h4 class="pt-2 compound_list_title">Pharmacological data</h4>
{% include "compound_test_counts.html" with compound=compound show_bibrefs=False %} {% include "compound_test_counts.html" with compound=compound show_bibrefs=False %}
<h4 class="pt-2 compound_list_title">Targets</h4> <h4 class="pt-2 compound_list_title">Targets</h4>
<table class="table"> <table class="table m-1 card_border">
<thead> <thead>
<tr> <tr class="table-row">
<th scope="col">PPI family</th> <th scope="col">PPI family</th>
<th scope="col">Best activity</th> <th scope="col">Best activity</th>
<th scope="col">Diseases</th> <th scope="col">Diseases</th>
...@@ -92,7 +92,7 @@ ...@@ -92,7 +92,7 @@
</thead> </thead>
<tbody> <tbody>
{% for row in compound.get_target_activities_table %} {% for row in compound.get_target_activities_table %}
<tr> <tr class="table-row">
<td scope="col">{{ row.family.name }}</td> <td scope="col">{{ row.family.name }}</td>
<td scope="col">{{ row.best_activity|floatformat:2 }}</td> <td scope="col">{{ row.best_activity|floatformat:2 }}</td>
<td scope="col"> <td scope="col">
......
<div class="card_border row" style="text-align: center;"> <table class="table m-1 card_border">
{% if show_bibrefs %} <thead>
<div class="col-md-4"> <tr class="table-row">
<h6 class="card_title">Bibliographic ressources</h6> {% if show_bibrefs %}
<p>{{ compound.biblio_refs.count }}</p> <th scope="col">Bibliographic ressources</th>
</div> {% endif %}
{% endif %} <th scope="col" title="Biochemical tests">Biochemical tests</th>
<div class="col-md-{% if show_bibrefs %}2{%else%}3{%endif%}"> <th scope="col" title="Cellular tests">Cellular tests</th>
<h6 class="card_title" title="Biochemical tests">Biochemical tests</h6> <th scope="col" title="Pharmacokinetic tests">PK tests</th>
<p>{{ compound.bioch_tests_count }}</p> <th scope="col" title="Cytotoxicity tests">Cytotoxicity tests</th>
</div> </tr>
<div class="col-md-{% if show_bibrefs %}2{%else%}3{%endif%}"> </thead>
<h6 class="card_title" title="Cellular tests">Cellular tests</h6> <tbody>
<p>{{ compound.cell_tests_count }}</p> <tr class="table-row">
</div> {% if show_bibrefs %}
<div class="col-md-{% if show_bibrefs %}2{%else%}3{%endif%}"> <td scope="col">{{ compound.biblio_refs.count }}</td>
<h6 class="card_title" title="Pharmacokinetic tests">PK tests</h6> {% endif %}
<p>{{ compound.pk_tests_count }}</p> <th scope="col" title="Biochemical tests">{{ compound.bioch_tests_count }}</th>
</div> <th scope="col" title="Cellular tests">{{ compound.cell_tests_count }}</th>
<div class="col-md-{% if show_bibrefs %}2{%else%}3{%endif%}"> <th scope="col" title="Pharmacokinetic tests">{{ compound.pk_tests_count }}</th>
<h6 class="card_title" title="Cytotoxicity tests">Cytotoxicity tests</h6> <th scope="col" title="Cytotoxicity tests">{{ compound.cytotoxicity_tests_count }}</th>
<p>{{ compound.cytotoxicity_tests_count }}</p> </tr>
</div> </tbody>
</div> </table>
\ No newline at end of file \ No newline at end of file
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