From 367a6b0857274ef6f5f2c930db9a246c9a2394a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20Bompard?= Date: Fri, 20 Sep 2024 18:22:57 +0200 Subject: [PATCH] Show the account creation date on user profiles MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes: #1447 Signed-off-by: Aurélien Bompard --- news/1447.feature | 1 + noggin/templates/user.html | 8 +++++++- tests/unit/controller/test_user.py | 4 +++- 3 files changed, 11 insertions(+), 2 deletions(-) create mode 100644 news/1447.feature diff --git a/news/1447.feature b/news/1447.feature new file mode 100644 index 000000000..cf665a342 --- /dev/null +++ b/news/1447.feature @@ -0,0 +1 @@ +Show the account creation date on user profiles diff --git a/noggin/templates/user.html b/noggin/templates/user.html index ef903bf31..8df7b37be 100644 --- a/noggin/templates/user.html +++ b/noggin/templates/user.html @@ -92,7 +92,7 @@
{{ user.mail }} {{ blog[8:] }} {% endfor %} - + {% endif %} {% if user.rss_url %} @@ -126,6 +126,12 @@
{{ user.mail }} {% endif %} {{ userlinks() if userlinks is defined }} + {% if user.creation_time %} +
  • + {{_("Created On")}} + {{ user.creation_time|dateformat }} +
  • + {% endif %}
    diff --git a/tests/unit/controller/test_user.py b/tests/unit/controller/test_user.py index a08fbd40d..d81fdb138 100644 --- a/tests/unit/controller/test_user.py +++ b/tests/unit/controller/test_user.py @@ -710,4 +710,6 @@ def test_user_private(client, logged_in_dummy_user, make_user): assert user_fullname.get_text(strip=True) == "testuser" user_attributes = page.select_one("ul#user_attributes") assert user_attributes is not None - assert len(user_attributes.find_all("li")) == 0 + assert len(user_attributes.find_all("li")) == 1 + attr = user_attributes.select_one("li").select_one("strong") + assert attr["title"] == "Created On"