Skip to content

Commit 0964f9d

Browse files
committed
Merge branch '15-improve-index'
2 parents 31d042e + c58356b commit 0964f9d

File tree

2 files changed

+14
-3
lines changed

2 files changed

+14
-3
lines changed

Readme.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,3 +161,11 @@ Chapter 14 - Editing existing notes
161161

162162
Add the ability to edit existing notes, as well as a link from the index page
163163
to the edit page.
164+
165+
166+
Chapter 15 - Begin improving UI
167+
----------------------
168+
169+
Begin improving the UI by displaying the full note on the index page.
170+
Remove the edit button. Instead, clicking on the name takes you to edit
171+
the note. (The details page isn't really needed any more)

elevennote/note/templates/note/index.html

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,14 @@
22

33
{% block content %}
44
{% if latest_note_list %}
5-
<ul>
5+
<table class=table>
66
{% for note in latest_note_list %}
7-
<li><a href="{% url 'note:detail' note.id %}">{{ note.title }}</a> - <a href="{% url 'note:update' note.id %}">Edit</a></li>
7+
<p>
8+
<a href="{% url 'note:update' note.id %}">{{ note.title }}</a><br />
9+
{{ note.body | safe }}
10+
</p>
11+
<hr />
812
{% endfor %}
9-
</ul>
1013
{% else %}
1114
<p>No notes are available.</p>
1215
{% endif %}

0 commit comments

Comments
 (0)