From 980ce084fcebeb3184eb6c2787bd393d4bf62cb8 Mon Sep 17 00:00:00 2001 From: Seth Woodworth Date: Thu, 18 Apr 2013 12:51:34 -0400 Subject: [PATCH] split note_list_entry out of course_detail into a new template file, fixes #6 --- .../templates/courses/course_detail.html | 34 +------------------ .../templates/notes/note_list_entry.html | 31 +++++++++++++++++ 2 files changed, 32 insertions(+), 33 deletions(-) create mode 100644 karmaworld/templates/notes/note_list_entry.html diff --git a/karmaworld/templates/courses/course_detail.html b/karmaworld/templates/courses/course_detail.html index 8ef92b3..cc92236 100644 --- a/karmaworld/templates/courses/course_detail.html +++ b/karmaworld/templates/courses/course_detail.html @@ -109,39 +109,7 @@
{% for note in course.note_set.all %} - -
-
- - - - - - {% if note.tags.count > 0 %} -
- Tags: - {% for tag in note.tags.all %} - {{ tag.name }} - {% if not forloop.last %}, {% endif %} - {% endfor %} -
- {% endif %} - - -
- {{ note.text|slice:":500" }} … -
- - -
-
- -
- + {% include 'notes/note_list_entry.html' with note=note %} {% endfor %}
diff --git a/karmaworld/templates/notes/note_list_entry.html b/karmaworld/templates/notes/note_list_entry.html new file mode 100644 index 0000000..1b9702e --- /dev/null +++ b/karmaworld/templates/notes/note_list_entry.html @@ -0,0 +1,31 @@ +
+
+ + + + + + {% if note.tags.count > 0 %} +
+ Tags: + {% for tag in note.tags.all %} + {{ tag.name }} + {% if not forloop.last %}, {% endif %} + {% endfor %} +
+ {% endif %} + + +
+ {{ note.text|slice:":500" }} … +
+ + +
+
+ +
-- 2.25.1