X-Git-Url: https://git.p6c8.net/pcdenotes.git/blobdiff_plain/f253eb82624c454150771efb46b6d34595eb6183..69d7df229ddc5c993178928ad91f3273080da42c:/notes/templates/note_list.html diff --git a/notes/templates/note_list.html b/notes/templates/note_list.html index 9f1554c..f1f5ee5 100644 --- a/notes/templates/note_list.html +++ b/notes/templates/note_list.html @@ -1,19 +1,23 @@ {% extends "note_base.html" %} -{% load markdownify %} {% block title %}Notes{% endblock %} {% block content %} - <h1>Notes</h1> - {% for note in notes %} - <h2>{{ note.title }}</h2> - <p>ID: {{ note.id }}</p> - <div>{{ note.content|linebreaksbr|markdownify }}</div> - <p>Link: <a href="{{ note.get_absolute_url }}">View</a></p> - <p>Date: {{ note.created_at|date:"Y-m-d H:i" }}</p> - {% empty %} - <p>No notes</p> - {% endfor %} + {% for note in notes_page %} + {% include "note.html" %} + {% empty %} + <p>No notes</p> + {% endfor %} - <p>Number of notes: {{ notes_count }}</p> + {% if page_count > 1 %} + <ul class="pagination mt-5"> + {% for page in pages %} + {% ifnotequal page.number page_number %} + <li class="page-item"><a href="?page={{ page.number }}" class="page-link">{{ page.number }}</a></li> + {% else %} + <li class="page-item active"><span class="page-link">{{ page.number }}</span></li> + {% endifnotequal %} + {% endfor %} + </ul> + {% endif %} {% endblock %} \ No newline at end of file