simplelist can be datatabled with need_datatables=True
[unfold.git] / templates / widget-simplelist.html
index 40ad0c1..fb5812e 100644 (file)
@@ -1,16 +1,10 @@
-<ul>
-<li>this hard-wired list</li>
-<li>is defined</li>
-<li>in <code>plugins.simplelist.py</code></li>
-<li>which in turn relies on</li>
-<li>template <code>widget-template.html</code></li>
-<li>while it should of course</li>
-<li>instead issue a query</li>
-<li>and fill the DOM in js from there</li>
-<li>it would however maybe make sense</li>
-<li>to offer the option to 'datatablify'</li>
-<li>the list from the python code</li>
-<li>just like a standard plugin can be set as visible or not</li>
-<li />
-<li>OTOH and IMHO, there should be two separate and explicit subclasses of SimpleList for slices or testbeds</li>
-</ul>
+<table class='simplelist {%if need_datatables %}need-datatables{% endif %}'>
+{% if header %}
+<thead><tr><th>{{ header }}</th></tr></thead>
+{% endif %}
+<tbody>
+{% for item in list %}
+<tr><td>{{ item }}</td></tr>
+{% endfor %}
+</tbody>
+</table>