From c67f33f8d9c977162d9395eb6c1f1161b3c5d897 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Herv=C3=A9=20=20MENAGER?= <herve.menager@pasteur.fr>
Date: Fri, 16 Feb 2018 18:54:06 +0100
Subject: [PATCH] add new columns to be displayed in compounds list table (#43
 WIP)

Former-commit-id: c237238c41850b7d9c48009348eb59b0b594a27f
---
 .../ippidb/templates/compound_t_list.html     | 50 +++++++++++++++++++
 1 file changed, 50 insertions(+)

diff --git a/ippisite/ippidb/templates/compound_t_list.html b/ippisite/ippidb/templates/compound_t_list.html
index b7d69a18..5b91101e 100644
--- a/ippisite/ippidb/templates/compound_t_list.html
+++ b/ippisite/ippidb/templates/compound_t_list.html
@@ -24,6 +24,26 @@
       <th scope="col">Available publications
       </th>
       {% endif %}
+      {% if "nb_acceptor_h" in fields %}
+      <th scope="col">Number of hydrogen bond acceptors
+      </th>
+      {% endif %}
+      {% if "nb_donor_h" in fields %}
+      <th scope="col">Number of hydrogen bond donors
+      </th>
+      {% endif %}
+      {% if "tpsa" in fields %}
+      <th scope="col">Topological Polar Surface Area (TPSA)
+      </th>
+      {% endif %}
+      {% if "nb_rotatable_bonds" in fields %}
+      <th scope="col">Number of rotatable bonds
+      </th>
+      {% endif %}
+      {% if "nb_aromatic_sssr" in fields %}
+      <th scope="col">Number of aromatic Smallest Set of System Rings (SSSR)
+      </th>
+      {% endif %}
       <button type="button" class="btn btn-primary float-right" style="width: inherit!important" data-toggle="modal" data-target="#selectColumns">
         <i class="fa fa-columns" title="customize columns"></i>
       </button>
@@ -54,6 +74,21 @@
       {% if "biblio_refs" in fields %}
         <th scope="col">{{ compound.biblio_refs|length }}</th>
       {% endif %}
+      {% if "nb_acceptor_h" in fields %}
+        <th scope="col">{{ compound.nb_acceptor_h }}</th>
+      {% endif %}
+      {% if "nb_donor_h" in fields %}
+        <th scope="col">{{ compound.nb_donor_h }}</th>
+      {% endif %}
+      {% if "tpsa" in fields %}
+        <th scope="col">{{ compound.tpsa }}</th>
+      {% endif %}
+      {% if "nb_rotatable_bonds" in fields %}
+        <th scope="col">{{ compound.nb_rotatable_bonds }}</th>
+      {% endif %}
+      {% if "nb_aromatic_sssr" in fields %}
+        <th scope="col">{{ compound.nb_aromatic_sssr }}</th>
+      {% endif %}
       </tr>
     {% endfor %}
   </tbody>
@@ -91,6 +126,21 @@
         <div class="row">
           <label><input type="checkbox" name="field" value="biblio_refs" class="mr-1" {% if 'biblio_refs' in fields %}checked="checked"{% endif %} />Available publications</label>
         </div>
+        <div class="row">
+          <label><input type="checkbox" name="field" value="nb_acceptor_h" class="mr-1" {% if 'nb_acceptor_h' in fields %}checked="checked"{% endif %} />Number of hydrogen bond acceptors</label>
+        </div>
+        <div class="row">
+          <label><input type="checkbox" name="field" value="nb_donor_h" class="mr-1" {% if 'nb_donor_h' in fields %}checked="checked"{% endif %} />Number of hydrogen bond donors</label>
+        </div>
+        <div class="row">
+          <label><input type="checkbox" name="field" value="tpsa" class="mr-1" {% if 'tpsa' in fields %}checked="checked"{% endif %} />Topological Polar Surface Area (TPSA)</label>
+        </div>
+        <div class="row">
+          <label><input type="checkbox" name="field" value="nb_rotatable_bonds" class="mr-1" {% if 'tpsa' in fields %}checked="checked"{% endif %} />Number of rotatable bonds</label>
+        </div>
+        <div class="row">
+          <label><input type="checkbox" name="field" value="nb_aromatic_sssr" class="mr-1" {% if 'tpsa' in fields %}checked="checked"{% endif %} />Number of aromatic Smallest Set of System Rings (SSSR)</label>
+        </div>
       </div>
       <div class="modal-footer">
         <script>
-- 
GitLab