File tree Expand file tree Collapse file tree 2 files changed +26
-2
lines changed Expand file tree Collapse file tree 2 files changed +26
-2
lines changed Original file line number Diff line number Diff line change 33{% load humanize %}
44{% load syntax %}
55{% load person %}
6+ {% load user %}
67{% load patch %}
78{% load static %}
89{% load utils %}
@@ -194,9 +195,9 @@ <h2>Notes</h2>
194195< a name ="{{ item.id }} "> </ a >
195196< div class ="submission-message ">
196197 < div class ="meta ">
197- {{ note.patch. submitter|personify:project }}
198+ User: {{ note.submitter|userfy }},
198199 < span class ="message-date ">
199- Last modified: {{ note.last_modified }} UTC
200+ Last modified: {{ note.updated_at }} UTC
200201 </ span >
201202 </ div >
202203 < pre class ="content ">
Original file line number Diff line number Diff line change 1+ # Patchwork - automated patch tracking system
2+ # Copyright (C) 2024 Meta Platforms, Inc. and affiliates.
3+ #
4+ # SPDX-License-Identifier: GPL-2.0-or-later
5+
6+ from django import template
7+ from django .utils .html import escape
8+ from django .utils .safestring import mark_safe
9+
10+
11+ register = template .Library ()
12+
13+
14+ @register .filter
15+ def userfy (user ):
16+ if user .first_name and user .last_name :
17+ linktext = escape (f'{ user .first_name } { user .last_name } ' )
18+ elif user .email :
19+ linktext = escape (user .email )
20+ else :
21+ linktext = escape (user .username )
22+
23+ return mark_safe (linktext )
You can’t perform that action at this time.
0 commit comments