home · contact · privacy
Add basic sorting features to Condition, Process table views.
[plomtask] / templates / conditions.html
index a717bf0b2fd887bc8adbf5a30abc4caed3c303d5..e8e9fed7fcf5a46b3b39b04ca134a54e94d29f05 100644 (file)
@@ -1,12 +1,23 @@
-{% extends 'base.html' %}
+{% extends '_base.html' %}
 
 {% block content %}
-<a href="condition">add</a>
-<ul>
+<h3>conditions</h3>
+
+<table>
+<tr>
+<th><a href="?sort_by={% if sort_by == "is_active" %}-{% endif %}is_active">active</a></th>
+<th><a href="?sort_by={% if sort_by == "title" %}-{% endif %}title">title</a></th>
+</tr>
 {% for condition in conditions %}
-<li><a href="condition?id={{condition.id_}}">{{condition.title.newest}}</a>
+<tr>
+<td>[{% if condition.is_active %}X{% else %} {% endif %}]</td>
+<td><a href="condition?id={{condition.id_}}">{{condition.title.newest}}</a></td>
+</tr>
 {% endfor %}
-</ul>
-{% endblock %}
+</table>
 
+<p>
+<a href="condition">add</a>
+</p>
 
+{% endblock %}