diff --git a/opentech/apply/activity/templates/activity/include/comment_list.html b/opentech/apply/activity/templates/activity/include/comment_list.html new file mode 100644 index 0000000000000000000000000000000000000000..9217e30137f2b12b4fc33ddc9fccac8d5a409260 --- /dev/null +++ b/opentech/apply/activity/templates/activity/include/comment_list.html @@ -0,0 +1,7 @@ +{% for comment in comments %} +<div> + <p>{{ comment.timestamp }}</p> + <p>{{ comment.user }}</p> + <p>{{ comment.message }}</p> +</div> +{% endfor %} diff --git a/opentech/apply/activity/views.py b/opentech/apply/activity/views.py index 7e63e460ef2b162580170a4c48124359f034394d..58b252da1123d4b1c84c86e5f5c77478642b1215 100644 --- a/opentech/apply/activity/views.py +++ b/opentech/apply/activity/views.py @@ -8,6 +8,7 @@ class CommentContextMixin: # Adds the comment form to the context def get_context_data(self, **kwargs): extra = { + 'comments': Activity.objects.filter(application=self.object), CommentFormView.context_name: CommentFormView.form_class(), } diff --git a/opentech/apply/funds/templates/funds/applicationsubmission_detail.html b/opentech/apply/funds/templates/funds/applicationsubmission_detail.html index ade19e16d686cad163cf64a1ba96f45fb9f1b6f9..fd87b677c8e282c0d8d45c3e6ba37663f777e38f 100644 --- a/opentech/apply/funds/templates/funds/applicationsubmission_detail.html +++ b/opentech/apply/funds/templates/funds/applicationsubmission_detail.html @@ -60,6 +60,7 @@ </div> {% endif %} {% include "activity/include/comment_form.html" %} + {% include "activity/include/comment_list.html" %} </aside> </div> </div>