[PATCH] templates: Move comments to above patch

Jeremy Kerr jk at ozlabs.org
Tue Mar 29 12:29:12 AEDT 2016


It's much more likely that existing comments will affect the user's
actions, rather than the patch content itself, so put the comments
first.

Signed-off-by: Jeremy Kerr <jk at ozlabs.org>
---
 patchwork/templates/patchwork/patch.html | 32 ++++++++++++++++----------------
 1 file changed, 16 insertions(+), 16 deletions(-)

diff --git a/patchwork/templates/patchwork/patch.html b/patchwork/templates/patchwork/patch.html
index a05f00d..8b6d1fe 100644
--- a/patchwork/templates/patchwork/patch.html
+++ b/patchwork/templates/patchwork/patch.html
@@ -202,6 +202,22 @@ function toggle_headers(link_id, headers_id)
 </pre>
 </div>
 
+{% for item in patch.comments.all %}
+{% if forloop.first %}
+<h2>Comments</h2>
+{% endif %}
+
+<div class="comment">
+<div class="meta">
+ <span>{{ item.submitter|personify:project }}</span>
+ <span class="pull-right">{{ item.date }}</span>
+</div>
+<pre class="content">
+{{ item|commentsyntax }}
+</pre>
+</div>
+{% endfor %}
+
 {% if patch.diff %}
 <h2>
  Patch
@@ -220,20 +236,4 @@ function toggle_headers(link_id, headers_id)
 </div>
 {% endif %}
 
-{% for item in patch.comments.all %}
-{% if forloop.first %}
-<h2>Comments</h2>
-{% endif %}
-
-<div class="comment">
-<div class="meta">
- <span>{{ item.submitter|personify:project }}</span>
- <span class="pull-right">{{ item.date }}</span>
-</div>
-<pre class="content">
-{{ item|commentsyntax }}
-</pre>
-</div>
-{% endfor %}
-
 {% endblock %}
-- 
2.5.0



More information about the Patchwork mailing list