about summary refs log tree commit diff
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2023-12-18 16:37:09 +0300
committerFrederick Muriuki Muriithi2023-12-18 16:37:09 +0300
commitd16e4067ed7233ef34c24d7b1ede5442ad6e0f64 (patch)
tree244bcfb0aa0049897a3b711bfc13e12ef5f28201
parentdd0673f95ed3508d42c93fd9cdfc2523979db284 (diff)
downloadgenenetwork2-d16e4067ed7233ef34c24d7b1ede5442ad6e0f64.tar.gz
Display empty collections
The count in the badge includes collections that are empty. This
commit fixes the UI to display empty collections too.
-rw-r--r--wqflask/wqflask/templates/collections/list.html20
1 files changed, 8 insertions, 12 deletions
diff --git a/wqflask/wqflask/templates/collections/list.html b/wqflask/wqflask/templates/collections/list.html
index 3719bee5..c553717f 100644
--- a/wqflask/wqflask/templates/collections/list.html
+++ b/wqflask/wqflask/templates/collections/list.html
@@ -52,7 +52,6 @@
 
             <tbody>
               {% for uc in anon_collections %}
-              {% if uc.num_members > 0 %}
               <tr class="collection_line">
                 <td align="center" style="padding: 0px;"><INPUT TYPE="checkbox" NAME="collection" class="checkbox trait_checkbox" VALUE="{{ uc.id }}"></td>
                 <td align="right">{{ loop.index }}
@@ -61,7 +60,6 @@
                 <td>{{ uc.changed_timestamp }}</td>
                 <td align="right">{{ uc.num_members }}</td>
               </tr>
-              {% endif %}
               {% endfor %}
             </tbody>
           </table>
@@ -85,16 +83,14 @@
 
             <tbody>
             {% for uc in collections %}
-                {% if uc.num_members > 0 %}
-                <tr class="collection_line">
-                    <td align="center" style="padding: 0px;"><INPUT TYPE="checkbox" NAME="collection" class="checkbox trait_checkbox" VALUE="{{ uc.id }}"></td>
-                    <td align="right">{{ loop.index }}
-                    <td><a class="collection_name" href="{{ url_for('view_collection', uc_id=uc.id) }}">{{ uc.name }}</a></td>
-                    <td>{{ uc.created_timestamp }}</td>
-                    <td>{{ uc.changed_timestamp }}</td>
-                    <td align="right">{{ uc.num_members }}</td>
-                </tr>
-                {% endif %}
+            <tr class="collection_line">
+              <td align="center" style="padding: 0px;"><INPUT TYPE="checkbox" NAME="collection" class="checkbox trait_checkbox" VALUE="{{ uc.id }}"></td>
+              <td align="right">{{ loop.index }}
+              <td><a class="collection_name" href="{{ url_for('view_collection', uc_id=uc.id) }}">{{ uc.name }}</a></td>
+              <td>{{ uc.created_timestamp }}</td>
+              <td>{{ uc.changed_timestamp }}</td>
+              <td align="right">{{ uc.num_members }}</td>
+            </tr>
             {% endfor %}
             </tbody>
         </table>