From: Seth Woodworth Date: Thu, 18 Apr 2013 16:51:34 +0000 (-0400) Subject: split note_list_entry out of course_detail into a new template file, fixes #6 X-Git-Tag: release-20150131~452 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=980ce084fcebeb3184eb6c2787bd393d4bf62cb8;p=oweals%2Fkarmaworld.git split note_list_entry out of course_detail into a new template file, fixes #6 --- 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" }} … +
+ + +
+
+ +