File tree 2 files changed +26
-2
lines changed
2 files changed +26
-2
lines changed Original file line number Diff line number Diff line change 3
3
{% load humanize %}
4
4
{% load syntax %}
5
5
{% load person %}
6
+ {% load user %}
6
7
{% load patch %}
7
8
{% load static %}
8
9
{% load utils %}
@@ -194,9 +195,9 @@ <h2>Notes</h2>
194
195
< a name ="{{ item.id }} "> </ a >
195
196
< div class ="submission-message ">
196
197
< div class ="meta ">
197
- {{ note.patch. submitter|personify:project }}
198
+ User: {{ note.submitter|userfy }},
198
199
< span class ="message-date ">
199
- Last modified: {{ note.last_modified }} UTC
200
+ Last modified: {{ note.updated_at }} UTC
200
201
</ span >
201
202
</ div >
202
203
< 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