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 %}
<table class="table mb-0">
<table class="table m-1 card_border">
<tbody>
<tr class="row">
<tr class="table-row">
<td scope="col" class="col-2 text-center">
{% if compound.pubchem_id %}
<a href="{{ compound.pubchem_url }}" target="_blank"><img
......
<table class="table mb-0">
<table class="table m-1 card_border">
<tbody>
<tr class="row">
<tr class="table-row">
<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>
</td>
......
......@@ -62,16 +62,16 @@
{% endif %}
{% if compound.biblio_refs %}
<h4 class="pt-2 compound_list_title">Bibliography ({{compound.biblio_refs.count}})</h4>
<table class="table">
<table class="table m-1 card_border">
<thead>
<tr>
<tr class="table-row">
<th scope="col">Publication</th>
<th scope="col" title="Compound name in publication">Name</th>
</tr>
</thead>
<tbody>
{% 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">{{ biblio_ref.compound_name }}</td>
</tr>
......@@ -81,9 +81,9 @@
<h4 class="pt-2 compound_list_title">Pharmacological data</h4>
{% include "compound_test_counts.html" with compound=compound show_bibrefs=False %}
<h4 class="pt-2 compound_list_title">Targets</h4>
<table class="table">
<table class="table m-1 card_border">
<thead>
<tr>
<tr class="table-row">
<th scope="col">PPI family</th>
<th scope="col">Best activity</th>
<th scope="col">Diseases</th>
......@@ -92,7 +92,7 @@
</thead>
<tbody>
{% for row in compound.get_target_activities_table %}
<tr>
<tr class="table-row">
<td scope="col">{{ row.family.name }}</td>
<td scope="col">{{ row.best_activity|floatformat:2 }}</td>
<td scope="col">
......
<div class="card_border row" style="text-align: center;">
{% if show_bibrefs %}
<div class="col-md-4">
<h6 class="card_title">Bibliographic ressources</h6>
<p>{{ compound.biblio_refs.count }}</p>
</div>
{% endif %}
<div class="col-md-{% if show_bibrefs %}2{%else%}3{%endif%}">
<h6 class="card_title" title="Biochemical tests">Biochemical tests</h6>
<p>{{ compound.bioch_tests_count }}</p>
</div>
<div class="col-md-{% if show_bibrefs %}2{%else%}3{%endif%}">
<h6 class="card_title" title="Cellular tests">Cellular tests</h6>
<p>{{ compound.cell_tests_count }}</p>
</div>
<div class="col-md-{% if show_bibrefs %}2{%else%}3{%endif%}">
<h6 class="card_title" title="Pharmacokinetic tests">PK tests</h6>
<p>{{ compound.pk_tests_count }}</p>
</div>
<div class="col-md-{% if show_bibrefs %}2{%else%}3{%endif%}">
<h6 class="card_title" title="Cytotoxicity tests">Cytotoxicity tests</h6>
<p>{{ compound.cytotoxicity_tests_count }}</p>
</div>
</div>
\ No newline at end of file
<table class="table m-1 card_border">
<thead>
<tr class="table-row">
{% if show_bibrefs %}
<th scope="col">Bibliographic ressources</th>
{% endif %}
<th scope="col" title="Biochemical tests">Biochemical tests</th>
<th scope="col" title="Cellular tests">Cellular tests</th>
<th scope="col" title="Pharmacokinetic tests">PK tests</th>
<th scope="col" title="Cytotoxicity tests">Cytotoxicity tests</th>
</tr>
</thead>
<tbody>
<tr class="table-row">
{% if show_bibrefs %}
<td scope="col">{{ compound.biblio_refs.count }}</td>
{% endif %}
<th scope="col" title="Biochemical tests">{{ compound.bioch_tests_count }}</th>
<th scope="col" title="Cellular tests">{{ compound.cell_tests_count }}</th>
<th scope="col" title="Pharmacokinetic tests">{{ compound.pk_tests_count }}</th>
<th scope="col" title="Cytotoxicity tests">{{ compound.cytotoxicity_tests_count }}</th>
</tr>
</tbody>
</table>
\ 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