summaryrefslogtreecommitdiff
path: root/app/notes/templates
diff options
context:
space:
mode:
authorluxagraf <sng@luxagraf.net>2025-04-07 16:51:56 -0500
committerluxagraf <sng@luxagraf.net>2025-04-07 16:51:56 -0500
commit3fd2778db724a29d9a88ed13b57b320abe67b848 (patch)
tree3ef31ebccb506ddf1a84d2f719eff12633bcdbf4 /app/notes/templates
parent17a5f9bd32a1552c3402a9f1168a4926b6398cef (diff)
notes: added detail page
Diffstat (limited to 'app/notes/templates')
-rw-r--r--app/notes/templates/note_detail.html25
-rw-r--r--app/notes/templates/note_list.html4
2 files changed, 27 insertions, 2 deletions
diff --git a/app/notes/templates/note_detail.html b/app/notes/templates/note_detail.html
new file mode 100644
index 0000000..5dc7ace
--- /dev/null
+++ b/app/notes/templates/note_detail.html
@@ -0,0 +1,25 @@
+{% extends 'base_notes.html' %}
+{% block primary %}
+<style>
+p {
+ margin-top: 1rem !important;
+ margin-bottom: 1rem;
+}
+</style>
+<main class="post-detail">
+ <div class="note-list">
+ <article>
+ <h2>{% if object.url %}<a href="{{object.url}}">{{object.title}}</a>{%else%}{{object.title}}{%endif%} <span class="note-edit"><a href="{%url 'notes:note-edit' object.id %}">edit</a></span></h2>
+ <p>{{object.description}}</p>
+ --------------------
+ <p>{{object.body_html|safe}}</p>
+ <p class="small"><a href="{% url 'notes:note-delete' object.pk %}">delete</a></p>
+ </article>
+</div>
+</main>
+
+
+{% endblock %}
+{% block js %}
+<script type="text/javascript">var go_from_select = function(opt) { window.location = window.location.pathname + opt };</script>
+{% endblock%}
diff --git a/app/notes/templates/note_list.html b/app/notes/templates/note_list.html
index 727c21d..1439f4a 100644
--- a/app/notes/templates/note_list.html
+++ b/app/notes/templates/note_list.html
@@ -16,9 +16,9 @@
</div>
<div class="note-list">{% for object in object_list %}<article>
<h2>{% if object.url %}<a href="{{object.url}}">{{object.title}}</a>{%else%}{{object.title}}{%endif%} <span class="note-edit"><a href="{%url 'notes:note-edit' object.id %}">edit</a></span></h2>
- <p>{{object.body_markdown}}</p>
+ <p>{{object.description}}</p>
{% if object.project %}<p class="small">For: <a href="{% url 'notes:project-detail' object.project.id %}">{{object.project}}</a></p>{%endif%}
- <p class="small">Status: {{object.get_status_display}}</p>
+ <p class="small"><a href="{% url 'notes:note-detail' object.pk %}">View local</a></p>
<p class="small"><a href="{% url 'notes:note-delete' object.pk %}">delete</a></p>
</article>
{% endfor%}</div>