path: root/templates
diff options
authorMichael Ellerman <>2015-03-23 17:56:22 +1100
committerJeremy Kerr <>2015-05-03 13:43:42 +0800
commit3d74843a8982926ab4ce310ed937a4f41ee36810 (patch)
treea5e9c3c284b6ea149ef8b7d324f4faf3ab020b8a /templates
parentf0ad2c6a249c0ee3a4b356e10033ea0041ecbea4 (diff)
Make the submitter name link to a query for that submitter
Currently the submitter name is rendered as a mailto: link. This is possibly useful in some circumstances, but in my experience is not usually what I want. Although it opens a mail to the submitter, it doesn't include any of the patch context, so is not very helpful. Instead the submitter link can be a link to a query for patches by that submitter. In my experience that is more useful, ie. when looking at a single patch for a submitter you can then quickly get the list of all patches by them. So do that conversion. In order to do it we need to know the current project, so that becomes a parameter to personify. I believe the url reversal is correct, though it's not pretty, and pulling SubmitterFilter.param out feels a little wrong, but is the best solution I could come up with. Signed-off-by: Michael Ellerman <> Signed-off-by: Jeremy Kerr <>
Diffstat (limited to 'templates')
2 files changed, 3 insertions, 3 deletions
diff --git a/templates/patchwork/patch-list.html b/templates/patchwork/patch-list.html
index 59adbe3..f8049f7 100644
--- a/templates/patchwork/patch-list.html
+++ b/templates/patchwork/patch-list.html
@@ -146,7 +146,7 @@
<td><a href="{% url 'patchwork.views.patch.patch' %}"
>{{|default:"[no subject]" }}</a></td>
<td>{{|date:"Y-m-d" }}</td>
- <td>{{ patch.submitter|personify }}</td>
+ <td>{{ patch.submitter|personify:project }}</td>
<td>{{ patch.delegate.username }}</td>
<td>{{ patch.state }}</td>
diff --git a/templates/patchwork/patch.html b/templates/patchwork/patch.html
index c04e32b..be831e9 100644
--- a/templates/patchwork/patch.html
+++ b/templates/patchwork/patch.html
@@ -30,7 +30,7 @@ function toggle_headers(link_id, headers_id)
<table class="patchmeta">
- <td>{{ patch.submitter|personify }}</td>
+ <td>{{ patch.submitter|personify:project }}</td>
@@ -179,7 +179,7 @@ function toggle_headers(link_id, headers_id)
{% for comment in patch.comments %}
<div class="comment">
-<div class="meta">{{ comment.submitter|personify }} - {{}}</div>
+<div class="meta">{{ comment.submitter|personify:project }} - {{}}</div>
<pre class="content">
{{ comment|commentsyntax }}