summaryrefslogtreecommitdiff
path: root/app/gtd/templates
diff options
context:
space:
mode:
authorluxagraf <sng@luxagraf.net>2023-11-18 08:59:29 -0500
committerluxagraf <sng@luxagraf.net>2023-11-18 08:59:29 -0500
commit4c8c13d44fe30bc284ed03087454dd19c1f281f8 (patch)
tree4db5aa524c10ae55b2734b5810245a156094481f /app/gtd/templates
parent344da65e7ef3c7b5fa97909d6d8fb2dbb453be92 (diff)
gtd: added per project filtering to notes view
Diffstat (limited to 'app/gtd/templates')
-rw-r--r--app/gtd/templates/gtd/note_list.html5
1 files changed, 5 insertions, 0 deletions
diff --git a/app/gtd/templates/gtd/note_list.html b/app/gtd/templates/gtd/note_list.html
index 5457443..b2c0478 100644
--- a/app/gtd/templates/gtd/note_list.html
+++ b/app/gtd/templates/gtd/note_list.html
@@ -8,6 +8,10 @@
{% endfor %}
<li class="right"><a href="{% url 'gtd:note-create' %}" class="btn">New Note</a></li>
</ul>
+<select class="form-control" style="margin-top: 2%;" onchange="go_from_select(this.options[this.selectedIndex].value)">
+ <option value="">All Projects</option>{% for object in projects %}
+ <option {% if object.title == project %}selected="selected" {%endif%}value="?project={{object}}">{{object}}</option>{%endfor%}
+</select>
</div>
<div class="note-list">{% for object in object_list %}<article>
<h2>{{object.title}}<span class="note-edit"><a href="{%url 'gtd:note-edit' object.pk%}">edit</a></span></h2>
@@ -22,4 +26,5 @@
{% endblock %}
{% block js %}
+<script type="text/javascript">var go_from_select = function(opt) { window.location = window.location.pathname + opt };</script>
{% endblock%}