add timestamp macro

This commit is contained in:
2025-06-30 17:11:24 +03:00
parent a95200caf9
commit 19bf98f5b5
5 changed files with 16 additions and 5 deletions

View File

@ -1,3 +1,4 @@
{% from 'common/macros.html' import timestamp %}
{% extends 'base.html' %}
{% block title %}{{ target_user.username }}'s profile{% endblock %}
{% block content %}
@ -17,9 +18,9 @@
{% if active_user and active_user.is_mod() and not target_user.is_system() %}
<h1 class="thread-title">Moderation controls</h1>
{% if target_user.is_guest() %}
<p>This user is a guest. They signed up on ... </p>
<p>This user is a guest. They signed up on {{ timestamp(target_user['created_at']) }}</p>
{% else %}
<p>This user signed up on ... and was confirmed on ...</p>
<p>This user signed up on {{ timestamp(target_user['created_at']) }} and was confirmed on {{ timestamp(target_user['confirmed_on']) }}</p>
{% endif %}
{% endif %}
</div>