summaryrefslogtreecommitdiff
path: root/app/gtd
diff options
context:
space:
mode:
authorluxagraf <sng@luxagraf.net>2024-01-27 15:56:17 -0600
committerluxagraf <sng@luxagraf.net>2024-01-27 15:56:17 -0600
commit5da08a1928a6f017da67f4eb6fa577658b13f8c5 (patch)
treed73bb900f27d4d46c85b9e91720f95221da5c81f /app/gtd
parent259737bc83b5bdb9e6aebb06af147f60eac63886 (diff)
gtd: added jump list to wired post detail pages
Diffstat (limited to 'app/gtd')
-rw-r--r--app/gtd/templates/gtd/wiredpost_detail.html9
-rw-r--r--app/gtd/views.py1
2 files changed, 8 insertions, 2 deletions
diff --git a/app/gtd/templates/gtd/wiredpost_detail.html b/app/gtd/templates/gtd/wiredpost_detail.html
index f4dd272..aa76c1b 100644
--- a/app/gtd/templates/gtd/wiredpost_detail.html
+++ b/app/gtd/templates/gtd/wiredpost_detail.html
@@ -5,6 +5,10 @@
<h1><a href="{{object.url}}">{{object.title}}</a></h1>
<p>Last Updated: {{object.date_last_pub}}</p>
<p>Needs Update: {% if object.needs_update %} Yes {% if object.days_overdue %}{{object.days_overdue}} days overdue{%endif %}{%endif%}</p>
+<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 posts %}
+ <option {% if object.title == project %}selected="selected" {%endif%}value="{% url 'gtd:wiredpost-detail' object.id%}">{{object}}</option>{%endfor%}
+</select>
</div>{% regroup notes by get_status_display as newlist %}
<div class="note-list">{% for obj in newlist %}
<h5>{{obj.grouper}}</h5>
@@ -18,5 +22,6 @@
{% endfor%}</div>
</main>
{% endblock %}
- {% block js %}
- {% endblock%}
+{% block js %}
+<script type="text/javascript">var go_from_select = function(opt) { console.log(opt); window.location = opt };</script>
+{% endblock%}
diff --git a/app/gtd/views.py b/app/gtd/views.py
index 985fdf0..22b1190 100644
--- a/app/gtd/views.py
+++ b/app/gtd/views.py
@@ -275,6 +275,7 @@ class WiredPostNotesView(DetailView):
def get_context_data(self, **kwargs):
context = super(WiredPostNotesView, self).get_context_data(**kwargs)
context['notes'] = self.get_object().wirednote_set.all().order_by("status")
+ context['posts'] = WiredPost.objects.all()
return context