From 3d74843a8982926ab4ce310ed937a4f41ee36810 Mon Sep 17 00:00:00 2001 From: Michael Ellerman Date: Mon, 23 Mar 2015 17:56:22 +1100 Subject: 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 --- templates/patchwork/patch-list.html | 2 +- templates/patchwork/patch.html | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'templates') 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 @@ {{ patch.name|default:"[no subject]" }} {{ patch.date|date:"Y-m-d" }} - {{ patch.submitter|personify }} + {{ patch.submitter|personify:project }} {{ patch.delegate.username }} {{ patch.state }} 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) - + @@ -179,7 +179,7 @@ function toggle_headers(link_id, headers_id)

Comments

{% for comment in patch.comments %}
-
{{ comment.submitter|personify }} - {{comment.date}}
+
{{ comment.submitter|personify:project }} - {{comment.date}}
 {{ comment|commentsyntax }}
 
-- cgit v1.2.3
Submitter{{ patch.submitter|personify }}{{ patch.submitter|personify:project }}
Date