37 lines
		
	
	
		
			1.5 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
			
		
		
	
	
			37 lines
		
	
	
		
			1.5 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
{% from 'common/macros.html' import timestamp %}
 | 
						|
{% extends 'base.html' %}
 | 
						|
{% block title %}{{ target_user.username }}'s profile{% endblock %}
 | 
						|
{% block content %}
 | 
						|
<div class="darkbg">
 | 
						|
  <h1 class="thread-title"><i>{{ target_user.username }}</i>'s profile</h1>
 | 
						|
  {% if active_user.id == target_user.id %}
 | 
						|
    <div class="user-actions">
 | 
						|
      <a class="linkbutton" href="{{ url_for("users.settings", username = active_user.username) }}">Settings</a>
 | 
						|
      <form method="post" action="{{ url_for("users.log_out") }}">
 | 
						|
        <input class="warn" type="submit" value="Log out">
 | 
						|
      </form>
 | 
						|
    </div>
 | 
						|
    {% if active_user.is_guest() %}
 | 
						|
      <h2>You are a guest. A Moderator needs to approve your account before you will be able to post.</h2>
 | 
						|
    {% endif %}
 | 
						|
  {% endif %}
 | 
						|
  {% 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 {{ timestamp(target_user['created_at']) }}</p>
 | 
						|
    {% else %}
 | 
						|
      <p>This user signed up on {{ timestamp(target_user['created_at']) }} and was confirmed on {{ timestamp(target_user['confirmed_on']) }}</p>
 | 
						|
    {% endif %}
 | 
						|
  {% endif %}
 | 
						|
</div>
 | 
						|
<div>
 | 
						|
  {% with stats = target_user.get_post_stats() %}
 | 
						|
    <ul>
 | 
						|
      <li>Posts created: {{ stats.post_count }}</li>
 | 
						|
      <li>Threads started: {{ stats.thread_count }}</li>
 | 
						|
      <li>Latest started thread: {{ stats.latest_thread_title }}
 | 
						|
    </ul>
 | 
						|
  {% endwith %}
 | 
						|
</div>
 | 
						|
{% endblock %}
 |