diff --git a/patchwork/templates/patchwork/submission.html b/patchwork/templates/patchwork/submission.html index 85e7be4b..0b0a5a7f 100644 --- a/patchwork/templates/patchwork/submission.html +++ b/patchwork/templates/patchwork/submission.html @@ -266,6 +266,24 @@

Message

+{% for note in notes %} +{% if forloop.first %} +

Notes

+{% endif %} + +
+
+ {{ note.submitter|personify:project }} + + Last modified: {{ note.last_modified }} UTC + +
+
+    {{ note.content }}
+  
+
+{% endfor %} + {% for item in comments %} {% if forloop.first %}

Comments

diff --git a/patchwork/views/patch.py b/patchwork/views/patch.py index 54cf992c..0c6ffbbb 100644 --- a/patchwork/views/patch.py +++ b/patchwork/views/patch.py @@ -122,6 +122,14 @@ def patch_detail(request, project_id, msgid): 'submitter', 'date', 'id', 'content', 'patch', 'addressed' ) + if ( + request.user.is_authenticated + and patch.project not in request.user.profile.maintainer_projects.all() + ): + notes = patch.note.all() + else: + notes = patch.note.filter(maintainer_only=False) + if patch.related: related_same_project = patch.related.patches.only( 'name', 'msgid', 'project', 'related' @@ -136,6 +144,7 @@ def patch_detail(request, project_id, msgid): related_same_project = [] related_different_project = [] + context['notes'] = notes context['comments'] = comments context['checks'] = Patch.filter_unique_checks( patch.check_set.all().select_related('user'),