summaryrefslogtreecommitdiff
path: root/app/gtd/templates
diff options
context:
space:
mode:
authorluxagraf <sng@luxagraf.net>2024-01-27 15:16:24 -0600
committerluxagraf <sng@luxagraf.net>2024-01-27 15:16:24 -0600
commit3562e295581d733039df0b72da3c993139cd5949 (patch)
tree1b4117324c95e3349f042a47b7f722340f898755 /app/gtd/templates
parente6a696797ecacd705251b00f2a4863b1237889aa (diff)
gtd: sorted project detail view by note type
Diffstat (limited to 'app/gtd/templates')
-rw-r--r--app/gtd/templates/gtd/project_detail.html12
1 files changed, 8 insertions, 4 deletions
diff --git a/app/gtd/templates/gtd/project_detail.html b/app/gtd/templates/gtd/project_detail.html
index 844a120..d9a5657 100644
--- a/app/gtd/templates/gtd/project_detail.html
+++ b/app/gtd/templates/gtd/project_detail.html
@@ -1,5 +1,6 @@
{% extends 'base_gtd.html' %}
{% load typogrify_tags %}
+{% load get_note_type %}
{% block extrahead %}
<style>
.detail-header {
@@ -16,13 +17,16 @@
</div>
<div class="post-body">
{{object.body_html|smartypants|safe}}
- <h4>Actions</h4>
- <div class="note-list">{% for object in object.gtdnote_set.all %}<article>
- <h2>{% if object.url %}<a href="{{object.url}}">{{object.title}}</a>{%else%}{{object.title}}{%endif%} <span class="note-edit"><a href="{%url 'gtd:note-edit' object.pk%}">edit</a></span></h2>
+ {% regroup object.gtdnote_set.all by note_type as type_list %}
+ {% for type in type_list %}
+ <h4>{% get_note_type type.grouper %}</h4>
+ <div class="note-list">{% for object in type.list %}<article>
+ <h2>{% if object.url %}<a href="{{object.url}}">{{object.title}}</a>{%else%}{{object.title}}{%endif%} <span class="note-edit"><a href="{%url 'gtd:note-edit' object.pk%}">edit</a></span></h2>
{{object.body_html|smartypants|safe}}
- <p class="small">{{object.get_status_display}}</p>
+ {% if object.get_status_display != 'None' %}<p class="small">{{object.get_status_display}}</p>{% endif %}
<p class="small"><a href="{% url 'gtd:note-delete' object.pk %}">delete</a></p></article>
{% endfor %}</div>
+{% endfor %}
</div>
</main>
{% endblock %}