Skip to content

Commit

Permalink
Show the account creation date on user profiles
Browse files Browse the repository at this point in the history
Fixes: #1447
Signed-off-by: Aurélien Bompard <aurelien@bompard.org>
  • Loading branch information
abompard committed Oct 4, 2024
1 parent da7799d commit 367a6b0
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
1 change: 1 addition & 0 deletions news/1447.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Show the account creation date on user profiles
8 changes: 7 additions & 1 deletion noggin/templates/user.html
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ <h5 class="mb-3" id="user_mail"><a href="mailto:{{ user.mail }}">{{ user.mail }}
<a href="{{ blog }}" target="_blank">{{ blog[8:] }}</a>
</div>
{% endfor %}
</div>
</div>
</li>
{% endif %}
{% if user.rss_url %}
Expand Down Expand Up @@ -126,6 +126,12 @@ <h5 class="mb-3" id="user_mail"><a href="mailto:{{ user.mail }}">{{ user.mail }}
</li>
{% endif %}
{{ userlinks() if userlinks is defined }}
{% if user.creation_time %}
<li class="list-group-item d-flex justify-content-between align-items-center">
<strong title="{{_("Created On")}}"><i class="fa fa-fw fa-plus-circle"></i> {{_("Created On")}}</strong>
{{ user.creation_time|dateformat }}
</li>
{% endif %}
</ul>
</div>
<div class="col-md-8">
Expand Down
4 changes: 3 additions & 1 deletion tests/unit/controller/test_user.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"

0 comments on commit 367a6b0

Please sign in to comment.